← sanyoii.github.io Portfolio

Synthetic scenario / Not current CEX evidence

Test Case Fail Demo

STAGE 03 · INCIDENT & REPLAY GATE
Counterfactual Run: DEMO-RUN-FAIL-001 · demo S1 DEF-MDQ-004 · Verdict: Blocked / No-Go

How a confirmed Fail (TC-MDQ-017) and demo S1 block release. A later Pass needs a new Run; it does not erase this Fail.

Release decisions

Both projects are on Hold: approval is paused, and they will be retested after the revamp launches.

  1. Holdcex-market-data-quality-labApproval on hold; the approval expired on 2026-09-08 23:59 (Taipei time).
  2. Holdsanyoii.github.ioApproval on hold; the approval expired on 2026-09-13 20:40 (Taipei time).

HoldHold: not approved for release for now.

  1. HoldArchived democex-market-data-quality-lab

    Decision makerWilliam

    Decision date

    Expiry

    Next stepDo not re-approve in this revision. Retest after the revamp launches and record a new approval period; keep the historical approval.

  2. HoldArchived demosanyoii.github.io

    Decision makerWilliam

    Decision date

    Expiry

    Next stepDo not re-approve in this revision. Retest after the revamp launches and record a new approval period; keep the historical approval.

Pinned snapshot: 2026-09-07 · SHA fc1e060 & 643b017 · expired self-review, not a current Go

computed on 2026-10-29

Synthetic teaching scenario · counterfactual steps

Decision replay

A failure, its fix and a passing test answer different questions. Explore the decision boundary without changing real records.

3-STEP GATE STATE MACHINE
Required case failed · No-GoNo-Go

Fix, then add a new Run for the failed case plus regression on the same risk. Keep the original Fail.

synthetic-failure
▸ PART 1 · 4-STAGE COUNTERFACTUAL INCIDENT & GATE PIPELINE (CLICK TO EXPAND)How TC-MDQ-017 becomes DEF-MDQ-004 and a Blocked exit
DEMO-RUN-FAIL-001 → DEF-MDQ-004
STAGE 01 · TRIGGER CASE04-CASE

TC-MDQ-017 · case P0

Reject stale-sequence market-data updates

Suite Targettest_order_book.py
Case prioritycase P0
Reproducibility3 / 3 Fail
04-test-case.mdTC-MDQ-017
STAGE 02 · STATE DIFF05-RUN

Seq 103 Overwrote 104

Order-book state regressed to stale snapshot

ExpectedReject seq 103 < 104
ActualAccepted seq 103
Pytest StatusExit code 1 (0.83s)
STAGE 03 · BLOCKER DEFECT06-DEFECT

DEF-MDQ-004 (Triaged)

QA suggests S1 · demo decision, not a client sign-off

Severity / StateS1 · Triaged · demo
User ImpactStale amounts on the book
Accountable OwnerWilliam (Demo)
06-defect-report.mdDEF-MDQ-004
STAGE 04 · GATE VERDICT07–08

Enforced HOLD / NO-GO

Passing rerun alone cannot self-authorize Go

× NO-GO / HOLDFix, then a new Run plus same-risk regression
07-release-quality-summary.mdExit unmet
PART 2 · SPLIT EXPECTED / ACTUAL STATE DIFF, DEFECT & PYTEST EXECUTION LOGTC-MDQ-017 · Exit Code 1
Side-by-side comparison of expected contract vs. actual stale state overwrite and sanitized pytest trace

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 data

Risk

RISK-OB-SEQ · S1 demo

Reproduction

Fail 3 of 3

Linked defect

DEF-MDQ-004 · Stale update overwrites current state

Status
Triaged
QA suggestion
S1 · stale book overwrote amounts · QA · 2026-10-25 demo
Client decision
None recorded · demo/fictional
Final
S1 · demo only, not a client ruling
Owner
William (Demo)
Next
New Run for the failed case; original Fail kept. Regression: same RISK-OB-SEQ cases.

Sanitized execution output

Execution Log

Exit code 1

Only logs directly supporting the failure decision are shown; secrets, internal paths, and unrelated output were removed.

Command
python -m pytest tests/test_order_book.py::test_rejects_stale_update -q
Source
DEMO-RUN-FAIL-001 · sanitized excerpt
  1. INFOcase=TC-MDQ-017 start current_sequence=104
  2. ASSERTexpected=reject actual=accepted incoming_sequence=103
  3. ERRORstale update replaced current order-book state
  4. INFOresult=FAIL defect=DEF-MDQ-004
View raw log excerpt
FAILED 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