Skip to main content
Recorded runs back the facilitator’s and the Bazaar’s claims. Each harness runs against a Rail402 on the Stellar testnet named with --facilitator: by default http://localhost:8080, a local one started from a source checkout, or a deployed one such as the hosted service at https://testnet.rail402.dev, without an API key. pnpm evidence starts local replicas from the checkout and runs every harness against them; each recorded run names its target (local or hosted) and version in its evidence. They use fresh Friendbot-funded testnet accounts, Circle testnet USDC and the TEST6 test token, so none needs secrets. The exceptions are the live Bazaar run’s second seller and the upstream suite’s seller against a hosted service: fixed testnet accounts derived from the operator’s sponsor seed (the file RAIL402_SPONSOR_SECRET_FILE names), so that repeated runs reuse their listings and nobody else can sign for them; without that file they are fresh accounts. Their results are committed in tools/conformance/evidence/. A harness records a run with --write, and only from a clean checkout of a commit on main; it refuses to write anything that looks like a secret. The recorded-run sections below are rendered from those files by pnpm report, which checks every file first and pins its hash in tools/conformance/evidence/manifest.json; pnpm test fails when a page no longer matches its evidence.

Tested release

Tested against

The release the runs describe, the networks they ran on and the upstream x402 release they were tested against, from the upstream watch list.

Network × scheme

Settled transactions by network and scheme, from passed cases of the canonical client, the live facilitator matrix and the live agent runs, with the files that record them; below it, passed Bazaar cataloging and search cases (discovery, from the live Bazaar and agent runs) and MCP cases (mcp, from those runs and the rejection audit) by network. pnpm report --check --final --require-networks stellar:testnet,stellar:pubnet fails while a cell of either table has nothing recorded or only runs against a local service back it.

Summary

Every case in a recorded run names the checks it proves. The table counts them across all runs in the current evidence format, with the reason for every skip.

Skipped cases

Every skipped case across the runs, grouped by category and reason. Every harness names the category of each case it skips (not-applicable, by-design, upstream-limitation, environment or pending-dependency), and pnpm report refuses a run recorded from 2026-10-23 on with a skipped case that has none; runs recorded before show “not categorised”. pnpm report --check --final fails when a required check (canonical client, exact, upto, upstream e2e, discovery or MCP) is skipped as pending-dependency: for example upto cases while the facilitator does not advertise upto, or a mainnet upstream suite without its checkout.

Canonical client

An unmodified buyer pays an unmodified seller whose facilitator is Rail402, and every byte between the seller and the facilitator is recorded by a transparent forwarder (tools/conformance/src/forwarder.ts).
  • Buyer, exact: for a G… payer, @x402/fetch (wrapFetchWithPaymentFromConfig) with the stock ExactStellarScheme client from @x402/stellar and its default spend controls. The stock client signs for G… accounts only, so a C… (smart-account) payer is signed by Rail402’s test client and its case says so.
  • Buyer, upto: @x402/fetch with the UptoStellarScheme client from @rail402.dev/upto, unmodified for a G… payer; a C… payer’s authorization entry is handed to Rail402’s test signer through the client’s authorizeEntry option.
  • Seller: @x402/express paymentMiddleware with x402ResourceServer and HTTPFacilitatorClient({ url }), charging $0.01 for GET /weather (exact). The upto route (GET /metered-weather) registers @rail402.dev/upto’s server scheme, is priced at the same amount as its cap, and charges half of it after serving through the stock settlement override (setSettlementOverrides(res, { amount: "50%" })).
Each case checks the wire and the chain:
  • the buyer’s PAYMENT-SIGNATURE carries payload: { transaction } (exact) or payload: { authorization } (upto) and nothing else: the transaction is a v1 envelope with a single invokeHostFunction operation, the authorization one Soroban authorization entry with address credentials;
  • the seller forwards that value byte-equal to /verify and /settle, and its PAYMENT-RESPONSE decodes to what /settle answered; for upto, /settle receives the charged amount and the settlement reports it;
  • the settled transaction carries the payer’s authorization entry byte-equal to the signed one and emits exactly one transfer, payer → payTo, for the price (exact) or the charged amount (upto);
  • a facilitator signer pays the fee through a fee bump around a facilitator channel account, for upto the settlement authority /supported advertises is the operation’s source, the payer’s balance falls and payTo’s rises by exactly the amount, and no facilitator account’s balance of the asset changes.
The run also records /supported verbatim and compares its Stellar kind with the one https://x402.org/facilitator/supported advertises (read-only; an unreachable reference never fails the run).
--facilitator defaults to http://localhost:8080; --scheme takes exact and upto, and --asset takes usdc (priced at --price, $0.01 by default) and test6, the 6-decimal test token (priced at 0.01 TEST6; the stock client opts it in with spendControls.allowedAssets). Comma lists run every combination. Before any funds are spent, test6 is read from its committed deployment record, which must match the address tests use, and checked on chain: its instance is live, runs the recorded WASM and answers decimals() with 6. The facilitator must accept every asset run, with fee ceilings for its costliest payments (see Fees and the fee ceiling). --write records the result in tools/conformance/evidence/canonical-stellar-testnet.json, with each transaction’s envelope and result XDR so the file stands alone after the RPC’s retention window. Run it from a source checkout after pnpm install.

Recorded run

From tools/conformance/evidence/canonical-stellar-testnet.json: 10 of 10 cases passed, with 8 settlements and 0 coded rejections. From tools/conformance/evidence/canonical-hosted-stellar-testnet.json: 10 of 10 cases passed, with 8 settlements and 0 coded rejections.

Payloads

exact payments carry payload: { transaction }: the payer’s signed transfer transaction, which Rail402 accepts verbatim and re-sources from its own channel account, fee-bumped by its sponsor. The canonical run proves the transaction reaches the facilitator byte-equal and that the payer’s authorization entry lands on-chain unchanged. upto payments carry payload: { authorization } instead. When the buyer signs, the amount is not known yet: the seller charges after serving, anything up to the cap. So the payer signs one Soroban authorization entry over the terms (recipient, token, cap, expiration and the facilitator’s settlement authority) and never over the amount. The facilitator builds the settle(payer, terms, amount) transaction itself, with the settlement authority as the operation’s source; the contract refuses an amount above the cap, a different recipient or token, and any caller but the named authority. The canonical run proves the signed entry lands on-chain byte-equal while the amount is the one the seller charged. The shape checks are unit-tested in tools/conformance/test/wire.test.ts.

