Consolidate 14 open Mintlify docs PRs (#19, #20, #21, #22, #24-#33)#35
Conversation
…/sdk Generated-By: mintlify-agent
Generated-By: mintlify-agent
Generated-By: mintlify-agent
…ce operator signature Generated-By: mintlify-agent
…ants - New page for forwardToArbiter() with payload shape, error handling, and address re-exports - Updated installation page to show named constant imports alongside getChainConfig - Updated helpers card description in SDK overview - Added forwardToArbiter link to refundable() next steps Generated-By: mintlify-agent
Generated-By: mintlify-agent
…ymentIndexRecorder Generated-By: mintlify-agent
Generated-By: mintlify-agent
…d discovery Generated-By: mintlify-agent
Replace references to removed packages (@x402r/client, @x402r/merchant, @x402r/arbiter) and class-based APIs (X402rClient, X402rMerchant, X402rArbiter) with the unified @x402r/sdk factory pattern (createPayerClient, createMerchantClient, createArbiterClient) and action group APIs (client.payment.*, client.refund.*, client.watch.*, etc.). Fix method counts, add missing config fields, update enum names, and rewrite the arbiter registry page to use the ERC-8004 plugin. Generated-By: mintlify-agent
Generated-By: mintlify-agent
Generated-By: mintlify-agent
Generated-By: mintlify-agent
Generated-By: mintlify-agent
- Strategy: -X theirs (mintlify wins on conflicts) - Kept main's deletion of sdk/installation.mdx (V2 rewrite intentionally removed)
- Strategy: -X theirs - Kept main's deletion of sdk/installation.mdx
- Strategy: -X theirs - Accepted PR #21's deletion of sdk/helpers/refundable.mdx (replaced by forward-to-arbiter.mdx)
…operator signature
- Strategy: -X theirs - Kept HEAD's deletions of refundable.mdx (PR #21) and installation.mdx (V2 rewrite)
PR #21 deleted sdk/helpers/refundable.mdx but the V2 rewrite's docs.json nav was merged with theirs strategy and ended up keeping a reference to the deleted page. Remove the dangling entry.
The base commerce-payments fork has been dropped — x402r now uses the
canonical contracts directly at their universal CREATE2 addresses. The
scheme has also been renamed from `escrow` to `authCapture` with a new
wire format (autoCapture flag for two-phase vs single-shot) and added
Permit2 support alongside ERC-3009.
- x402-integration/escrow-scheme.mdx: rewrite as authCapture spec —
new extra fields (captureAuthorizer, captureDeadline, refundDeadline,
feeRecipient, autoCapture, assetTransferMethod), Permit2 payload
variant, updated verification + settlement logic, refreshed error
codes, payer-agnostic PaymentInfo nonce derivation
- contracts/overview.mdx, contracts/periphery/auth-capture-escrow.mdx,
contracts/audits.mdx: drop fork framing and partialVoid()
references; clarify that audited canonical contracts are used as-is
- roadmap.mdx: drop partialVoid mention and stale spec-PR references
- x402-integration/{overview,comparison}.mdx: update card titles /
cross-references to authCapture
Route kept stable at /x402-integration/escrow-scheme to avoid breaking
inbound links.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vraspar
left a comment
There was a problem hiding this comment.
Fifth pass — fix verification + remaining items
Verified 524a0f5 and c1dc43d against the four-round audit checklist (38 items): 37 PASS, 1 PARTIAL, 2 correctly UNCHANGED (license + audits pending separate review).
The bonus authCapture → auth-capture rename held — zero stale 'authCapture' strings in docs/, zero stale @x402r/evm/authCapture/ import paths, error codes correctly renamed to invalid_auth_capture_*, and the upstream scheme package actually has src/auth-capture/{server,client,facilitator}/ with package.json exports for ./auth-capture/server and ./auth-capture/client. Was the most likely source of breakage; it held.
One nit (2-line fix)
contracts/examples.mdx:532,604 still have inline comments // No refunds next to refundPreActionCondition: '0x0000...'. Since address(0) is default-allow, these are inconsistent with the L458 voidPreActionCondition comment that you correctly updated to // default-allow in 524a0f5. Two-line sweep to mirror.
Still needing action — not blocking but worth flagging
These were noted in the audit as needing human decision or cross-repo work — listing here so they don't get lost in the merge.
1. contracts/license.mdx legal review. The "no deploy outside factories" restriction on L46-57 isn't in the LICENSE file's literal text. Either amend LICENSE with an Additional Use Grant (factory-deploy carve-out), or rewrite the page to match the literal BUSL terms. Needs a product/legal call before code fix — that's why the file was correctly left untouched in this PR.
2. Companion SDK PR for helpers upstream drift. x402r-sdk/packages/helpers/src/forward-to-arbiter.ts:36 and helpers/README.md:17 still reference the wrong class name AuthCaptureServerScheme. Docs side is now correct; SDK side will compile (the symbol's local), but consumers following the README pattern will hit a missing export against @x402r/evm. Worth a small follow-up PR to align both repos.
3. contracts/audits.mdx provenance. The audit counts ("Spearbit 2 audits", "Coinbase Protocol Security 3 audits") aren't verifiable from this workspace (no audits/ directory, no audit-report links). Two options:
- Add an
audits/directory to the contracts repo with PDF links / commit-pinned report URLs - Restructure the page to defer to the upstream
base/commerce-paymentsaudit history with a single link-out
Lower priority than 1-2 but worth deciding before the Resources tab goes public.
4. Gas-costs regen cadence (open question). c1dc43d pinning bb188dbc + the forge test command is exactly right for a snapshot. Open question: should a CI job re-run the benchmark and open a PR when numbers drift past a threshold, or is manual regen the policy? Just noting — no action required if manual is intentional.
Pending those four, the PR looks ready from a code-accuracy + IA standpoint. Merge call when you're ready.
The client half of the auth-capture scheme now ships in the x402 monorepo as AuthCaptureEvmScheme on the @x402/evm/auth-capture/client subpath. Add a "Signing the payload (client)" section to wire-format showing the canonical x402Client.register + wrapFetchWithPayment flow, and link the upstream client implementation from the scheme References. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Re: fifth-pass item 2 (companion SDK / client drift) — the client side just got upstreamed, so the docs now reference it directly rather than the Landed in e419b0b:
Scope note: this covers the client. The remaining |
refundPreActionCondition: address(0) is default-allow (anyone can call refund()), not "no refunds". Mirror the void() default-allow wording so the three refund-condition examples match the corrected line above them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Status on the rest of the fifth-pass review (beyond the client item above):
Remaining items are decisions/cross-repo work, not doc fixes, so still open:
|
…gas + CI audits.mdx: replace the unsourced audit counts with a link-out to Base's canonical commerce-payments audits/ directory and README Security Audits section, which host the dated report PDFs. Keeps the x402r-specific unaudited disclosure intact. gas-costs.mdx: note the contracts-repo CI job that re-runs GasBenchmark.t.sol and flags drift, and add a reference to the upstream commerce-payments escrow baseline the x402r figures build on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Update on the remaining fifth-pass items 3 and 4:
|
Consolidated status across the review passesEverything actionable from the audits is now landed or wired up. Recap of what changed since the last comment: Docs (this PR)
Contracts repo (separate PR)
Intentionally untouched
Cross-repo follow-up (not this PR)
|
vraspar
left a comment
There was a problem hiding this comment.
Sixth pass — fix verification
Verified 252d6a6, e419b0b, and 1782321 against the fifth-pass items.
All five items resolved
- Nit (
examples.mdx"No refunds") — fixed in252d6a6, with a bonus third instance at L673 ("No post-delivery refunds") the audit missed. Comment wording mirrors the L458void()default-allow style. - Client drift —
e419b0badds the "Signing the payload (client)" section towire-format.mdxdocumenting@x402/evm/auth-capture/client. Spot-checked against upstream@x402/evmv2.14.0:AuthCaptureEvmSchemeclass signature,ClientEvmSignertype (address+signTypedData, optional reads only for EIP-2612 enrichment), default-eip3009behavior (extra.assetTransferMethod ?? "eip3009"), and thewrapFetchWithPayment/x402Client.register('eip155:*', new AuthCaptureEvmScheme(account))API all match the canonical upstream client example field-for-field. audits.mdxprovenance —1782321defers to the upstream canonical audit list; unsourced counts replaced with backed link-out. x402r-specific unaudited disclosure preserved.gas-costs.mdxcadence — CI-based approach is the right call.license.mdx— correctly left for product/legal.
One forward-reference to flag
gas-costs.mdx now states "A scheduled CI job in x402r-contracts re-runs GasBenchmark.t.sol and flags drift past threshold." The workflow PR (BackTrackCo/x402r-contracts#38) is currently open, not merged — created ~2 minutes before the docs commit 1782321. The local x402r-contracts main has no gas-docs-drift.yml workflow yet. If x402r-contracts#38 lands first, fine; if docs#35 merges first, the docs briefly ship a claim that's not yet true.
Not blocking — just flagging for merge sequencing. Suggest merging the contracts CI PR first, then docs#35.
Outstanding (separate follow-ups)
x402r-sdkhelpers/src/forward-to-arbiter.ts+helpers/README.mdserver-side drift — confirmed stays a separate follow-up since upstream ships client-only for now.license.mdxlegal call.
PR is ready from a code-accuracy and IA standpoint.
|
Quick scope question — the cross-tab content-dedupe table from the fourth-pass review (the 9-row redundancy map: "What is x402r" in 3 pages, authCapture flow in 4, operator slot tables in 4, fee math in 4, etc.) hasn't been addressed yet. The structural IA reorg in Is the dedupe in scope for this PR, or are you deferring to a follow-up cleanup PR? Either's fine — just want to confirm so it doesn't get lost. |
Resolves the cross-tab redundancy map from the fourth-pass review. Each duplicated topic now lives on one canonical page; other pages carry a short pointer instead of a repeated block: - Fee-math worked example -> contracts/fees (trimmed from architecture + payment-operator; also drops a stale 3+2bps variant that disagreed with the canonical 50+250bps example). - Protocol-fee 7-day timelock walkthrough -> contracts/fees (trimmed from architecture + payment-operator). - Condition-singleton address table -> periphery/overview (trimmed from factories). - EscrowPeriod+Freeze composition pattern -> conditions/freeze (trimmed from conditions/escrow-period). - Supported-networks table -> sdk/overview (trimmed from index + deploy-operator). - auth-capture two-phase flow -> auth-capture/index + architecture (trimmed the duplicate sequence diagram from x402-integration/overview). - "What is x402r" -> index; operator slot tables -> payment-operator; deploy preset comparison -> deploy-operator: added pointers, kept role/scoped halves. Kept the homepage hero diagram and the scoped condition/hook slot tables intentionally (landing + on-topic reference), pointing each to its canonical source. broken-links passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Did the dedupe in-scope this PR ( Trimmed to canonical owner (duplicate block replaced with a pointer)
Pointer added, scoped content kept (judgment calls)
Deliberately not trimmed
The structural IA reorg ( |
vraspar
left a comment
There was a problem hiding this comment.
Approving — every audit item from the six review passes is now resolved.
Final pass — c1f8182 dedupe verification
Verified all 9 rows of the fourth-pass cross-tab redundancy map landed correctly:
- Fully trimmed (6 rows): fee-math example, 7-day timelock walkthrough, condition-singleton table, EscrowPeriod+Freeze composition, supported-networks table, auth-capture two-phase sequence — each now lives only at its canonical owner; non-canonical pages carry a pointer link to the right anchor.
- Pointer + scoped content kept (3 rows): "What is x402r" intro (
contracts/overviewkeeps contract-layer framing), operator slot tables (condition-half onconditions/overview, hook-half onhooks/overview), deploy preset comparison (sdk/overviewkeeps the two-models prose, links for the full matrix). Defensible judgment calls. - Deliberately not trimmed: homepage hero diagram — correct.
Net −83 lines matches git show --stat. No orphan paragraphs, all pointers use correct Mintlify anchor syntax.
Bonus catch confirmed
The dedupe surfaced a real consistency bug — architecture.mdx and payment-operator.mdx had a 3 bps + 2 bps → 999.50 fee-math example that disagreed with the canonical 50 + 250 bps → 970 in fees.mdx. Removing the duplicates fixed the inconsistency.
Final state
All in-PR audit items addressed. Two confirmed out-of-PR follow-ups (license.mdx legal review, x402r-sdk helpers/forward-to-arbiter.ts + helpers/README.md server-side rename) tracked separately.
One soft merge-sequencing note from review #6 still applies: the gas-costs.mdx CI claim references the gas-docs-drift workflow which is in x402r-contracts#38 (still open at time of writing). Suggest merging x402r-contracts#38 first, then this PR, so the claim is true at merge time.
Otherwise: ready to merge whenever you are.
## Summary After applying the writing-docs skill across PR #35's 14-PR consolidation, the remaining ~300 Vale hits were all false positives on x402r-specific vocabulary, protocol acronyms, hex literals, and the Microsoft "agent" terminology swap. This PR teaches Vale about the domain so prose-quality signal isn't drowned by false positives. - 60+ vocab additions, grouped by intent (interfaces, protocol concepts, SDK identifiers, tooling, standards, ecosystem). - `Microsoft.HeadingAcronyms = NO` — protocol acronyms (`ERC-3009`, `EIP-712`, `EIP-6492`, `BUSL-1.1`, `JSON-RPC`, `CDP`, `DAO`) are the canonical names. The rule has no allowlist mechanism. - `Microsoft.Terms = NO` — its `agent → personal digital assistant` mapping is wrong for ERC-8004 on-chain agents and the broader crypto/AI-agents ecosystem. - `proselint.Typography = NO` — flags every `0x` hex literal as wanting the `×` symbol. No code/identifier context awareness. Each disable has its rationale inline in `.vale.ini`, matching the existing comment style. ## Why this is a separate PR from #35 PR #35 is content-only edits to clear actionable prose violations. This is config-tuning that affects what fires going forward across the whole repo. Splitting the two keeps review focused and lets either land independently. ## Test plan - [ ] `cd docs && vale --no-exit .` — confirm the three disabled rules no longer fire - [ ] After PR #35 merges + this merges to main, re-run Vale and confirm the remaining-hits count is dominated by genuine prose issues, not domain false positives - [ ] Visual smoke test: `npx mint dev` — no rendering regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Consolidates all 14 open Mintlify bot PRs into a single PR for review. Merged oldest-first with
--no-ff -X theirsso each PR's intent is preserved as a discrete merge commit and later PRs supersede earlier ones where they overlap.Consolidated PRs
refundable()withforwardToArbiter()in SDK docsforwardToArbiterdocs and named address constantsDeliveryProtectionOperatorpreset exportsArbiterRegistryreferences from SDK docs@x402r/sdk0.2.x APIidentity.check()SDK docs@x402r/clidocumentationConflict resolutions
The V2 SDK Getting Started rewrite (#23) landed on
mainafter most of these PRs were opened, so several conflicts had to be resolved:sdk/installation.mdx— V2 rewrite intentionally deleted this file. Kept the deletion; dropped PR Update SDK docs for @x402r/sdk API and new chain support #19, Sync SDK docs with contracts v3 API #20, and Add forwardToArbiter docs and named address constants #24 modifications.sdk/helpers/refundable.mdx— PR Replace refundable() with forwardToArbiter() in SDK docs #21 deletes this page (replaces withforward-to-arbiter.mdx). Accepted the deletion; later PRs that modifiedrefundable.mdx(PR Add forwardToArbiter docs and named address constants #24) had their refundable-touching parts dropped.docs.json— V2 rewrite keptsdk/helpers/refundablein nav. PR Replace refundable() with forwardToArbiter() in SDK docs #21'stheirs-strategy merge addedforward-to-arbiterbut the V2 entry forrefundablewas preserved as a dangling reference. Removed in the final fix commit so the Mintlify build doesn't fail.-X theirs(incoming Mintlify PR wins). Newer PRs in the chronological merge order override older PRs where they touch the same lines.Verification
python3 -m json.tool docs.json— valid JSONsdk/installationorsdk/helpers/refundableNext steps (for reviewer)
npx mint devlocally to verify rendering before merging.