Repository navigation
feat: MCP payer health-check script, bundle-size budgets, x402 latency benchmark, API surface diff check - #781
Merged
davedumto merged 2 commits intoOct 23, 2026
Conversation
|
Someone is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
uche001-dev
marked this pull request as ready for review
October 23, 2026 13:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four self-contained contrib/ reference implementations for the four assigned hard issues, each with a working script, its own test coverage, and a README documenting exact integration steps for a maintainer, per this repo's contribution model (contributor PRs may only touch contrib/).
closes #679
closes #684
closes #685
closes #686
Changes
#679: contrib/mcp-payer-healthcheck/healthcheck.ts spawns the MCP payer binary, sends one JSON-RPC tools/list request over stdio, and resolves with a distinct exit code for healthy (0), unresponsive (1, running but not answering or answering with a JSON-RPC error), and not-running (2, could not be spawned or exited before answering). Verified against five real spawned Node processes exercising each scenario, not mocked.
#684: contrib/bundle-size-budget/check-bundle-size.mjs measures dist/ output size for the root package, packages/cli, and packages/mcp-x402-payer against a configurable per-package budget, failing with a clear per-package message naming which one is over and by how much. Ships with placeholder budgets since no real build could be run in this environment (see test plan); includes an --update-budgets helper that prints the real measured-with-headroom values for a reviewer to paste in after a deliberate increase.
#685: contrib/x402-latency-benchmark/benchmark.ts times the quote, sign, and submit phases of the x402 payment flow against a local fixture, using the real dependency-injection seams Payer.quote()/PayerDeps.signer/PayerDeps.fetchImpl already expose rather than refactoring production call structure. Reports the median of several iterations and appends results to a committed, append-only NDJSON file. Its README documents how the sign-phase measurement relates to the V-13 signature-window floor from the security audit.
#686: contrib/api-surface-diff/api-surface-diff.mjs extracts the named export surface from a .d.ts file (handling re-exports, declared functions/consts/classes, interfaces, and type aliases) and diffs two surfaces into added/removed/changed/unchanged, with a --from-npm flag that fetches the previously published version directly. Verified against the real, currently-published vellar-sdk@0.6.2 package (via npm pack): diffing it against itself correctly reports zero changes across 38 detected exports, and diffing it against a deliberately modified copy correctly detects the added/removed exports and exits non-zero. Its README documents the one real limitation: a bundled re-export can only be detected as present/removed, not changed, since its real declaration is hidden behind an opaque chunk reference; a fully structural diff would need a TypeScript compiler API pass, out of scope here.
Test plan
Could not run the project's real
npm test/vitest/tscin this environment: node_modules were not installed in this clone, and the development machine is currently under heavy memory pressure (confirmed via vm_stat/top showing near-exhausted physical memory and active swapping from other work running in parallel), so a fresh install was not attempted to avoid an OOM crash.Instead, verified every piece of real, working logic directly:
node --max-old-space-size=256, all passing.setTimeout-based delays and real file I/O for the NDJSON append, all passing.npm pack, both self-diffed (0 changes) and against a deliberately modified copy (correctly detected 2 added, 1 removed, exit code 1), plus the full unit test suite's individual assertions run directly.Every test file in this PR is a faithful copy of what was actually run, not retroactively written to match an assumed-correct implementation. Flagging the missing
vitest runspecifically, rather than claiming a CI-green result that didn't happen.