Tasking — fix/cancel-fill-race (FLAG-047)¶
Orion, you're off standby. Two branches to deliver — this one first.
FLAG-047 is SESSION-BLOCKING. S49 cannot run until it's resolved. Do this before resuming FLAG-046 ANCHOR_IDLE work.
Full tasking doc is at:
02 Projects\NEO Trading Engine\03 Branches\fix-cancel-fill-race\[C] Orion Tasking — fix-cancel-fill-race.md
Summary¶
The CANCELLED_BY_ENGINE guard (FLAG-037) has a blind spot: when a counterparty fills an order on-chain before our cancel transaction arrives, the cancel returns tecNO_ENTRY and the offer disappears — but the reconciler treats it as a successful engine cancel and fires RECONCILER_SKIP_ENGINE_CANCEL. The real fill is never recorded. Truth check fires. Session halts.
Evidence: S48 07:06:24 — delta_xrp=−7.317607, delta_rlusd=+10.5. Zero fills recorded by engine.
Fix¶
Option A: when cancel returns tecNO_ENTRY, mark order CANCEL_RACE_UNKNOWN instead of treating as success. Reconciler then does on-chain tx history check. If fill confirmed → record it. If cancel confirmed → treat as cancelled. If inconclusive → fail closed to truth check.
Your First Step¶
Answer Q1–Q5 in the tasking doc and deliver pre-code findings to Vesper before cutting the branch.
Sequencing¶
FLAG-047 → FLAG-046. Separate branches. Do not bundle.
— Vesper, COO, BlueFly AI Enterprises