ABI Maintenance#
The on-chain Rust source remains authoritative. make idl-check derives the
complete public wire inventory from program/src/instruction.rs::discriminator
and compares it with idl/seesaw.json, which holds one executable model for
every public route. Human-readable wire documentation lives in spec/IX.md.
The gate enforces:
- all 111 live public wire tags (
0x00–0x6E) are present exactly once, with internalLOGexcluded; the table has no reserved holes or tombstones; instructions[]holds one model for each of those routes: the tag, the arguments in wire order, each payload variant with the selector that picks it, and each accepted account list with its signer and writable flags;- generated clients expose builders only for those models and do not expose an arbitrary-discriminator constructor;
- an encoder that reads only the IDL reproduces the bytes and the account metas of every shared conformance-vector case;
- the accepted account counts and the signer positions of each model agree
with the Rust processors. The routes whose account grammar the source reader
cannot derive are listed in
idl/scripts/route_accounts.ts, each with a reason and with source patterns that must still match; events[]anderrors[]hold every event tag and every program error.
KNOWN_ACCOUNT_LIST_DEFECTS in idl/scripts/route_accounts.ts is empty: no
model is known to differ from its processor. The gate fails when a model and its
processor diverge, and an entry added there marks that account list as
knownDefect in the IDL so that no client builds from it.
RecoverSeat (0x33) is live. Public tags are contiguous from 0x00 through
0x6E with no reserved holes or tombstones; every byte 0x6F–0xFE is rejected
before account access, and retired legacy models cannot be restored as callable
routes.
Error definitions are likewise derived from program/src/error.rs. Account
layouts, argument codecs, and client builders are generated from the canonical
IDL where applicable and protected by deterministic regeneration,
account-reader, and shared conformance-vector gates.
Release gate#
Every candidate must pass bun --filter @seesaw/client-gen generate:check,
bun run --cwd idl validate, and node scripts/account_reader_contract.mjs --check.
These checks prevent stale generated output, a route without a model, and
drift between the IDL, the shared vectors, and current Rust sources.