v0.3.0
[0.3.0] — 2026-05-17
The v0.3 release. Operator-side debugging cut: x402trace can now answer the question Discord operators are asking each other in real time — "is my Bazaar / agentic.market integration correct, or is the bug upstream of me?" — in a 30-second command-line check. Same shipped binary contract as v0.2.x (no breaking changes to existing subcommands); two new subcommands; five new facilitator-aware diagnose rules; Base mainnet support behind an opt-in --chain flag; cross-facilitator drift detection on validate. Strict 6-stage audit gate ran on every ticket (X402-31..36).
Added
x402trace bazaar-check <service-url>(X402-32, headline). Pre-ship Bazaar / agentic.market implementation validator. Four read-only checks compose into a single bottom-line verdict:/.well-known/x402manifest, 402 challenge structure (extensions.bazaar.{name, description}), self-payment guard (--payer-hint), and CDP indexing query (/v2/x402/discovery/resources). Exit codes:0looks_correct,2implementation_issue,3upstream_issue (the #2207 Bazaar-indexing pattern; named explicitly in the verdict prose). Maps the dominant Discord pain — ≥10 named voices on the #2207 cluster.x402trace validate --diff <facilitators>(X402-35). Cross-facilitator drift detection. Comma-separated aliases (cdp,xpay,payai,x402.org) OR full URLs. Runs the synthesised payload through each facilitator's/verifyendpoint in parallel viaPromise.all, captures per-facilitator HTTP into aFacilitatorInteraction, and runs the X402-33 facilitator-aware rules per-facilitator. Exit codes:0any_accepts,2all_reject,3all_timeout. Closes TerraDeed's CDP → xpay manual workaround (Discord transcript) and #2184 (PayAI + Python SDK 2.9.0).x402trace versions <service-url>(X402-36, stretch). SDK skew audit. Walks up from cwd forpackage.jsonand extracts@x402/*/x402-*/x402versions; fetches the service URL's 402 forx402Version+Serverheader hints; matches both against a bundled known-skew dataset (@x402/fetch@2.10.0extension echo bug,@x402/honosyncFacilitatorOnStartdefault, pre-v2 Python SDK bazaar emission). Exit0no skew /2skew detected. Closes Myceliaman14 + Poteshniy's Discord chases.- Five new facilitator-aware diagnose rules (X402-33).
cdpMinAmountRule,selfPaymentRule,facilitatorThrottlingRule,extensionResponsesMissingRule,gasEstimationFailureRule. Each backed by named Discord/GitHub voices per ADR-003. NewFacilitatorInteractiontype +DiagnosticContext.facilitator+DiagnosticContext.expectsBazaarExtensionsfields. Rules skip cleanly when their context fields are absent. - Base mainnet support (X402-34). New
--chain <base-sepolia|base>flag onproxy,inspect,validate,bazaar-check,versions. Default staysbase-sepolia(no surprise change).--chain baseswitches to Base mainnet (chain ID 8453) with the canonical mainnet USDC address (0x833589fCD…). Mainnet RPC URL must be supplied via--rpc-urlorBASE_RPC_URLenv; no default mainnet endpoint is shipped (CLAUDE.md hard rule #2). NewBASE_CHAIN_IDenv (accepts"base"/"base-sepolia"OR numeric"8453"/"84532", case-insensitive). Mainnet startup banner emits to stdout (human) or stderr (JSON). NewChainKeyexported type,BASE_USDCconstant,usdcAddressFor()helper. EXIT_UPSTREAM = 3exit code constant insrc/cli/exit-codes.ts. Distinguishes "upstream issue detected" (bazaar-check, validate --diff all-timeout) from "implementation issue" (EXIT_RUNTIME = 2) and "usage error" (EXIT_USAGE = 1).- ADR-003 in DECISIONS.md (X402-31). v0.3 feature pick + autonomous-mode strict 6-stage audit gate codification. The gate substitutes for user review during autonomous execution; every PR in v0.3 ran through Pre-work → Implementation → Correctness audit → Edge-case enumeration → Re-audit → Ship.
- CLAUDE.md hard rule #8 + "Strict audit gate" section. Codifies the gate so future sessions follow it.
- Cross-platform evidence base. Plan and ADR-003 cite Discord transcript (10+ named voices on Bazaar indexing failures), GitHub issues (#2207 cluster, #1065, #2294), Dev.to article, and agentic.market directory.
Changed
- CLAUDE.md hard rule #2 updated from "Testnet only until v0.1 ships" to "No committed mainnet RPC URLs" (v0.3 enables mainnet code; CI never uses mainnet).
src/cli/index.tsVERSIONconstant bumped 0.2.3 → 0.3.0 (kept in sync withpackage.json).
Deferred to v0.3.1+
- Paid-pass mode (
--with-wallet) inbazaar-check— requires signing infrastructure (changes ADR-001 read-only contract) or pre-signed payload pipeline. Static-analysis-only bazaar-check ships now; real-settlement EXTENSION-RESPONSES surfacing is detectable via X402-33'sextensionResponsesMissingRulefor callers that drive their own facilitator HTTP. - SLA-breach observation event (X402-37) — single Discord voice + schema-change risk failed the strict-bar; deferred until a 2nd named operator surfaces independently. Hikari is shipping Recourse as the enforcement product.
- ERC-6492 Smart Wallet support, reconciliation webhook/auto-retry,
extensions.diagnosticdecoder (gated on PR #1875),tokenNameMismatchRule,repeatedNonceRule, daemon mode, audit export, multi-chain (non-Base), hosted SaaS — all listed in ADR-003 with documented deferral reasons.
Fixed (X402-38 pre-publish audit, 2026-05-17)
validate --diff: AbortController signal was never passed to fetch — the timeout firedcontroller.abort()but the fetch call didn't receive the signal, so real-world timeouts would not actually cancel the request. Tests passed because the mock fetcher threwAbortErrordirectly. Fix:DiffFetchertype extended withsignal?: AbortSignal; signal now plumbed through. Two new regression tests assert the signal is received by the fetcher and reportsaborted=trueafter the timeout window.- Pre-existing flake at
tests/integration/demo-timeout-reconciliation.test.ts:114(50ms fixed sleep racing the engine event bus under parallel-test load). Hit CI twice in this session; would have intermittently broken the publish workflow'sprepublishOnlystep. Fix: replaced fixed sleep with apollForhelper that retries up to 2s in 25ms steps. 5/5 consecutive runs pass post-fix.
Notes
- 278 → 410 tests (+132 new across X402-31..36 + audit). The pre-existing flake noted above is now deterministic.
- Tarball size: 74 files / 222 KB unpacked at v0.2.3 → 96 files / ~337 KB unpacked at v0.3.0. Well under the 400 KB CI guard cap.
- Runtime
dependenciescount unchanged from v0.2.3 (4:commander,dotenv,viem,x402). No supply-chain expansion. - Audit findings documented but NOT fixed in v0.3.0 (all low severity, none block release):
cdpMinAmountRuleapplies the same minimum across chains; the $0.001 was Discord-confirmed for Sepolia only. Mainnet minimum may differ. Rule fails-soft (suggests a higher amount); documented inline in src/diagnose/rules.ts.validate --diffsilently overrides--strict. Documented in src/cli/validate-command.ts.parseFacilitatorListallows duplicate aliases (e.g.--diff cdp,cdp). Harmless but wasteful; documented.extractX402Versions(theversionssubcommand) accepts non-semver values (workspace:*,github:foo/bar).match: "any"known-skew entries can fire false-positives for monorepo users. Edge case; promote to a fix when a real user reports it.