/supported and fee sponsorship

Both kinds advertise extra.areFeesSponsored: true; the upto kind also names its settlement authority, which is listed among the signers. GET /supported as the hosted https://testnet.rail402.dev, version 0.5.4 answered it during the canonical run against it (canonical-hosted-stellar-testnet.json, 2026-11-07):
Compared with https://x402.org/facilitator/supported: the Stellar exact kind has the same shape.

Settlement matrix

Every settlement the canonical run and the live matrix recorded, by scheme, asset, payer and payTo. The evidence files hold each transaction’s fee source, inner source and sequence, and its transfers.

Expiration

A payment’s authorization expires at the ledger its client derives from maxTimeoutSeconds; Rail402 settles before it and refuses the same payment after it, for both schemes (see Expiration for the formulas and the local boundary tests). On the testnet, expiry-window signs a 10-second payment with the stock exact client and upto-expiry-window with the upto client, verifies it, waits until the network passes its expiration ledger, and expects both verify and settle to refuse it with nothing moved; a fresh 60-second payment then settles. The upper edge of the window is tested on the private network only: on the testnet it depends on two independent readings of the ledger time agreeing.

Idempotency

A repeated /settle for the same payment returns the recorded response, marked as a repeat in EXTENSION-RESPONSES, however late it arrives; the same authorization in another envelope, or an upto repeat for another amount, is refused with the scheme’s …_idempotency_conflict and never charged again.

Live facilitator matrix

tools/conformance/src/live-matrix.ts exercises every facilitator behaviour over HTTP against a deployed Rail402, sending no API key. Every settlement is checked on chain: the transaction is a fee bump whose fee source and inner source are facilitator signers and never the payer or payTo; it emits exactly one transfer event, payer → payTo, for the exact amount of the required asset (none when an upto payment settles zero); the payer’s balance falls and payTo’s rises by exactly that amount; the sponsor’s XLM falls by exactly the fee and no other signer’s XLM changes; and no facilitator account holds the asset. Every rejection must be spec-shaped with a registered code and a non-empty reason.
Besides settlements and refusals, the matrix repeats payments: sequentially (the repeat returns the original transaction and is marked in EXTENSION-RESPONSES), concurrently (both answers name one transaction and exactly one is marked) and after the authorization expired (the original success, nothing moves). The upto cases settle part of the cap, all of it and zero, refuse a charge above the cap, and refuse a repeat for another amount. --only <ids> runs a subset of cases. The sponsor check is exact only while no other settlement runs on the service at the same time.

Recorded run

From tools/conformance/evidence/live-matrix-stellar-testnet.json: 32 of 32 cases passed, with 18 settlements and 38 coded rejections. From tools/conformance/evidence/live-matrix-hosted-stellar-testnet.json: 32 of 32 cases passed, with 18 settlements and 38 coded rejections.

Concurrency

tools/conformance/src/concurrency.ts settles batches of concurrent payments over HTTP against one Rail402, or against two replicas of one deployment: exact, upto (each authorizing twice the amount and settling the amount) or both mixed in every batch, sharing one channel pool. In every batch, --duplicates of the payments are sent a second time at the same moment, to the other replica when two URLs are given. A batch passes when every payment settled once, in its own transaction, moving the amount from its payer to payTo; each duplicate received the original’s response and moved nothing; every payer was debited exactly once; and the replicas’ /metrics counted the settlements and repeats, and no sequence conflict (txBadSeq), against one service or two replicas: no reconciler rebroadcasts a settlement a request on either replica is still confirming. Across the run, no two transactions may share a channel account and sequence number. Runs recorded before this rule counted a replica’s rebroadcast of the other’s landed settlement as a conflict. Each batch also records its wall time, the 95th percentile of channel lease waits, and the highest rail402_channels_in_use seen while it ran.

Recorded run

From tools/conformance/evidence/concurrency-stellar-testnet.json: 4 of 4 cases passed, with 60 settlements and 0 coded rejections. Across the run, 60 settlement transactions used distinct (channel, sequence) pairs; collisions: 0. From tools/conformance/evidence/concurrency-upto-stellar-testnet.json: 4 of 4 cases passed, with 60 settlements and 0 coded rejections. Across the run, 60 settlement transactions used distinct (channel, sequence) pairs; collisions: 0. From tools/conformance/evidence/concurrency-mixed-stellar-testnet.json: 4 of 4 cases passed, with 60 settlements and 0 coded rejections. Across the run, 60 settlement transactions used distinct (channel, sequence) pairs; collisions: 0.

Crash recovery

tools/conformance/src/fault-recovery.ts starts its own Rail402 process from the checkout, over Postgres, reaching the testnet RPC through a fault proxy, and kills it with SIGKILL at each point of a settlement where a crash could lose track of money:
  • K0: the network accepted the transaction and its answer never reached Rail402;
  • K1: the envelope was recorded and the broadcast never left the host;
  • K3: as K1, and the service stays down until the transaction’s time bound has passed.
After a restart, the new process must finish the settlement from its durable record alone: K0 and K1 end succeeded with the original transaction and no other envelope ever sent, K3 ends expired with nothing broadcast after the crash and nothing moved, no channel stays leased, and a repeat of the payment answers the recorded outcome. K0 and K1 run for exact and upto, K3 for exact. The hosted service is never killed. Recovery may rebroadcast the identical recorded transaction several times (while it waits for the chain to show it final, it sends the same bytes again every few poll intervals), but it never builds a replacement: “Sends after restart” counts every broadcast of the restarted process, and “Distinct envelopes” counts the different transactions ever sent for the payment, which is always one.
The same kill points, and K2 (the transaction was included before the process saw it confirmed), run against the private network in apps/rail402/test/crash-recovery.integration.test.ts.

Recorded run

From tools/conformance/evidence/fault-recovery-stellar-testnet.json: 5 of 5 cases passed, with 4 settlements and 0 coded rejections.

Front-running

A Stellar authorization is bound to its invocation, not to a transaction, so anyone holding an exact payment could land its authorization in a transaction of their own before Rail402’s. The payment then settled exactly as signed, and Rail402’s own transaction fails on the consumed nonce: Rail402 finds the other transaction on chain, proves it carried the same signed invocation, and answers with its hash. An upto authorization cannot be landed this way: the settlement also needs the facilitator’s settlement authority as the operation’s source, so a copy submitted by anyone else fails. Both are tested on the private network in packages/facilitator/test/front-run.integration.test.ts, which injects the other transaction through the RPC proxy right before Rail402’s submission; a public RPC offers no such hook, so there is no testnet run.

