Skip to main content
Spoke combines shared-schema tests, contract tests, API integration tests, frontend client/state tests, browser checks, and recorded testnet journeys. Each layer catches a different kind of failure.

Test matrix

Run the standard layers

From the application repository:
Contract formatting can be checked with forge fmt --check inside packages/contracts. The generated ABI must match the compiled source after contract changes.

API integration environment

Use a disposable PostgreSQL database. The API README documents TEST_DATABASE_URL; gas tests additionally require a separate Anvil instance configured as chain 10143 through TEST_GAS_RPC_URL.
Create the disposable database before running the command. Do not target production or a database with data you need to preserve. Normal local application development uses Anvil chain 31337; gas-service tests intentionally use a different chain setting and should not share that process accidentally.

Acceptance scenarios for a settlement change

  • Full and short referral paths produce exact integer allocations.
  • Direct purchase reserves zero reward.
  • Buyer, merchant, duplicate, wrong-campaign, and invalid-path conditions are rejected correctly.
  • Refund succeeds before unlock and fails at the boundary.
  • Finalization fails before unlock and succeeds at/after the boundary.
  • Refunded and finalized outcomes cannot overlap.
  • Claims cannot spend a balance twice.
  • Unused-budget withdrawal preserves reserved and claimable liabilities.
  • Policy scheduling enforces notice and keeps old sales unchanged.
  • A reorg/replay restores canonical views without deleting offchain accounts.
  • Refund revokes private delivery even if a previously issued grant has not expired.

Evidence to keep with a release

Keep the exact commit, test commands/results, environment identity, transaction hashes, and observed limitations. The public proof page links checked artifacts for the scripted deployment. Do not replace those artifacts with screenshots of fixture amounts as a claim of commercial adoption. No single green test suite establishes mainnet readiness. Independent review, deployment controls, recovery exercises, capacity analysis, and explicit release approval remain separate gates in the roadmap.