P13 hostile-account coverage inventory#
This inventory is source-bound to program/src/instruction.rs and
program/src/processor/mod.rs. The owner/discriminator matrix in
program/tests/owner_discriminator_coverage.rs now requires one row for every
declared live route, including staged V2 routes and oracle observation routes.
There are no instruction tombstones: every unknown byte 0x63–0xFE is
rejected by the dispatcher and reaches no processor before account access.
The ordered account grammar is generated from the active TypeScript builders
by scripts/generate_docs_instruction_accounts.mjs; the resulting
91-route appendix is instruction-accounts.
The account-reader contract remains independently checked by
scripts/account_reader_contract.mjs --check.
Negative-case coverage#
program/tests/adversarial_account_aliasing.rs is the runtime matrix for
wrong-market/user bindings, duplicate writable aliases, token-account and
mint substitutions, frozen token accounts, Token-2022 substitutions, and
baseline rollback assertions across place, close/force-close, settle-position,
redeem, mint, withdraw, and token routes. The source-bound owner matrix covers
the corresponding owner, discriminator, PDA, version, and dispatch boundary.
The matrix also executes funded-uninitialized and ProgramData-shaped market
substitutions, while the immutable native-policy validator rejects wrong PDA,
market/config binding, feed/hash, reserved-layout, and head-alias inputs.
The inventory distinguishes parser-live routes from executable routes. The
current dispatch implementation enables the legacy settlement/trading routes,
oracle observation routes, PlaceOrderV2/batch/swap/limit/cancel V2 routes,
and CreateMarketV2. MergeCompleteSet and CloseMarketV2 currently parse
then return
InstructionNotYetEnabled; they are not counted as executable coverage.
The following rows remain execution-gated and are not claimed as runtime coverage by this checkpoint:
- Runtime coverage requires the recorded fresh SBF artifact; the current artifact executed 55 adversarial cases successfully, but is not a deployed release or external ProgramData signoff.
- V2 merge/market-close routes are inventoried and
parser-dispatched, but routes that return
InstructionNotYetEnableddo not have successful runtime lifecycle coverage here. - ProgramData/upgrade-authority substitution and funded-uninitialized-PDA cases remain external-runtime cases; no local SBF result is implied.
No row above is promoted to “covered” solely because a builder or static source check exists. A fresh SBF run and the adversarial matrix should close the execution-gated rows before launch sign-off.