Skip to main content

Test matrix

Full workspace

Rust

The six Rust tests cover the program ID, R1 stat-leaf golden value, expression arithmetic, settlement conservation, terminal phase allowlist, and canonical stat-key metadata.

Surfpool

The suite builds the actual SBF, deploys it into an offline Surfpool network, creates a real six-decimal SPL mint and token accounts, and executes the public SDK’s create, buy, resolve, claim, and void transaction methods without monkey-patching. Covered scenarios:
  1. Reject a non-contiguous outcome partition.
  2. Reject a stat-key and side mismatch.
  3. Create a five-band total-corners market.
  4. Create a three-outcome 1X2 market.
  5. Buy different stake amounts from two funded wallets.
  6. Send an unsolicited token unit directly to the vault and prove it cannot block settlement.
  7. Reject a buy after entry closes.
  8. Reject a terminal proof whose authenticated timestamp predates entry close.
  9. Resolve using a terminal two-stat proof anchored in a TxLINE-owned roots PDA fixture.
  10. Rebuild and verify the compact on-chain evidence commitment from the instruction bytes.
  11. Reject proof settlement at the timeout boundary before executing the refund path.
  12. Assert winning outcome and market state.
  13. Assert exact fee and resolver-tip balances.
  14. Reject a losing claim.
  15. Pay the hand-calculated proportional winner amount.
  16. Reject a second claim.
  17. Represent Draw / Not draw with multiple bands pointing to one outcome.
  18. Void and refund a one-sided book.
  19. Void a two-sided unresolved book after timeout, refund both tickets, and sweep donated dust.

SDK

The default SDK suite covers semantic AI-output compilation, every expression operation, period prefixes, five named outcomes, unsupported-output rejection, complete partitions, UTF-8 label limits, prompt-injection quoting, deterministic vague-request rejection, immutable custom labels, malformed model output, provider auth/rate-limit/JSON-validation failures, cancellation, total deadlines, secret-safe errors, program fee/tip parity, IDs, timestamps, exact money math, zero liquidity, large u64-safe values, and instruction accounts. Real model and TxLINE calls are separate credential-gated commands:
test:ai requires SLIP_RULE_PROVIDER and SLIP_RULE_MODEL; Groq mode additionally requires GROQ_API_KEY, while gateway mode requires AI_GATEWAY_API_KEY. test:ai:groq sends real natural-language requests to the selected Groq model. Run it separately with openai/gpt-oss-120b and qwen/qwen3.6-27b to verify both models. test:txline requires TXLINE_DEVNET_ORIGIN and an activated TXLINE_API_TOKEN. These commands fail when their real boundaries are absent rather than substituting a model or HTTP fixture. The live AI suite honors SLIP_RULE_TIMEOUT_MS; use 120000 for the configured Groq models so transient inference latency does not impose the 30-second default. The live matrix contains eleven cases per model: six supported interpretations (including novel “find the net” wording), exact custom labels, first-event rejection, player-prop rejection, prompt injection, unsupported possession, and an ambiguous request. Expected rejection lines print the model, stable code, retryability, and safe message.

Keeper and web

Keeper tests cover terminal-priority policy, unknown TxLINE status, durable retry persistence, and HTTP readiness. Web tests cover fixture orientation, token amount parsing, market projection, proportional payouts, the Framework Kit transaction boundary, AI compile API discovery, public routes, pagination, and CORS. The devnet web integration is intentionally gated until the public program is upgraded. It fails with a precise blocker instead of validating accounts from another program as unified markets.