Rejection audit

tools/conformance/src/rejection-audit.ts sends every kind of request Rail402 must refuse to a running service over HTTP and checks each answer: the refusal has one of the three wire shapes, every code in it is registered and is one the case expects, and every reason is non-empty and at most 300 characters. It covers the transport (body limit, content type, malformed JSON, unknown routes, and with --keyed and --limited second deployments the API key and rate limit), the requirements and payload rules, facilitator accounts as source, payer or co-signer, tampering, expiry, trustlines, balances, missing accounts, smart-account signatures, replay, and discovery and search parameters. When the service advertises upto, every static and simulation refusal of an upto payment runs too, at /verify and /settle: requirements, the payload’s shape, each signed term against the requirements, the authorization tree, credentials, the settlement authority, the start and expiration ledgers, a charge above the cap, terms rebuilt with the original signature, trustlines, balances, missing accounts, a smart account signed by the wrong key, and replay. The wrong-asset case uses TEST6 as the second accepted asset (--other-asset none without it). With --mcp it also spawns rail402-mcp over stdio with the service as its Bazaar (see MCP).
--write records tools/conformance/evidence/rejection-audit-stellar-testnet.json, or rejection-audit-hosted-stellar-testnet.json beside it for a deployed service, where the API-key and rate-limit cases are skipped: they need deployments of their own, which pnpm evidence starts locally. The same cases run against the service on a private network in tools/conformance/test/rejection-audit.integration.test.ts.

Recorded run

From tools/conformance/evidence/rejection-audit-stellar-testnet.json: 92 of 94 cases passed, 2 skipped, with 0 settlements and 223 coded rejections. Every code and its reason are listed on the error codes page. From tools/conformance/evidence/rejection-audit-hosted-stellar-testnet.json: 90 of 94 cases passed, 4 skipped, with 0 settlements and 218 coded rejections. Every code and its reason are listed on the error codes page.

Upstream x402 e2e suite

