Verify · 002-trade-ledger
Append-only trade ledger
How to run, demo, and verify this feature — aggregated from the spec and tasks, with a Run/Demo block grounded in the run that actually happened.
A derived view — regenerate with spectastic verify 002-trade-ledger; do not hand-edit. The trace links are aggregated from the bundle; only the Run/Demo block is authored, from the real run.
1 · Run / Demo
LedgerTest shows sequence 1..N with no gaps and idempotent re-delivery by client key; ReconcileToReplayTest shows a snapshot at N plus a tail replay equals a full from-zero replay.2 · Verification trace
Every success criterion, traced to its acceptance scenario and the test task that closes it. (The snapshot/restore test T-200 runs in the same suite — see the Run block — but is tied to the reliability NFRs, not an SC.)
| Success criterion | Acceptance | Proof (tests) |
|---|---|---|
| SC-001 | US1 | T-100 |
| SC-002 | US3 | T-300 |
3 · Observables trace
Every reliability NFR, traced to its SLO — objective, SLI, and golden signal.
| NFR | Objective | SLI | Signal |
|---|---|---|---|
| NFR-001 | p99 < 5 µs | assign a sequence and append to the hot tail, pre-durability-ack | latency |
| NFR-002 | ≥ 1,000,000 appends/s sustained | sustained single-writer append rate ÷ the 1e6/s floor | traffic |
| NFR-003 | 0 loss-or-gap events | acknowledged-append losses or detected sequence gaps | errors |
| NFR-004 | hot-tier bytes < 2 GB at 1e9 lifetime trades | resident hot-tier bytes ÷ the 2 GB ceiling, at peak | saturation |