Verify · 005-tax-lots

FIFO/LIFO tax lot tracking

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.

Generated from spec.html · tasks.html Derived status accepted (from spec.html — this view carries no status of its own) Read time

A derived view — regenerate with spectastic verify 005-tax-lots; 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

none — folded into the platform; realized gain surfaced behind the platform's dark REST toggle export JAVA_HOME="$(asdf where java temurin-21.0.9+10.0.LTS)" && mvn test -Dtest=TaxLotBookTest,ReconcileToReplayTest Buy 100@10, buy 100@12, sell 150; TaxLotBookTest shows FIFO realizes 650 leaving 50@12 and LIFO realizes 550 leaving 50@10 — exact to the cent — the partial-lot split, and audit records summing to cumulative realized gain.

2 · Verification trace

Every success criterion, traced to its acceptance scenario and the test task that closes it. (Opening lots on buys, T-100, runs in the same suite — see the Run block — as the foundation the relief criteria build on.)

Success criterionAcceptanceProof (tests)
SC-001US2T-200
SC-002US3T-300, T-301

3 · Observables trace

Every reliability NFR, traced to its SLO — objective, SLI, and golden signal.

NFRObjectiveSLISignal
NFR-001p99 < 40 µs at ≤ 1000 open lotsmatch, split, and record lot relief for one selllatency
NFR-00299.999% of daily reconciliations bit-match replayincremental-vs-replay P&L reconciliations matching to the centerrors
NFR-003open lots ≤ open buys; 0 lots when flatopen-lot count ÷ open (unrelieved) buys per position, at peaksaturation