Skip to content

contrib: dist console scan, MCP payer metrics, key rotation runbook, CLI output stability - #787

Merged
davedumto merged 1 commit into
Vellar-Wallet:devfrom
ElizabethChi:contrib/dist-console-scan-mcp-metrics-key-rotation-cli-stability
Oct 23, 2026
Merged

davedumto merged 1 commit into
Vellar-Wallet:devfrom
ElizabethChi:contrib/dist-console-scan-mcp-metrics-key-rotation-cli-stability

Conversation

@ElizabethChi

Copy link
Copy Markdown
Contributor

Summary

Four self-contained contrib reference implementations, batched into one submission since each is small and none depends on another:

Per this repo's contribution model, all four are self-contained reference implementations living entirely inside contrib/. Nothing outside contrib/ is touched by this PR. Exact "Integration into Core" steps (file paths and line-level guidance) for a maintainer to apply each change for real are documented in a new numbered section of contrib/README.md and in each folder's own README.

Changes

  • contrib/dist-console-scan/: check-dist-console.mjs (scanner) + tests + clean/leaky fixture dirs for a manual CLI run.
  • contrib/mcp-payer-metrics/: metrics.ts (Prometheus counters + HTTP server bound to 127.0.0.1 only) + tests.
  • contrib/rotate-mcp-payer-key/: rotate-mcp-payer-key.md runbook + an executable dry-run acceptance test against a mock agent-key runtime, following the same pattern as the existing contrib/examples/agent-key-lifecycle.
  • contrib/cli-output-stability/: render.ts (pure render functions mirroring the real inline CLI output logic) + inline snapshot tests.
  • contrib/README.md: new section 20 covering all four, with "What It Does" and "Integration into Core" subsections per issue.

Test plan

  • npx vitest run contrib/dist-console-scan/check-dist-console.test.ts (12 tests pass)
  • npx vitest run contrib/mcp-payer-metrics/metrics.test.ts (9 tests pass)
  • npx vitest run contrib/rotate-mcp-payer-key/rotate-mcp-payer-key.test.ts (2 tests pass)
  • npx vitest run contrib/cli-output-stability/render.test.ts (17 tests pass)
  • Manually ran check-dist-console.mjs against both the clean and leaky fixture directories, confirmed exit 0 and exit 1 with a correct file/line report respectively.
  • Verified git diff --name-only upstream/dev...HEAD touches only paths under contrib/.

…CLI output stability (Vellar-Wallet#670, Vellar-Wallet#676, Vellar-Wallet#681, Vellar-Wallet#683)

Adds four self-contained contrib reference implementations: a script that
scans a built dist bundle for accidental console.log/debug/warn calls in
the signing path, an opt-in Prometheus metrics endpoint for the MCP payer,
an operator runbook plus acceptance test for rotating a compromised MCP
payer signer key, and snapshot tests proving the CLI's human-readable
output is a stable contract across Node versions.

Each piece ships its own tests and has no dependency on files outside
contrib, aside from read-only imports of existing src types in the key
rotation example, matching the convention already used by
contrib/examples. Integration steps for a maintainer to apply each change
outside contrib are documented per issue in a new section of
contrib/README.md and in each folder's own README.
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@ElizabethChi is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@davedumto
davedumto merged commit a3f7685 into Vellar-Wallet:dev Oct 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment