Skip to content

chore(deps): bump @aibtc/tx-schemas to ^1.1.0 - #629

Open
biwasxyz wants to merge 1 commit into
mainfrom
chore/tx-schemas-1.1.0
Open

chore(deps): bump @aibtc/tx-schemas to ^1.1.0#629
biwasxyz wants to merge 1 commit into
mainfrom
chore/tx-schemas-1.1.0

Conversation

@biwasxyz

Copy link
Copy Markdown
Collaborator

Closes #492.

Brings mcp-server in line with the other Wave 2 repos (relay, agent-news, x402-api, landing-page), which moved to ^1.1.0.

The migration wasn't needed

#492 deferred this from C2 on the assumption it was "a real type-migration, not a lockfile-only bump." That turned out not to hold for the four symbols this repo imports:

  • TerminalReason — byte-identical between 0.7.0 and 1.1.0
  • HttpPaymentStatusResponse — only gains optional fields (lastOccupant, quarantinedNonces). The status enum and terminalReason shape are unchanged.

All three parse sites (x402-payment-state.ts) use safeParse against a $strip schema, so added optional fields can't reject responses the running relay already emits.

Verification

  • npm run build — clean, zero type errors
  • npm test — 543 passed, 4 skipped
  • npm ls zod — dedupes to a single zod@4.3.6, no duplicate copy
  • Parse behavior compared side by side against a staged 0.7.0 on representative payloads:
case 0.7.0 1.1.0
minimal (no terminalReason) OK OK
terminalReason: null FAIL FAIL
terminalReason enum member OK OK
full 0.7-era body OK OK
unknown extra key OK OK
bare id (no pay_ prefix) FAIL FAIL

No divergence. The two FAIL rows are pre-existing 0.7.0 behavior, not regressions — the schema has always required terminalReason to be omitted rather than null, and always enforced the pay_ id prefix.

Note on coverage

No test file currently exercises x402-payment-state.ts or HttpPaymentStatusResponse, so the green suite doesn't by itself cover this path — the side-by-side parse comparison above is what backs the runtime claim. Worth a follow-up to add cases around resolveCanonicalPaymentStatus.

Closes #492.

The bump is additive for the symbols this repo consumes, so no type
migration was needed:

- TerminalReason is byte-identical between 0.7.0 and 1.1.0
- HttpPaymentStatusResponse only gains optional fields (lastOccupant,
  quarantinedNonces); the status enum and terminalReason are unchanged
- All three parse sites use safeParse against a $strip schema, so added
  optional fields cannot reject existing relay responses

Verified: tsc clean, 543 tests pass, zod dedupes to a single 4.3.6.
Parse behavior compared side by side against 0.7.0 on representative
payloads (minimal, terminal, full body, unknown extra key) with no
divergence.

@arc0btc arc0btc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff (package.json/package-lock.json bump @aibtc/tx-schemas 0.7.0 → ^1.1.0) and the PR description's verification work.

[note] Good diligence here — the side-by-side parse comparison table against a staged 0.7.0 is exactly the right way to de-risk a lockfile-only major bump, and calling out that both FAIL rows are pre-existing 0.7.0 behavior (not new regressions) is the detail that actually matters for a schema-version bump like this. npm ls zod dedup check also rules out the usual "two copies of zod" failure mode for these bumps.

[question] You flagged that x402-payment-state.ts / HttpPaymentStatusResponse has no direct test coverage today — is the follow-up to add coverage there tracked anywhere, or should this PR spawn that issue on merge?

CI is green (Analyze x2, CodeQL, Snyk, test), all 4 imported symbols confirmed compatible (byte-identical TerminalReason, additive-only optional fields on HttpPaymentStatusResponse), consistent with the other Wave 2 repos already on ^1.1.0. Approving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): bump @aibtc/tx-schemas from ^0.7.0 to ^1.1.0 (Wave 2 C2 follow-up)

2 participants