10 KiB
TASK: GAP-064 — real order-evaluation/reject pipeline appears completely silent across two trading days
Staged: 2026-09-04 (urgent — likely root cause of "no trades" reports; live strategy currently running,
do not restart it until this task has captured what it needs from the live session, unless the
operator decides otherwise)
Sprint: Stage 2 — diagnostic-first; do not change order-evaluation or logging behavior until root cause
is confirmed
Owner: Kilocode
Deploy: COMMIT ONLY — do NOT run deploy-to-nt8.bat or copy build output to the live NT8 install as part
of this task.
─────────────────────────────────────────────────────────────────
THE SYMPTOM
session_20260903_143151.log (continuously running since 2026-09-03 14:31:51 ET, spanning through
2026-09-04 RTH with no restart) shows:
- Zero
SIGNAL:lines in the entire session. - Zero
REJECT:/REJECT SUMMARY:lines forOrbRangeNotEstablished,GradeFilter,MaxDailyTrades, orRegimeVeto— the reasons that should dominate a normal trading day.grep -c OrbRangeNotEstablishedandgrep -c GradeFilteragainst the full file both return0. - The only reject reasons that ever appear are
RthGuard,HistoricalReplayCatchup, andWarmupIncomplete— all three froze at a fixed count once RTH began on 2026-09-04 (RthGuard count=197from ~09:30 ET onward, unchanged through at least 14:40 ET) and never incremented again. - Meanwhile
STATE:/STATE_DETAIL:/STATE_CONTEXT:telemetry looks completely normal — realDirectionSource=PendingBreakoutevaluations appear every 5 minutes with plausible, moving scores (e.g.14:00:00.056] STATE: ... DirectionSource=PendingBreakout Score=0.391 Grade=F ...), andAvwapSlope/AvwapinSTATE_CONTEXTare visibly updating bar to bar.
This combination — telemetry alive, real evaluation/reject output completely dead — is what makes this dangerous: the session log and dashboard both look like a normal quiet day, not a broken one.
OrbRangeNotEstablished specifically should be close to impossible to have zero occurrences of. Per
SimpleORBStrategy.cs line ~600, once the ORB window closes with no confirmed breakout yet, every bar
that doesn't arm a fresh breakout candidate falls through to:
RecordSignalRejection(context, "OrbRangeNotEstablished", string.Format("No confirmed breakout close={0:F2} longTrigger={1:F2} shortTrigger={2:F2} breakoutBarSeen={3} pendingDirection={4}", ...), bar.Time);
This should fire on the large majority of RTH bars on any day without a breakout in progress. Its total absence across four-plus hours of RTH on 2026-09-04 (and however much of 2026-09-03 this session covered) is the core anomaly this task must explain.
WHY THIS IS INVISIBLE (a compounding, separate gap — same pattern as GAP-063)
NT8StrategyBase.OnBarUpdate() (~824-849) wraps the entire real-evaluation call chain — ConvertCurrentBar(),
BuildStrategyContext(), _sdkStrategy.OnBar(barData, context), MaybeWriteStateTelemetry(...),
ProcessStrategyIntent(...)/LogSignalRejectionFromContext(...) — in one try/catch whose catch block
only calls _logger.LogError(...), Print(...), and Log(...). None of these write to FileLog.
If anything in that block throws on a given bar, the session log would show exactly what we're seeing on
that bar: no SIGNAL:, no REJECT:. This is the same blind spot GAP-063 fixed for State.DataLoaded —
it was never extended to OnBarUpdate()'s own try/catch.
However, this alone would also be expected to suppress the STATE: telemetry on the same bar, since
MaybeWriteStateTelemetry(...) is called from inside the same try block, after _sdkStrategy.OnBar(...).
Since STATE: telemetry is visibly still firing normally, either:
(a) the exception (if any) is happening after MaybeWriteStateTelemetry(...) returns but during/before
ProcessStrategyIntent/LogSignalRejectionFromContext — narrowing the search significantly, or
(b) there is no exception at all, and _sdkStrategy.OnBar(barData, context) is genuinely returning
null on every bar without ever calling RecordSignalRejection(...) first — i.e. the real
post-ORB evaluation branch inside SimpleORBStrategy.OnBar() is exiting through some path that
sets neither an intent nor a reject reason, or is not being reached at all, or
(c) context.CustomData["signal_reject_reason"] is being set correctly by
RecordSignalRejection(context, ...) but is not surviving to reach
LogSignalRejectionFromContext(context) — check whether context is genuinely the same object
reference throughout OnBarUpdate()'s call chain, or whether anything between the OnBar() call
and LogSignalRejectionFromContext(context) replaces or clears context.CustomData.
This task is diagnostic-first: do not assume which of (a)/(b)/(c), or something else, it is.
READ-FIRST
src/NT8.Adapters/Strategies/NT8StrategyBase.cs~824-849 —OnBarUpdate()'s real-evaluation try/catch. Confirm the exact call sequence and what the catch block does (currently:_logger.LogError,Print,Log— noFileLog).src/NT8.Adapters/Strategies/NT8StrategyBase.cs~1503-1520 —LogSignalRejectionFromContext(context): returns immediately ifcontext.CustomDatais null or doesn't containsignal_reject_reason. Confirm this is unchanged and understand exactly what upstream state it depends on.src/NT8.Strategies/Examples/SimpleORBStrategy.cs~1040-1052 —RecordSignalRejection(context, reason, detail, barTime): setscontext.CustomData["signal_reject_reason"]/["signal_reject_detail"]/["signal_reject_bar"]/["signal_reject_line"]directly on the passed-incontext. Confirm every code path inOnBar()that can returnnullcalls this first — enumerate them (there appear to be at least:RthGuard~396,CmeHoliday~407,OrbRangeNotEstablished(window building) ~432, invalid ORB ~442,MaxDailyTrades~476/492,OrbRangeNotEstablished(no confirmed breakout) ~600,RegimeVeto~640/649,GradeFilter~677) and check for anyreturn null;(or equivalent early exit) that does NOT go throughRecordSignalRejectionfirst — that would be a direct, provable cause.src/NT8.Adapters/Strategies/NT8StrategyBase.cs~1037-1094 —MaybeWriteStateTelemetry(barData, context): confirm it does not mutate the sharedcontext.CustomData(its ownBuildStateTelemetryIntentbuilds a separateStrategyIntentwith its own freshMetadatadictionary) — rule out or confirm telemetry as a source of clobbering the reject-reason keys set moments earlier by the realOnBar()call on the samecontextobject.session_20260903_143151.log(device log directory) — the full session this task is investigating. Confirm the exact bar/timestamp (if any) after whichSTATE:telemetry keeps appearing but no furtherRthGuard/HistoricalReplayCatchup/WarmupIncompletecounts increment either (all three froze simultaneously right around RTH open on 2026-09-04) — this simultaneity is itself a clue: if it were purely "the real evaluation path throws,"WarmupIncomplete/HistoricalReplayCatchupfreezing at the same moment RTH began, rather than continuing to update from other bar-processing branches, may mean something specific changes state right at the RTH transition.
THE INVESTIGATION
- Reproduce or trace, from source alone if reproduction isn't practical, whether
SimpleORBStrategy.OnBar()is being called at all on RTH bars after ORB close today, and if so, whether it is reaching aRecordSignalRejection(...)call before returningnull, or returningnullthrough some other path. Add temporary, clearly-marked diagnostic instrumentation only if needed to pin this down — do not leave debug-only code in the final commit. - If a genuine exception is being thrown and silently swallowed by
OnBarUpdate()'s catch block, identify what is throwing and why — and separately, note that the catch block'sFileLog-blind behavior is itself a real, general defect (same class as GAP-063) that should be fixed regardless of what today's specific exception turns out to be: add aFileLogline to that catch block with the exception message/type, so a future occurrence is visible on disk immediately instead of requiring source archaeology like this task. - If no exception is being thrown and
OnBar()is genuinely returningnullwithout recording a reason, find the exact code path responsible and explain why it doesn't callRecordSignalRejection. - Cross-check against
trades_Simple_ORB_NT8_20260903.jsonlandtrades_Simple_ORB_NT8_20260904.jsonl(the latter does not exist as of this task being staged) and confirm whether this silence is confined to the rejection/signal logging layer only, or whether it indicates the strategy has not been evaluating trade candidates at all — these have different severities and different fixes. - Determine whether this is connected to, or fully independent of, GAP-054-FOLLOWUP (the 2026-09-01 trailing-stop validation failure, also currently under diagnostic investigation). They may be unrelated; do not assume a shared root cause without evidence.
DO NOT
- Do not change order-evaluation, sizing, or risk logic based on a hypothesis alone.
- Do not deploy anything as part of this task.
- Do not restart the live NT8 strategy as part of this investigation unless the operator explicitly asks — the currently-running session is the only evidence of this behavior in its natural state; a restart may clear whatever condition is causing it before it's understood.
VALIDATION (operator, after root cause is confirmed and a fix, if any, is proposed)
Confirm a subsequent live/SIM session produces REJECT:/REJECT SUMMARY: lines for OrbRangeNotEstablished
at a normal cadence on a quiet no-breakout day, and that a deliberately low-grade real breakout produces a
REJECT: reason=GradeFilter line, matching historical behavior (e.g. the pattern documented in
DEC-20260825-04).
GOVERNANCE
Track as GAP-064 in SPRINT_BOARD.md as its own entry (this is a distinct defect class from GAP-054's
runner-trail issue, not a sub-item of it). Reference the new decision entry (DEC-20260904-01) in the
commit and in decisions.md.