Files
nt8-sdk/TASK_GAP035_GAP034_PROMPT.md

5.5 KiB

TASK: GAP-035 / GAP-034 — Finish Rejection-Reason File Logging, Then Close the

Silent Zero-Trade Defect

Staged: 2026-08-16

Sprint: Weekend batch 2026-08-15 to 08-17 (strategy DISARMED) — HIGHEST PRIORITY

─────────────────────────────────────────────────────────────────

Critical framing — read this first

This is the true blocker in the chain: GAP-035 blocks GAP-034, GAP-034 blocks RB-4.1, RB-4.1 blocks Gate Run #3. Three sessions (08-03, 08-04, 08-13) produced zero trades on days with clear NQ breakouts and the root cause is still unidentified. current_status.md has the full proven/ruled-out analysis and the four remaining candidates — read it before writing any code. docs/00-governance/decisions.md entry DEC-20260814-01 is the formal decision record for this pair of gaps; its required action is quoted in full below. Do not re-derive the plan — execute it.

This task depends on TASK_GATE3_CLEANUP_PROMPT.md landing first (or at least the runtime-diff portion of it) since the current uncommitted NT8StrategyBase.cs/SimpleORBNT8.cs changes may already contain partial GAP-035 work. Check git log and the working diff before starting so you don't duplicate or conflict with what's already in flight.

GAP-035 — finish it first

All four zero-trade candidates currently log via _logger only and never reach the session file. That means a silent no-trade day cannot be diagnosed after the fact unless someone had the NT8 Output window open live, which defeats the point of file-based provenance.

Route every signal-rejection reason through FileLog alongside _logger, for all rejection paths, not just the four current candidates — any future rejection path should get file logging for free. Confirm:

  • Existing SIGNAL/SUBMIT/FILL/PNL_UPDATE/BREAKEVEN/RUNNER-closed/CONNECTION lines remain byte-for-byte unaffected (this is a hard constraint carried over from DASH-002 — the dashboard and logtriage both parse these lines and must not break).
  • Rejection-reason lines are gated the same way as other diagnostic lines with respect to EnableVerboseLogging — confirm which behavior is correct by checking how existing SIGNAL-adjacent diagnostic lines behave today (verbose-gated vs always-on), don't assume.
  • A no-trade day now "self-documents": the session file alone, with no Output window involvement, should be enough to state a specific rejection reason for every evaluated bar that didn't result in a signal.

GAP-034 — then close it

Per DEC-20260814-01's required action, verbatim:

Redeploy during the disarmed window, then run one session with the Output window open as a cross-check that file and Output agree.

Concretely:

  1. Deploy the GAP-035 build during the current disarmed window (2026-08-15 to 08-17 — confirm you still have time before Monday market open; if not, coordinate re-arm timing with the operator rather than deploying into a live/armed session).
  2. Run one full session with the NT8 Output window open, watching live.
  3. In parallel, let the new file logging run.
  4. After the session, diff what the Output window showed against what the session file recorded. They must agree — this is the cross-check, not a formality. If they disagree, that disagreement is itself the next diagnostic lead; report it exactly, don't paper over it.
  5. With rejection reasons now on record, evaluate against current_status.md's four remaining candidates and rule in/out based on actual logged reasons from a real session, not further hypothesis.
  6. If the session produces a genuine breakout day with a rejection reason logged, that's very likely the root cause. If it's another silent zero-trade day, the newly-logged rejection reasons should say why for the first time — report the exact reason string(s).

Explicit non-goals

  • No behavior changes beyond routing existing rejection paths to FileLog. This is an observability task, not a signal-logic change — do not "fix" a candidate cause speculatively while adding logging; log first, diagnose from real data second.
  • Do not touch MaxDailyTrades, risk_mode, or ConfigHash logic here — those are GAP-032/036/038, tracked and worked separately.

Validation

  • Full test suite still passes (500+ expected, confirm exact count).
  • Manual NinjaScript compile check passes.
  • Existing log line formats unchanged — diff a pre- and post-change session log side by side and confirm only new rejection-reason lines were added, nothing else changed.
  • Deployed source hash matches repo (preflight.ps1's hash check should pass once the freeze from TASK_GATE3_CLEANUP_PROMPT.md is in place).
  • The live-session Output-vs-file cross-check either agrees, or the disagreement is reported explicitly as a new finding.

Governance

  • Update active_work.md: move GAP-035 to done, GAP-034 from "Blocked on GAP-035" to whatever its real post-session state is (closed, or reduced to a smaller specific candidate).
  • If the cross-check session identifies the actual root cause, add a decisions.md entry documenting it and update current_status.md's "proven/ruled-out" table accordingly — this directly unblocks RB-4.1 and Gate Run #3, so document it precisely enough that the next reader doesn't have to re-derive the reasoning.
  • If GAP-034 closes, flag this back immediately — RB-4.1 (Gate Run #3 configuration freeze) can proceed as soon as TASK_GATE3_CLEANUP_PROMPT.md's clean freeze is also in place.