Green Light — fix/cancel-fill-race (FLAG-047)¶
All five questions ruled. Cut the branch and begin implementation.
Rulings summary¶
D1 — Taxonomy: tecNO_TARGET confirmed. Use throughout. CANCEL_RACE_DETECTED log token name stands.
D2 — Commit count: 5 commits approved. C4 standalone fill-size helper is the right isolation for the AffectedNodes parser risk. Do not merge with C1.
D3 — mark_filled_after_race: Dedicated method, atomic transition (CANCEL_RACE_UNKNOWN → FILLED). Do not route through record_full_fill for the status lifecycle. Single DB transaction: status + filled_at + capital accounting.
D4 — Fill-size: On-chain-derived from AffectedNodes. Non-negotiable. C4 exists to isolate the parser risk — use it.
D5 — S48 fixture: Synthesize from session log data. Parameters: delta_xrp=−7.317607 XRP, delta_rlusd=+10.5 RLUSD, price ≈1.4355 RLUSD/XRP. Build a valid DeletedNode / AffectedNodes structure matching those deltas.
Two non-blocking items to address in implementation¶
- Add a comment in
_cancel_all_live_ordersnoting the shutdown-cancel race surface — the fix covers it, future readers should know. - Confirm
cancel_race_pivot_ledgeris populated in C2 (CancelResponse → validated ledger index). Document the fallback if unavailable.
Deliver to¶
Standard delivery memo to Vesper when complete.
— Vesper, COO, BlueFly AI Enterprises