The e2e suite of x402-foundation/x402 runs every stock TypeScript client and server against a facilitator, then validates the facilitator’s Bazaar. Rail402 joins it as an external facilitator through tools/conformance/upstream-e2e/ (test.config.json and run.sh), which the suite supports without modification. run.sh maps the suite’s variables onto Rail402’s and starts the service with STORE=memory, DISCOVERY_ALLOW_LOOPBACK=true (the suite’s sellers listen on localhost), the per-client rate limit off, and the catalog’s hourly new-listing quotas per payer and per payTo raised to 1,000 (TESTNET_BAZAAR_MAX_NEW_LISTINGS_PER_PAYER_PER_HOUR, TESTNET_BAZAAR_MAX_NEW_LISTINGS_PER_OWNER_PER_HOUR). The suite pays every discoverable route (15 today, including three MCP tools) with one buyer to one payTo, so the default quotas of 10 per payer and 20 per payTo would refuse the last listings as bazaar_rate_limited; the run records both values in its evidence. When the suite stops the service, run.sh keeps its rail402_catalog_outcomes_total counters, and the evidence attaches them, with the discovered count and any missing resources, to the Bazaar validation case.
--x402 is a checkout of x402-foundation/x402 at the tag matching @x402/stellar 2.28.0 (the script refuses any other version), prepared as its e2e/README.md describes: pnpm install in e2e/, the TypeScript packages built, and ./setup.sh run. The script funds a fresh sponsor, buyer and seller, installs the Rail402 proxy into the suite, and runs:
--write records tools/conformance/evidence/upstream-e2e-stellar-testnet.json. The run fails unless the suite exits 0, at least one test ran, and the Bazaar discovery validation passed. A paid call by the suite’s stock MCP client and server also counts toward the mcp check. --allow-version-mismatch runs a checkout of another version and records that it did. To run the suite against an already running Rail402 instead, --target hosted --facilitator <url> installs tools/conformance/upstream-e2e-hosted/ into the suite: run.sh starts the forwarder, which passes /verify, /settle, /supported and /discovery/* through verbatim (status codes and EXTENSION-RESPONSES included) and answers /health and /close itself. The service keeps its own sponsor. The suite’s Bazaar validation does not apply in this mode, and is recorded as not applicable: the suite builds the resource URL it expects for each HTTP route as http://localhost:<port><path> (in its e2e/extensions/bazaar.ts), and its sellers listen there, while a hosted catalog refuses loopback origins by design (bazaar_resource_unsafe), so those listings can never exist in it. Passing it would need a change to the suite. The local run, whose catalog allows loopback for the suite (DISCOVERY_ALLOW_LOOPBACK=true), validates the suite’s Bazaar. The suite’s MCP tools, whose mcp://tool/… resources need no reachable origin, are still cataloged by the hosted Bazaar; the harness therefore pays them to one fixed testnet account derived from the operator’s sponsor seed, so reruns update the same three listings instead of adding new ones. pnpm evidence runs this mode too when RAIL402_EVIDENCE_HOSTED_URL names the deployed service.
--schemes exact,upto also runs the suite’s Stellar upto scenarios. Released upstream versions have no Stellar upto mechanism, so this needs a checkout of a branch that adds one (with --allow-version-mismatch); a run from a checkout that is not at a release tag is recorded as not yet merged upstream, in upstream-e2e-upto-premerge-stellar-testnet.json, and the facilitator proxy declares both schemes. Against a checkout without it, the suite runs exact and records the upto row as skipped with that reason. The recorded upstream commit is one readers can fetch: a released checkout cites the @x402/stellar release tag, and any other checkout the remote-tracking branch that contains its commit and that remote’s repository (the public fork the branch was pushed to). --write refuses a commit that no remote branch contains. Suite components that cannot involve a Stellar facilitator are recorded as skipped with the reason: the Go and Python SDKs (no Stellar mechanism), x402 v1 (Stellar is v2 only), escrow, and mainnet mode (the suite builds its Stellar client without an RPC URL). The suite is third-party code, so it never inherits the harness’s environment. It runs with an allow-list (PATH, HOME, locale and terminal settings, NODE_*, PNPM_*, npm_config_*, XDG_*, COREPACK_*, CI) minus any name that looks like a secret, a token, a key, a run confirmation or a ledger, plus the suite’s own variables (tools/conformance/src/upstream-e2e-env.ts). Treasury, sponsor and API-key file paths, RAIL402_PUBNET_RUN_CONFIRM and RAIL402_PUBNET_LEDGER never reach it. Mainnet mode (--network pubnet, hosted only) funds a buyer for this run only (derived from the treasury seed and the run id, so a key the suite leaks is worth that run’s 1 USDC at most and is useless on the next run) and a seller derived from the treasury seed; both are swept and merged at the end, also when the suite crashes or the run is interrupted. The suite reaches the service through a forwarder inside the harness, which counts every /settle against the caps before passing it on; the hosted seller is never the operator’s sponsor. The suite still runs as the same operating-system user as the harness: run a mainnet suite from a checkout you have reviewed, ideally as a separate user that cannot read the treasury file. Released suites build their Stellar client without an RPC URL, which the SDK requires on pubnet; the checkout needs this change in e2e/clients/typescript/client.ts, where the client registers the Stellar scheme, and the harness passes STELLAR_RPC_URL:
--pending "<reason>" records the suite as one skipped case waiting on a dependency, without funding or running anything; pnpm evidence --network pubnet does so when RAIL402_X402_PUBNET_CHECKOUT is unset.

Recorded runs

From tools/conformance/evidence/upstream-e2e-stellar-testnet.json: 19 of 23 cases passed, 4 skipped, with 18 settlements and 0 coded rejections. Recorded as not applicable or skipped:
  • Go and Python clients, servers and facilitators: the upstream Go and Python SDKs have no Stellar mechanism
  • X402 v1 (legacy) scenarios: Stellar exact is defined for x402 v2 only
  • Escrow scheme scenarios: the suite has no Stellar escrow mechanism
  • Mainnet mode: the suite’s Stellar client is built without an RPC URL, which the SDK requires on pubnet

Live Bazaar

tools/conformance/src/live-bazaar.ts exercises every cataloging and integrity rule against a Rail402 on the testnet through the demo seller, apps/demo-seller: stock @x402/express with the bazaar server extension, three paid routes (GET /weather, GET /users/:id, POST /translate), paid MCP tools at POST /mcp, a free /health, and a SEP-1 stellar.toml that lists its payTo. Each case settles a real payment built from the seller’s own 402 (for the MCP tool, the answer to an unpaid tools/call) exactly as a stock client builds it, and records the EXTENSION-RESPONSES outcome and the resulting listing. The MCP case waits for the origin check to publish the tool, and checks that a second payTo declaring the same tool gets its own listing, which is quarantined and never listed. A second seller, started by the run, covers another asset and upto: a route priced at 0.01 TEST6 and an upto route whose cap is 0.01 USDC, of which it charges 0.004 after serving. Its cases prove that the TEST6 listing carries the token’s on-chain symbol and decimals and is found by asset=TEST6 with a ceiling in TEST6 units; that the upto listing shows the upto scheme priced at the cap, not the amount charged; that an upto payment settled for zero without a transaction (UPTO_ZERO_SETTLEMENT=offchain) catalogs nothing (bazaar_settlement_offchain); and that a ceiling in US dollars matches the USDC listing and never the TEST6 one. The catalog’s URL and pricing defences are exercised black-box. Each payment below is one the seller’s own 402 asked for and settles; the buyer echoes a different resource URL or pays a different price, and the catalog alone judges it. Every refusal must carry its documented code and a non-empty reason, recorded as a bazaar rejection; a listing the payment reaches must never be published with the forged URL or price. The run’s own sellers listen on 127.0.0.1, so a deployed catalog reaches neither the second seller nor the redirecting one: against it those cases are skipped with that reason, and the local run records them.
pnpm evidence records both: the local run against its own Rail402, and, when RAIL402_EVIDENCE_HOSTED_URL is set, the same run against that deployment and RAIL402_EVIDENCE_HOSTED_SELLER (default https://demo.rail402.dev) as live-bazaar-hosted-stellar-testnet.json. The domain_verified checks need the two-way SEP-1 binding: the seller’s stellar.toml lists its payTo and the payTo account sets the seller’s host as its home_domain. The run’s local demo seller gets a fresh payTo that names 127.0.0.1. Before a run with --seller https://demo.rail402.dev, the deployed seller’s payTo must set home_domain to demo.rail402.dev (a set_options operation signed by that account); otherwise its listings stay origin_verified and those checks fail. Without --seller, the run starts the demo seller itself on 127.0.0.1 with a fresh payTo. Resources on 127.0.0.1 are cataloged only by a facilitator started with DISCOVERY_ALLOW_LOOPBACK=true, which is how the recorded run is made; against another facilitator the second seller’s cases are skipped with that reason. Listings persist between runs: a resource listed by an earlier run reports recorded instead of awaiting_origin_verification, and the checks accept either.

Recorded run

From tools/conformance/evidence/live-bazaar-stellar-testnet.json: 28 of 31 cases passed, 3 skipped, with 49 settlements and 17 coded rejections. From tools/conformance/evidence/live-bazaar-hosted-stellar-testnet.json: 24 of 31 cases passed, 7 skipped, with 50 settlements and 21 coded rejections.

The upto settlement contract

tools/conformance/src/upto-contract.ts checks the deployed settlement contract against its source, reading only: the committed deployment record (contracts/stellar/deployments/testnet.json) names the address and WASM hash that @rail402.dev/upto ships; the contract instance on chain runs that WASM and its instance and code are live; the WASM that stellar contract fetch downloads hashes to it; and scripts/contracts/verify.sh --network testnet rebuilds the recorded source revision in the pinned build image and gets the same bytes. With --facilitator, the service’s /health must name the same contract. The TEST6 test token is checked against its own record the same way, without the rebuild.
The rebuild needs Docker, git and jq; --no-rebuild records that case as skipped.

Recorded run

From tools/conformance/evidence/upto-contract-stellar-testnet.json: 6 of 6 cases passed, with 0 settlements and 0 coded rejections.

MCP

rejection-audit.ts --mcp spawns rail402-mcp over stdio, exactly as an MCP host runs it, configured only through its environment, with the audited service as its Bazaar. A small local seller answers with x402 402 challenges and a redirect to a metadata address. Every tool refusal must be a result with isError: true whose structuredContent.error carries a registered code the case expects, a non-empty reason, retryable and paid: "none", with content[0].text the same JSON; an unknown tool, a tools/call without a tool name and an unknown method must each be a JSON-RPC error whose data carries { code, reason }. The cases cover a missing, negative or foreign cap, a price above the caller’s cap and above the operator’s ceiling, another network, a foreign asset, a denied recipient, a private address, a redirect to one, an oversized request body and malformed arguments. Nothing is signed in any of them, so the key the server runs with is never funded. The live agent run (live-agent.ts) pays an HTTP API, an MCP tool and a metered MCP tool, finds each listing by search and reads how it came to be from /discovery/resources: when it was first cataloged, the settlement transaction that cataloged it (its version 1, which must name the listing’s payTo and open in stellar.expert), its version history, and that the run’s payment counted against it. Against a local service the run’s own payment cataloged each listing; a hosted catalog keeps its listings across runs, so there an earlier settlement to the same seller did, and the evidence says which (catalogedByThisRun). It also has the installed SDK, rail402 and rail402-mcp each refuse an offer on another network, in an asset outside the policy, to a denied recipient and of zero, a price above the per-call cap, and a price above what is left of a session another surface spent from. The first three offers come from a seller the run serves on loopback; the others are the demo seller’s own. Each refusal must carry its code, a non-empty reason and paid: "none", leave the payer’s balance where it was, and show in the surface’s own payment events (the SDK’s onEvent, rail402 --verbose, rail402-mcp at debug level) as a refused event with no signed event; the case’s signing observation keeps those events. Every receipt the SDK, rail402 and rail402-mcp return must link the Rail402 Explorer, their default (https://explorer.rail402.dev/testnet/tx/<hash> on testnet, /tx/<hash> on pubnet), and the run opens each link: the page must answer 200 and name the same hash the settlement returned. Every transaction of the run, the setup transactions included, must also open in stellar.expert’s API, an on-chain check independent of Rail402. With --network pubnet (and --bazaar and --seller, both https) the run pays a deployed seller through a deployed Rail402 from a payer the operator treasury funds through the run’s ledger with 0.1 USDC, all its session may spend. The payer is derived from the treasury seed and the run id, fresh for each run, since its seed reaches the installed packages: rail402 keys import puts its seed into a key file tagged for pubnet, rail402 pays with --yes, rail402-mcp runs with RAIL402_MCP_CONFIRM=never and the advertised upto authority pinned, and each payment counts against the run’s settlement cap. An agent on pubnet never reaches plain http or loopback, where the run’s impostor seller listens, so there the network, asset and amount refusals rest on the testnet run, and the run shows instead that rail402 refuses a configuration that would allow them (payment_policy_invalid). At the end the payer’s USDC goes back to the treasury and its account is merged (sweep-back). Tool refusals from tools/conformance/evidence/rejection-audit-stellar-testnet.json, each an isError result with a coded structuredContent.error and paid: "none": Paid tool calls by the upstream e2e suite’s MCP client and server, settled through Rail402: A local rehearsal: Rail402, its Bazaar and the demo seller ran on the machine that recorded it, so its listings existed only for the run; its transactions are on the public testnet. Each link opened on the Rail402 Explorer, which answered naming the transaction’s hash; the on-chain proof, independent of Rail402, is stellar.expert’s API. From tools/conformance/evidence/live-agent-local-stellar-testnet.json: 20 of 21 cases passed, 1 skipped, with 12 settlements and 27 coded rejections. A hosted run against https://mainnet.rail402.dev: its listings and their versions stay in that Bazaar. Each link opened on the Rail402 Explorer, which answered naming the transaction’s hash; the on-chain proof, independent of Rail402, is stellar.expert’s API. From tools/conformance/evidence/live-agent-stellar-pubnet.json: 21 of 23 cases passed, 2 skipped, with 12 settlements and 20 coded rejections. A hosted run against https://testnet.rail402.dev: its listings and their versions stay in that Bazaar. Each link opened on the Rail402 Explorer, which answered naming the transaction’s hash; the on-chain proof, independent of Rail402, is stellar.expert’s API. From tools/conformance/evidence/live-agent-stellar-testnet.json: 19 of 21 cases passed, 2 skipped, with 12 settlements and 27 coded rejections.

Playground

tools/conformance/src/live-playground.ts drives the Playground’s production page in headless Chromium, as a visitor would, served by the Playground server with its real headers and CSP. The first visit makes a test wallet on its own and sets it up (Friendbot, a USDC trustline and USDC bought on the testnet exchange); the key file saved from the wallet menu gives the canary seed. The Lab then plays each mode to its proof (a fixed price with exact, pay for what you use with upto, an agent paying an MCP tool it found in the Bazaar), refuses a cap typed below the price, and runs every refusal of “Try a refusal”: the spending policy’s checks, the session budget, the same payment sent twice and a seller asking to settle twice its cap. A tool is paid from its Bazaar listing, and a loopback literal, the cloud metadata address and a seller that redirects to another origin are pasted into the Lab and refused. Each Lab run’s swimlane must match the steps the browser tests expect, row by row. Every transaction the page links is read back from the chain in Node (the payer’s transfer, a fee paid by an account the facilitator advertises, the scheme’s shape) and must open in the Rail402 Explorer, the page’s default, answering 200 with a page that names the same hash; each also opens in stellar.expert, an on-chain check independent of Rail402. Every refusal must name its code and leave the payer’s balance where it was, except the session budget check, whose first payment is read back from the chain like any other settlement and recorded with the refusal. Last, a canary scan looks for the wallet’s seed and every payment the page sent in every request and answer, the Playground server’s trace-level logs, the console, the page’s text, the run reports, localStorage, sessionStorage and IndexedDB. Runs recorded before the current page also have the cases sell-listed and overcharge-release, which the page no longer offers.
Without flags it starts Rail402 (in memory, against the public testnet RPC, with a Friendbot-funded fee sponsor and loopback discovery), the demo seller and the Playground server in local mode on the machine running it. With --bazaar and --seller the Playground server runs locally in its hosted configuration against a deployed Rail402 and demo seller; the redirecting seller the run needs would listen on that machine, which only a local Playground’s relay may reach, so the redirect case is skipped with that reason. --playground <url> runs against a Playground that is already deployed.

Recorded runs

A local rehearsal: Rail402, its Bazaar, the demo seller and the Playground server ran on the machine that recorded it; its transactions are on the public testnet. Each link opened on the Rail402 Explorer, which answered naming the transaction’s hash; the on-chain proof, independent of Rail402, is stellar.expert’s API. From tools/conformance/evidence/live-playground-local-stellar-testnet.json: 19 of 20 cases passed, 1 skipped, with 6 settlements and 11 coded rejections. A run against https://testnet.rail402.dev: its transactions and the listings it read stay on the public testnet and in that Bazaar. Each link opened on the Rail402 Explorer, which answered naming the transaction’s hash; the on-chain proof, independent of Rail402, is stellar.expert’s API. From tools/conformance/evidence/live-playground-stellar-testnet.json: 18 of 19 cases passed, 1 skipped, with 6 settlements and 11 coded rejections.

Benchmark

tools/conformance/src/benchmark.ts runs the same workload against each facilitator named with --facilitator, from the same client in the same window: sequential verifications, sequential settlements from G… payers and from a C… smart-account payer, and batches of concurrent settlements (first facilitator only). Each payment is built before its timed call and never reused. Latency is the client’s wall time for the HTTP call, so it includes the network path; the round trip of GET /supported is recorded as that path’s baseline. Ledgers to confirm counts from the latest ledger when the request was sent to the ledger that included the transaction.

Recorded run

From tools/conformance/evidence/benchmark-stellar-testnet.json, 2026-10-14 10:12–10:35 UTC, every payment 100 base units of testnet USDC, Rail402 commit 2cbc980:

Networks

Every harness takes --network testnet|pubnet; the default is testnet, and a testnet run is the one described above: Friendbot-funded accounts, USDC from the testnet XLM/USDC pool, no secrets. The profile in tools/conformance/src/network.ts holds what differs per network: the CAIP-2 id, the passphrase, the RPC URLs, the USDC contract, the upto contract and how accounts are funded. A pubnet run never uses Friendbot or the DEX. It moves small amounts: live-matrix divides every USDC amount by 100, so a 0.1 USDC payment is 0.001 (--usdc-divisor sets the divisor and rehearses it on testnet), canonical funds each buyer with 0.01 USDC, to pair with --price '$0.001', and live-agent funds its payer with 0.1 USDC. It funds from an operator treasury, an account that already holds XLM and USDC, and is never the fee sponsor: the checks require the sponsor to hold no USDC. It refuses to start without: Caps and fee ceilings are digits only (amounts may have up to seven decimals); 0, 1e6, 300_000 or an empty value stops the run with pubnet_caps_missing, never silently falls back to a default. An upto contract set in the environment must match the published pubnet record when one exists, and before anything is spent the run reads the contract’s instance on chain and refuses it unless it runs the named WASM (pubnet_upto_mismatch). Before anything is spent it also sends each facilitator an empty /verify: a facilitator that wants a key the run does not have, or refuses the key it has, stops the run (pubnet_api_key_missing, pubnet_api_key_refused). Every harness that pays on pubnet passes the configured contract to its upto clients. One run, one confirmation. The first attempt plans the run: it draws a fresh nonce, writes a ledger .work/pubnet-runs/<run id>/ledger.json (owner-only), prints the run id and spends nothing. The id covers the commit, the network, the treasury, every cap, the fee ceilings, the upto contract and the nonce. A run with RAIL402_PUBNET_RUN_CONFIRM set to that id claims the ledger, once: an id that already ran is refused (pubnet_run_reused), so every run needs a new plan and a new confirmation. The harness processes of one pnpm evidence --network pubnet join that ledger (RAIL402_PUBNET_LEDGER), and it is closed at the end, also when a step fails or the run is interrupted; a closed ledger refuses every debit. Caps, checked before every submission. Each harness first checks what it knows it needs (accounts, USDC, settlements) against the caps, then debits each step before it is submitted, against its own caps and against the run’s ledger, which every harness process updates under one lock. One that would pass a cap stops the run with spend_cap_exceeded, and nothing is sent for it:
  • Every transaction a harness submits passes one choke point, its network client: a fee paid by the treasury is debited at the transaction’s maximum fee before it is sent and lowered to the fee the network charged once it lands; this covers funding, trustlines, contract-account deployments and everything else. A fee paid by a run account comes out of a starting balance already debited. A transaction whose fee source is neither (spend_unmetered), or any transaction before the run started, is refused.
  • Every POST /settle to the target is counted at the facilitator’s fee ceiling for its scheme before it is sent, whoever sends it: the harness, a stock seller, or the forwarder the upstream suite reaches the service through.
Accounts, and getting the funds back. Run accounts are derived from the treasury seed, the harness and a role (<harness>/<role>/<n>), so a role always maps to the same accounts and only the operator can sign for them. An account whose key the run hands to third-party code (the upstream suite’s buyer, the live agent’s payer) is derived with the run id as well (<run id>/<harness>/<role>/<n>), fresh for each run. An account is created when it is missing and set to exactly the USDC its role asks for (an excess goes back, a bare account loses any trustline). The owner keys of the run’s smart accounts are derived the same way, never random. A smart account is the test kit’s account contract (contracts/testing/ed25519-account), whose constructor binds the derived owner key in the transaction that creates it and which has no other way to set it. Before any USDC goes to a contract account, the run reads the account on chain and refuses it (pubnet_contract_owner_unverified) unless it runs that contract’s code with the run’s key as owner, or the OpenZeppelin smart account’s code. Each account and smart account is written to the run’s registry (accounts.jsonl beside the ledger: addresses and derivation paths, no secret) before it is funded. At the end of every harness, also when it throws and on SIGINT or SIGTERM, the run sends every run account’s and smart account’s USDC back to the treasury (a smart account’s transfer is authorised by its derived owner) and merges the run accounts into it. A pubnet run records a sweep-back case (check pubnet-config) that fails when anything is left outside the treasury and says how much (stranded), or when a run account it saw is gone (merged by whoever holds its key, so its funds did not come back). The deployment fees and storage rent of a smart account are spent, not stranded. After a crash, this returns the funds of every account in the registry:
The evidence of a pubnet run carries a profile block: the RPC host names, the caps, what was spent and returned, the sweep-back transactions and what was left, and the run’s ledger totals (run). pnpm report refuses a pubnet file without it, with spending above a cap, a run over its net caps, or a passing run whose sweep-back left funds behind. Sweep error messages stay in the local log; the evidence counts them. canonical (USDC only), live-matrix, concurrency, upstream-e2e (against a deployed service), rejection-audit (without the TEST6 cases), live-bazaar and live-agent run on pubnet. The last two need a deployed Rail402 and a public demo seller, both https (pubnet_target_missing otherwise), and pay in pubnet USDC only: live-bazaar never signs an option in another asset (pubnet_asset_not_allowed), and the agent’s spending policy allows USDC alone. On pubnet live-bazaar also asserts the pubnet catalog policy (plain http and mcp:// tools refused) and skips its second seller, which listens on 127.0.0.1. The harnesses that are testnet or private-network only, fault-recovery, ops, benchmark, live-playground and upto-contract, refuse --network pubnet with pubnet_not_supported before reading any pubnet setting. Every pubnet harness can be rehearsed against a fake pubnet, which spends nothing and reaches no network: tools/conformance/test/pubnet-live.test.ts runs live-bazaar and live-agent with tools/conformance/test/fixtures/fake-pubnet.ts (a fake Rail402 and demo seller behind a fetch that refuses every other request) and RAIL402_PUBNET_RUNS_DIR pointing at a directory of its own instead of .work/pubnet-runs. Each run must stop before it spends: without the settings, without a key the service wants, without a confirmation (the run is planned and the key was sent as a Bearer token), or with caps that cannot cover it (spend_cap_exceeded, and the claimed run’s ledger is closed).
pnpm evidence --network pubnet runs that reduced list against the deployed service: canonical (exact and upto, G… and C… payers), live-matrix, concurrency (one batch of five plus one duplicate per scheme), the upstream suite in mainnet mode from RAIL402_X402_PUBNET_CHECKOUT, the rejection audit, the live Bazaar and agent runs against RAIL402_EVIDENCE_PUBNET_SELLER (a public demo seller; without it both steps fail and say so) and the report. pnpm report --check --final --require-networks stellar:testnet,stellar:pubnet then needs, on each network, settled exact and upto transactions and passed Bazaar cataloging (discovery) and MCP (mcp) cases, each from a run against a deployed service. It starts no local service and uses no testnet sponsor. Without RAIL402_X402_PUBNET_CHECKOUT the upstream suite is recorded as a skipped case waiting on that dependency, which report --check --final refuses.

Pubnet harness refusals

Upstream watch

Rail402 follows the x402 specification as it changes upstream. tools/upstream-watch/watch.json lists what the conformance runs above were tested against, at the upstream release the @x402/* packages are pinned to (baselineRef and baselineCommit):
  • files: specification and e2e-suite files on the upstream branch, each pinned by the last upstream commit that touched it and its git blob SHA. They are the v2 protocol, the generic and Stellar exact scheme, the generic upto scheme, the Bazaar extension, the HTTP and MCP transports, the suite’s Stellar configuration and its guide for external facilitators.
  • pending: files Rail402 implements before they exist upstream (the Stellar upto scheme), reported once they appear.
  • packages: every @x402/* package and @stellar/stellar-sdk, at the versions of the pnpm catalog. @stellar/stellar-sdk follows its pinned major only, because @x402/stellar depends on ^16.3.0.
  • urls: the reference facilitator’s /supported, hashed over its Stellar kinds only, with keys sorted.
  • paths: upstream source directories whose unreleased commits are listed for information; they never count as drift.
  • components: the Rail402 component each entry affects, with its source paths, tests and docs pages.
tools/upstream-watch/test/watch-list.test.ts, part of pnpm test, fails when a package version differs from the pnpm catalog, when the baseline release does not match the pinned @x402/stellar, or when a component path, test or docs pattern matches no file.
The command reads the upstream branch through the GitHub API (with GITHUB_TOKEN when it is set) and the npm registry; it never checks out or runs upstream code. One run makes about fifty GitHub API calls, and GitHub allows sixty an hour without a token, so set GITHUB_TOKEN (any token that can read public repositories) when running it locally more than once an hour. A file has drifted when its blob on the branch differs from the pinned one; the comparison lists the upstream commits that touched it since the pin and a unified diff. A package has drifted when npm’s latest (or, for same-major, the newest stable release of the pinned major) differs from the pin; the comparison links the release tag’s commit. A URL has drifted when the SHA-256 of its normalised body changed. The drift set is sorted, and its fingerprint is the SHA-256 of its (kind, id, pinned, current) entries, so the same upstream state always gives the same fingerprint. Unreleased commits to the paths directories are listed but never enter the fingerprint. Every entry must be checked: a network error, a non-2xx answer, a rate limit or an empty answer (no latest version, no /supported kinds) ends the run with exit code 2 and the problems it met, never with “no drift”.

The tracking issue

--report-issue keeps one issue, labelled upstream-drift, in step with the drift: The issue lists each drifted file with its pinned and current blob, the upstream commits since the pin and a collapsed diff; each package with its pinned and upstream version, publication date and release commit; each changed URL; the affected Rail402 components with their source paths, tests and docs pages; the unreleased upstream commits, for information; and a checklist for resolving it. A person who closes the issue while its drift persists (the drift was accepted without a new pin) is respected: the workflow only closes issues once their drift is gone, so a closed issue whose fingerprint still matches, closed by someone other than the workflow, keeps the next runs quiet until the drift changes. Its first line is a hidden marker with the fingerprint, which the next run compares. Only issues the workflow itself opened (github-actions[bot]) with that marker on their first line count, so an issue anyone else writes with the label and the marker is never edited or closed. Upstream text is untrusted. Commit titles go into one-line code spans and diffs into fences longer than any backtick run they contain, so they cannot mention anyone, render HTML or links, or imitate the marker; the watcher builds every link itself, to github.com and npmjs.com. The body stays under 60,000 characters: diffs and commit lists shrink first. --dry-run prints the action, the title and the body without writing.

The workflow

.github/workflows/upstream-watch.yml runs the command with --report-issue every Monday at 06:17 UTC and on demand (workflow_dispatch, whose dry_run input defaults to true and only prints the issue). It runs in the project’s repository only, so forks never open issues, and one run at a time. Its token can read the repository and write issues, nothing more; every action is pinned by commit SHA; the checkout keeps no credentials; it installs only the watcher’s own dependencies, without install scripts; and it reads upstream through the GitHub API and the npm registry only, never checking out or running upstream code. The upstream e2e suite, which does run upstream code and needs funded keys, stays a local run (see the e2e section). tools/upstream-watch/test/workflow.test.ts checks these properties.

Known limitations

  • The stock @x402/stellar client signs for G… accounts only, so C… payers are signed by Rail402’s test client (exact) or test signer (upto), and those cases say so.
  • The Stellar upto scenarios of the upstream e2e suite need an upstream branch that adds the mechanism; until it is merged, such a run is labelled as not yet merged upstream.
  • The TEST6 token extends a holder’s balance entry whenever it is read, so its payments cost more than USDC’s; a facilitator accepting it needs fee ceilings above 1,000,000 stroops for exact and upto, rising with testnet’s rent price (<NETWORK>_MAX_TX_FEE_STROOPS, <NETWORK>_UPTO_MAX_TX_FEE_STROOPS).
  • The upper edge of the expiration window, front-running and K2 are proved on the private network only; the public RPC offers no way to pin a ledger reading or to inject a transaction at a chosen moment.
  • The MCP session budget is refused only once earlier payments have used it up; the audit records that case as skipped, and the live agent run proves it after a settled payment.
  • The runs pnpm evidence records target local replicas started from the checkout, at the tested commit. A run against a deployed service is kept beside them under its own file name (<kind>-hosted-stellar-testnet.json, mode: hosted in its evidence); pnpm evidence records the canonical run, the upstream e2e suite and the rejection audit against the service RAIL402_EVIDENCE_HOSTED_URL names, and the canonical, upstream e2e and rejection audit sections say when no such run is recorded yet.
  • Against a hosted service, the upstream suite’s three MCP tools stay in that service’s public catalog, owned by the fixed seller account described above.
  • The upstream suite’s Bazaar discovery validation runs against a local Rail402 only. Against a hosted service it is not applicable: the suite expects its HTTP listings at http://localhost URLs it builds itself, which a hosted catalog refuses as loopback origins.

Reproduce

The whole evidence run is one command, from a clean checkout of main after pnpm install. It starts a local Rail402 from the checkout (two replicas over one Postgres schema, plus a deployment that requires an API key, one with a small rate limit, and one for the Bazaar run with DISCOVERY_ALLOW_LOOPBACK=true and UPTO_ZERO_SETTLEMENT=offchain), runs the harnesses below in this order with --write, then refreshes the error-code coverage record (pnpm report first, so the pages match the evidence just written, then pnpm test, pnpm test:integration with one retry of a failed test, and pnpm codes:coverage --write), renders the pages again with pnpm report, and ends with pnpm report:check --final, which fails while any file is still in the older format, any cited commit (of an evidence file, a contract deployment record or the coverage record) is not on main, or the coverage record is older than the evidence:
The sponsor file holds the S… seed of a Friendbot-funded testnet account; it is passed to the local service only and never printed. The run accepts USDC and TEST6 (TESTNET_ASSETS) with an exact fee ceiling of 2,000,000 stroops (TESTNET_MAX_TX_FEE_STROOPS), because TEST6 payments cost more than USDC’s (see Known limitations). The operational exercises and the coverage record need the local Stellar network and Postgres; those steps fail at once when either does not answer. pnpm evidence --rehearse runs the same steps and prints each document instead of recording it; RAIL402_EVIDENCE_STEPS=canonical,live-bazaar runs a subset. tools/conformance/run-evidence.sh --help lists every setting. RAIL402_X402_UPTO_CHECKOUT is for a branch pushed to a public fork: a recording run refuses an upstream commit that no remote branch contains. A failed step leaves the evidence the other steps wrote in the working tree. Commit it, then run only the failed step and the report on the new commit, for example RAIL402_EVIDENCE_STEPS=codes-coverage,report pnpm evidence with the same settings. Each step also runs on its own. The harnesses that take --facilitator run against a Rail402 at $FACILITATOR; the others start what they need themselves:
The live agent run builds the workspace, packs the SDK, CLI and MCP server and installs them from those tarballs; their published manifests carry no source condition, so the installed packages always run their builds. With --registry https://registry.npmjs.org/ (RAIL402_LIVE_AGENT_REGISTRY for pnpm evidence) it installs the published packages of the checkout’s version from that registry instead, stops unless every Rail402 package resolved from it, and records each one’s integrity. Without --bazaar and --seller it is a local rehearsal with its own Rail402 and demo seller; with them it pays a deployed demo seller through a deployed Rail402, and pnpm evidence runs it when RAIL402_LIVE_AGENT_SELLER is set. The rejection audit’s keyed and rate-limited cases need --keyed and --limited deployments, which pnpm evidence starts; against RAIL402_EVIDENCE_HOSTED_URL it runs every other case. Each harness prints its evidence document; --write records it, from a clean checkout of main only. The packages the live agent run installs, and every dependency npm resolves for them, are third-party code to the run. The process you start never runs them: it starts the same script again as its agent process, with the same allow-list the upstream suite gets (tools/conformance/src/upstream-e2e-env.ts) and, on pubnet, the primary RPC URL. The agent process runs pack-check, npm and every case. npm runs with --ignore-scripts, so no dependency runs code while it installs, as in the workspace, and pack-check installs and smoke-tests its tarballs the same way. On pubnet the process you start holds the treasury: it funds the agent’s payer and counts each payment against the run’s caps when the agent asks over an IPC channel, and returns the run’s funds at the end. On a host that allows it, the agent process is launched in its own user, mount and PID namespaces (unshare). The PID namespace hides every other process, so the agent’s /proc holds only its own processes: it cannot find the run’s process, read its environment or its memory, and so cannot recover the treasury seed that way. In the mount namespace the directory holding the treasury secret file, and the API key file and runs directory when they are outside the worktree, are covered by an empty, unreadable tmpfs; the agent keeps the network, for npm and the RPC. Because the run holds a mainnet treasury on pubnet, this isolation is required there: a run refuses to start (pubnet_agent_unisolated), before anything is planned or spent, on a host that cannot provide it, unless the operator sets RAIL402_PUBNET_UNISOLATED_AGENT=agent-runs-as-a-separate-os-user to assert that the agent process runs under a different OS user that cannot read the treasury. On testnet, which holds no treasury, isolation is used when available and its absence is logged. Two limits remain. npm resolves the dependencies at run time within the packages’ declared ranges, not from pnpm-lock.yaml. And without namespace isolation (an opted-out pubnet run, or a testnet run on a host that lacks it), the agent process runs as the same operating-system user as the run, so code that knows or finds where the treasury file is could read it; record pubnet evidence on a host that allows namespaces, or under a separate OS user that cannot read the treasury file.

Integration tests

Beyond these runs, the integration tests (pnpm test:integration, against a private Stellar network) cover the required behaviours with real balances and events: G… and C… (smart account) payers, exact and upto, SEP-41 amounts in 6, 7 and 18 decimals, trustlines, expiry, tampering, replay, idempotent and crash-safe settlement, concurrency, front-running, and the Bazaar end to end with a real @x402/express seller. The verification rules name the test for every check.