9.0 KiB
TASK: GAP-064-FOLLOWUP-2 — trace why a whole RTH day produced zero REJECT/SIGNAL lines
Staged: 2026-09-08 — narrower follow-up to GAP-064; the first-pass FileLog visibility fix
and its regression test are confirmed good (recommend committing them now), but the
core question — why did 2026-09-04's entire RTH day produce zero REJECT:/SIGNAL:
lines despite 75 apparently-live STATE: evaluations — is still unanswered.
Sprint: Stage 2 — diagnostic-first; do not change order-evaluation or logging behavior beyond
what is needed to answer this question
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. Commit the already-verified GAP-64 FileLog fix and its regression
test now if not already committed (no commit exists as of this writing).
──────────────────────────────────────────────────────────
WHY THIS TASK EXISTS
Your prior report ("the safe GAP-64 observability slice") was independently verified line-by-line
against the actual diff, source, and session log (see DEC-20260908-01 in decisions.md). Three
things you reported check out exactly as claimed:
- The
FileLogline added toNT8StrategyBase.OnBarUpdate()'s catch block — genuine, correctly placed, matches the original task. - The new regression test (
NT8StrategyBaseOnBarUpdateVisibilityTests.cs) — legitimate, non-tautological, in the established GAP-057 source-text pattern. - "Today maps to a CME holiday" and "the 2026-09-03 trade belongs to the older
20260831_082650session" — both independently re-confirmed: 2026-09-07 is genuinely Labor Day 2026 (first Monday of September, perCmeHolidayCalendar.cs's own rule), and the trade'ssession_idintrades_Simple_ORB_NT8_20260903.jsonlgenuinely matchesprovenance_Simple_ORB_NT8_20260831_082650.json, not the session under investigation.
None of that, however, answers GAP-064's actual question. Your "Findings" section states that
SimpleORBStrategy.OnBar()'s source paths all call RecordSignalRejection before return null,
and that MaybeWriteStateTelemetry() doesn't clear the real rejection context — both statements
about what the source appears to do, not about what actually happened at runtime on 2026-09-04.
THE PRECISE, NOW-BOUNDED SYMPTOM
Independent verification pinned the anomaly to an exact, reproducible window in
session_20260903_143151.log (which — new finding — actually runs through
SESSION END 2026-09-07 20:36:36 ET, five days, not just through 09-04 as originally framed):
REJECT SUMMARY: reason=RthGuard count=197at 2026-09-04 10:00:00.109 ET (ORB window close — the last non-RTH-guarded reject before RTH begins evaluating real setups).- The next
RthGuardincrement (count=200) does not appear until 16:15:00.239 ET the same day (RTH close, when RthGuard-eligible non-RTH bars resume) — a gap that is itself expected, since RthGuard only rejects non-RTH bars and this window IS RTH. - Inside that exact 301-line window (line 12774 to line 13075 of the log): 75
STATE:telemetry lines (matching the expected ~5-minute cadence for 6h15m almost exactly — real, movingDirectionSource=PendingBreakout/OpeningRangeMidpointevaluations with changing scores) and zeroREJECT:orSIGNAL:lines of any kind.
This is not one bar with a swallowed exception. It is total silence across 75 consecutive, apparently-live evaluations spanning an entire RTH trading day. That weighs against "an exception was occasionally thrown and silently caught" (which would plausibly be intermittent, not 75/75) and toward one of:
(b) SimpleORBStrategy.OnBar() is genuinely returning null on every one of these 75 bars
through some path that does NOT call RecordSignalRejection first — meaning your source
audit either missed a path, or the path taken differs from what a static read suggests
(e.g. an early-return guard, a different branch than expected given the day's actual price
action, or state left over from the prior session/day affecting which branch is taken), or
(c) RecordSignalRejection genuinely is being called and does set
context.CustomData["signal_reject_reason"], but that key is not surviving to reach
LogSignalRejectionFromContext(context) — e.g. context is not the same object reference
by the time LogSignalRejectionFromContext runs, or something between the OnBar() call
and that logging call replaces or clears context.CustomData.
This task is diagnostic-first: do not assume which of (b) or (c) it is, and do not assume a static source read that "should" cover every path is proof that it does at runtime.
READ-FIRST
session_20260903_143151.loglines 12774-13075 (2026-09-04, 10:00:00 ET through 16:15:00 ET) — the exact window this task investigates. Confirm the same boundary and line count independently before proceeding (grep -n "\[10:00:00\.109\] REJECT SUMMARY"andgrep -n "\[16:15:00\.239\] REJECT SUMMARY: reason=RthGuard"should reproduce lines 12774/13075). Read a representative sample of theSTATE:/STATE_DETAIL:/STATE_CONTEXT:triplets in this window in full, not just theSTATE:summary line — note the exactDirectionSourceand score progression bar to bar.src/NT8.Adapters/Strategies/NT8StrategyBase.csOnBarUpdate()'s real-evaluation block — re-read with fresh eyes specifically for: iscontextthe exact same object instance passed into_sdkStrategy.OnBar(barData, context)that is later passed intoLogSignalRejectionFromContext(context)? Is there any reassignment, cloning, or replacement ofcontext(or ofcontext.CustomDataspecifically) anywhere between those two calls, including insideMaybeWriteStateTelemetry(barData, context)if it takescontextby reference and could touch the same dictionary instance rather than building an isolated copy?src/NT8.Strategies/Examples/SimpleORBStrategy.csOnBar()— re-trace the exact branch aPendingBreakout-direction, no-confirmed-breakout bar takes on 2026-09-04's actual price action (use the realOrbHigh/OrbLow/price levels visible inSTATE_CONTEXTfor that day, not a generic case). Confirm which specific line actually executesreturn null(or falls through to one) for bars in this window, not merely that "a"RecordSignalRejectioncall exists somewhere reachable in the method.- Confirm whether
_sdkStrategy.OnBar(barData, context)is even reached at all on these bars — e.g. instrument with a temporary, clearly-marked diagnostic (removed before commit, or gated so it cannot land in the final diff) if source reading alone cannot settle it, per the original GAP-064 task's allowance for this.
THE INVESTIGATION
- Determine definitively whether
SimpleORBStrategy.OnBar()is called on each of the 75 bars in the bounded window, and if so, which exactreturnstatement is hit each time. - If a
RecordSignalRejectioncall IS reached but noREJECT:line results, tracecontext.CustomData["signal_reject_reason"]from the point it's set through toLogSignalRejectionFromContext(context)and identify exactly where it stops surviving, if it does. - If
OnBar()is not being reached at all (contradicting the prior report's finding), determine what precedes it inOnBarUpdate()that could short-circuit before reaching_sdkStrategy.OnBarwithout throwing an exception the newFileLogline would have caught. - State a definitive root cause, not a list of ruled-out hypotheses. If genuinely unable to reach one from source and log evidence alone, say so explicitly and propose the smallest additional diagnostic (temporary logging, a targeted unit test reproducing 2026-09-04's actual ORB/price conditions) that would.
- Once a root cause is confirmed, propose (do not implement without operator sign-off) a fix.
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 treat "the source appears to cover every path" as equivalent to "verified at runtime" — that gap is exactly what this follow-up exists to close.
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 RTH day, matching the pattern
documented in DEC-20260825-04/DEC-20260823-08.
GOVERNANCE
Track as GAP-064-FOLLOWUP-2 in SPRINT_BOARD.md, directly under the existing GAP-064 entry
(not a new top-level item — this is the same investigation, narrowed). Reference DEC-20260904-01
(original finding) and DEC-20260908-01 (this follow-up's origin) in the commit and in
decisions.md.