04-CASETC-MDQ-017 · case P0
Reject stale-sequence market-data updates
test_order_book.pyHow a confirmed Fail (TC-MDQ-017) and demo S1 block release. A later Pass needs a new Run; it does not erase this Fail.
Synthetic teaching scenario · counterfactual steps
A failure, its fix and a passing test answer different questions. Explore the decision boundary without changing real records.
3-STEP GATE STATE MACHINENo-GoFix, then add a new Run for the failed case plus regression on the same risk. Keep the original Fail.
synthetic-failureDEMO-RUN-FAIL-001 → DEF-MDQ-00404-CASEReject stale-sequence market-data updates
test_order_book.py05-RUNOrder-book state regressed to stale snapshot
Exit code 1 (0.83s)06-DEFECTQA suggests S1 · demo decision, not a client sign-off
07–08Passing rerun alone cannot self-authorize Go
Expected
Reject the stale-sequence updateAfter sequence 104, sequence 103 must not overwrite current data.Actual
The stale update was acceptedSequence 103 overwrote 104, returning the order book to stale state.Impact
Users may see stale market dataRisk
RISK-OB-SEQ · S1 demoReproduction
Fail 3 of 3Linked defect
Sanitized execution output
Only logs directly supporting the failure decision are shown; secrets, internal paths, and unrelated output were removed.
case=TC-MDQ-017 start current_sequence=104expected=reject actual=accepted incoming_sequence=103stale update replaced current order-book stateresult=FAIL defect=DEF-MDQ-004FAILED tests/test_order_book.py::test_rejects_stale_update
AssertionError: stale sequence 103 was accepted after sequence 104
Expected: update rejected and current state preserved
Actual: stale update replaced current state
1 failed, 2 passed in 0.83s