Files
nt8-sdk/docs/00-governance/decisions.md

216 KiB
Raw Blame History

Architecture Decisions

Use this file to record durable project decisions that affect implementation patterns, interfaces, or workflow.

Decision Template

  • ID: DEC-YYYYMMDD-XX
  • Date:
  • Status: proposed | accepted | superseded
  • Context:
  • Decision:
  • Consequences:
  • Related Files:

Decision Log

DEC-20261026-01

  • ID: DEC-20261026-01
  • Date: 2026-10-26
  • Status: implemented — GAP-068 whole-folder verification committed; operator before/after validation pending
  • Context: tools/preflight/preflight.ps1 check 5 compared only deployed NT8StrategyBase.cs. Write-DeployedSourceHashes captured every Strategies .cs but did not compare them. This left the orphan-source failure in DEC-20260922-01 undetected; see Master Document v9.0 §1.3 Finding 1 and §4.4.
  • Decision: Compare the four .cs files copied to bin\Custom\Strategies by deploy-to-nt8.bat against repository SHA-256 values, and fail on any other .cs except @ NinjaTrader samples, the operator's @@ strategies, ORBFibPullbackV1.cs, and MinimalTestStrategy.cs (the last is retained despite the known deploy-script mismatch, GAP-073). Report each discrepancy with repository/deployed timestamps and, for unexpected files, same-name source paths and any same-type match found in deployed SDK/NT assemblies. Never delete deployed files from preflight.
  • Verification: The standalone PowerShell fixture test exercises a matching file, hash mismatch, missing deployed file, allow-listed foreign file, and unexpected file; it passed separately from verify-build.bat. The operator must run the documented preflight before P0-A and retain the failure naming SimpleORBStrategy.cs; run it again after cleanup/recompile.
  • Scope note: Manifest hashes and additional backup copies were not added; the secondary requests were deferred. deployment/Verify-Deployment.ps1's MinimalTestStrategy.cs mismatch is documented and left unchanged.
  • Related Files: tools/preflight/preflight.ps1, tools/preflight/strategy-source-verification.ps1, tools/preflight/tests/strategy-source-verification.tests.ps1, deployment/deploy-to-nt8.bat, deployment/Verify-Deployment.ps1, DEC-20260922-01, Master Document v9.0 §§1.3, 4.4.

DEC-20261026-02

  • ID: DEC-20261026-02
  • Date: 2026-10-26
  • Status: resolved — GAP-069 / P0-D closed
  • Context: Operator pushed branch cleanup/wrappers-pass2 to origin on 2026-10-26, covering 99e993b..5907e9c.
  • Decision: Mark GAP-069 closed; branch confirmed level with origin. No push performed by this task.
  • Related Files: SPRINT_BOARD.md, docs/00-governance/active_work.md.

DEC-20261024-01

  • ID: DEC-20261024-01
  • Date: 2026-10-24
  • Status: decided — GAP-077 opened and prompted (NEXT_PROMPT.md Appendix B → TASK_GAP077_BACKTEST_HISTORICAL_GUARD_PROMPT.md)
  • Context: Operator reported that backtests have stopped taking trades. Reviewed session_20261019_155354.log (Strategy Analyzer, MNQ SEP26, Jan–Oct 2026) and the deployed bin\Custom\Strategies\NT8StrategyBase.cs.
  • Finding — GAP-077 (HIGH): the header reads Account : Backtest. Strategy Analyzer assigns a non-null Backtest account. ProcessStrategyIntent()'s catch-up guard if (State == State.Historical && Account != null) (DEC-20260818-08) therefore treats every backtest bar as live catch-up replay. Result: REJECT SUMMARY: reason=HistoricalReplayCatchup count=117 — 117 intents generated, 117 blocked, zero SUBMIT/FILL. Every Strategy Analyzer run since 2026-08-18 has taken zero trades. DEC-20260818-08's premise ("Account == null during genuine State.Historical backtests") is corrected by this entry; its Action Required backtest check was never run. NT8StrategyBaseHistoricalGuardTests asserts the defective literal and so enshrines the bug.
  • Same false assumption elsewhere: ShouldAllowDailyTradeCountIncrement() returns Account == null in Historical → MaxDailyTrades never counts in a backtest (fixing only the guard would allow unlimited trades/day); daily-trade-count persistence and TrailingDrawdownMonitor registration key on Account != null and would bind an account named Backtest; the session header labels backtests LIVE/SIM (written from DataLoaded); LogRejectRateLimited() drops all non-Realtime reasons except HistoricalReplayCatchup, so a backtest cannot self-document; the GAP-060 snapshot heartbeat wrote 15,594 duplicate REJECT SUMMARY lines in one backtest.
  • Decision: single IsBacktestRun() predicate (IsInStrategyAnalyzer || Account.Name == "Backtest"), routed through all of the above; live/SIM behaviour unchanged. Commit-only; deploy once at the end of Stage 0, after the P0-A orphan sweep — otherwise the first working backtest would still execute the 2026-07-13 orphan strategy (GAP-065), which is still present in bin\Custom\Strategies as of 2026-10-24 (modified 2026-07-13, last accessed 2026-10-19).
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tests/NT8.Core.Tests/Adapters/NT8StrategyBaseHistoricalGuardTests.cs, session_20261019_155354.log, DEC-20260818-08 (corrected), GAP-076.
  • Action Required: run the prompt; operator validation per its final section (backtest trades > 0 and ≤1/day; live late-enable still blocked).

DEC-20261024-02

  • ID: DEC-20261024-02
  • Date: 2026-10-24
  • Status: implemented — P0-E completed 2026-10-26; [GAP-064] commit bf7acbb; [GOV] commit recorded below
  • Context: Repo governance was stuck at 2026-08-26: this file lacked DEC-20260904-01, DEC-20260908-01 and DEC-20260922-01; SPRINT_BOARD.md, active_work.md and current_status.md predated v9.0. The 2026-09-22 rewrites existed only in the Claude Project, so Kilocode's governance-first rules were reading state that contradicted every staged Stage 0 prompt. The three missing entries are restored below, verbatim. The Filesystem connector's write_file hung repeatedly this session while edit_file worked, so new prompts were embedded in NEXT_PROMPT.md as appendices for Kilocode to extract, and the three status documents received a 2026-10-24 header block (Master Document v9.0, already in docs/, carries the full v9.0 content).
  • Verified 2026-10-24 (read-only): HEAD still 186e1dd on cleanup/wrappers-pass2; no commit since 2026-08-26. Orphan still deployed. Session logs exist for 2026-10-05 (live SIM, pre-RTH only) and 2026-10-19 (backtest) — the strategy has been run since the 2026-09-22 "stopped" record, but none of Stage 0 has been executed.
  • Decision: TASK_P0E_TREE_RECONCILE_PROMPT.md (Appendix A) commits the GAP-064 FileLog fix and this governance sync as separate commits before any Stage 0 code task; NEXT_PROMPT.md sets the full Stage 0 run order with a single deploy at the end.
  • Implementation: Extracted Appendices A/B/C to their task files. verify-build.bat passed (581 tests: 491 Core, 80 Integration, 10 Performance). GAP-064 committed as bf7acbb; governance and staged prompts committed separately as the following [GOV] commit. Final git status --porcelain was empty.
  • Action Required: follow NEXT_PROMPT.md.

DEC-20261024-03

  • ID: DEC-20261024-03
  • Date: 2026-10-24
  • Status: observation — GAP-078 opened, unverified
  • Context: session_20261005_064006.log (live SIM, SimSimple ORB, NQ DEC26, 5-minute, 06:40–07:55 ET) logged 844 WarmupIncomplete rejections, detail Replay burst guard ageSeconds=602 bar=2026-10-05 06:45:00. The replay-burst guard rejects any bar older than 300 s. A steady ~600 s age on every bar is the signature of 10-minute-delayed CME market data.
  • Consequence if confirmed: on a delayed feed the strategy can never pass the replay-burst guard and will never trade live, silently, with a normal-looking log.
  • Decision: operator confirms the data connection is real-time CME before N-02 (folded into P0-G in NEXT_PROMPT.md). If the feed was real-time, reopen as a guard defect. No code change staged.
  • Related Files: session_20261005_064006.log, NT8StrategyBase.OnBarUpdate() replay-burst guard.

DEC-20260922-01

  • ID: DEC-20260922-01
  • Date: 2026-09-22
  • Status: decided — GAP-064 root cause found and closed at diagnosis; GAP-065 through GAP-076 opened; Master Document v9.0 published
  • Context: Mo asked for the next iteration of the Master Document, with the repo reviewed against the previous iteration and the Project's governance artifacts, all documents updated, and explicit clarity on what we were on and where we go next. Producing it required establishing repo ground truth for the first time since 2026-09-08. Two facts emerged immediately: nothing has moved in fourteen days (HEAD still 186e1dd; git status byte-identical to its 2026-09-08 state; TASK_GAP064_FOLLOWUP2_ONBAR_TRACE_PROMPT.md never picked up; the verified-good GAP-064 FileLog fix still uncommitted), and the live strategy has been stopped since 2026-09-08 19:07 ET (no session log after session_20260908_082122.log). The 2026-09-13 and 2026-09-20 weekly reviews had both run without repo access and could not see either fact.
  • The finding — GAP-065, and it reframes three months of work: investigating why GAP-064 reproduced on a fresh session (session_20260908_082122.log: 0 SIGNAL:, 0 OrbRangeNotEstablished, 0 GradeFilter, 115 STATE:) eliminated the "stale long-running session" hypothesis and forced a question nobody had asked: is the code NinjaTrader is running the code in the repository? Requesting access to C:\Users\billy\Documents\NinjaTrader 8\bin\Custom answered it in four minutes. bin\Custom\Strategies\SimpleORBStrategy.cs is dated 2026-07-13, 1,189 lines / 51,465 bytes, against the repo's 1,531 lines / 67,242 bytes. It contains zero occurrences of RecordSignalRejection (repo: 11), signal_reject_reason, OrbRangeNotEstablished, RegimeVeto, or trend_confirm_long.
  • Mechanism (verified end to end): deploy-to-nt8.bat copies only NT8StrategyBase.cs and SimpleORBNT8.cs into the NinjaScript Strategies folder; SimpleORBStrategy.cs belongs to a different project and ships inside NT8.Strategies.dll, so the deploy script never copies, backs up or verifies it. A hand-placed copy has sat orphaned in that folder since on or before 2026-07-13. NinjaTrader compiles every .cs in bin\Custom into NinjaTrader.Custom.dll (on disk, dated 2026-08-26 10:29). The orphan declares the same fully-qualified type, NT8.Strategies.Examples.SimpleORBStrategy; SimpleORBNT8.cs:23 aliases it (using SdkSimpleORB = …) and :202 instantiates it. When a type resolves both to source in the current compilation and to a referenced assembly, C# binds to the source copy, silently. The live strategy object has therefore been the 2026-07-13 implementation.
  • Consequence: LogSignalRejectionFromContext() (NT8StrategyBase.cs:1504) returns immediately unless context.CustomData holds signal_reject_reason (:1509). The running strategy never writes that key because the code that writes it does not exist in it. Every strategy-side reject reason has been absent from the log since at least 2026-07-13 — not suppressed, never generated. This is the complete root cause of GAP-064 with no residual unknown, and it explains the exact dividing line observed: adapter-emitted reasons (RthGuard, WarmupIncomplete, HistoricalReplayCatchup) survive; context-carried reasons (OrbRangeNotEstablished, GradeFilter, RegimeVeto, MaxDailyTrades) vanish. It is closed by one further fact: SIGNAL: is written unconditionally at the top of ProcessStrategyIntent in realtime (:2098–2099), so zero SIGNAL: lines across a full RTH day proves intent == null on every bar. Corroboration that one binary spans the whole window: ConfigHash 3c902e60…a641f67 and CodeVersion 8.1.9.0:7a27cca8…f749 are identical in the 2026-08-31 provenance record, the 2026-09-03 trade record and the 2026-09-08 settings export.
  • Corollary — GAP-062 was never live. Its fix (trend_confirm_long/trend_confirm_short) lives entirely in SimpleORBStrategy.cs and has zero occurrences in the deployed copy. DEC-20260826-01 recording it as "implemented and deployed by operator request" is true about the DLL and irrelevant: the type was shadowed at compile time. Three weeks of "GAP-062 SIM validation overdue" were never actionable. DEC-20260826-01 is corrected by this entry. DEC-20260825-04's Trend=0.30 short-side cap therefore remains an accurate description of the live system today.
  • Why no process caught it: tools/preflight/preflight.ps1 check 5 (510–518) SHA-256-compares the deployed NT8StrategyBase.cs against the repo — and only that file, the one file that was current. Write-DeployedSourceHashes (202–222) hashes every .cs in the folder into the freeze capture, including the orphan, and nothing ever compares those hashes to anything. The machinery existed and was pointed at the wrong file.
  • Two further new defects, both live-confirmed: (1) GAP-066 — SimpleORBNT8.OnStateChange() calls base.OnStateChange() last (:163), so the base SetDefaults overwrites four values the subclass set: RunnerTrailTicks 20→12, MinTradeGrade 5→4, MaxOpenPositions 2→3, BarsRequiredToTrade 50→1, every one confirmed against settings_Simple_ORB_NT8_20260908_082122.txt. The strategy has been trading a 12-tick trail while its own subclass asked for 20, which means every prior analysis of runner economics — GAP-054's included — used the wrong trail distance. deploy-to-nt8.bat closes by telling the operator to verify RunnerTrailTicks=20, a check unsatisfiable from source. (2) GAP-067 — eight properties are declared in both NT8StrategyBase and SimpleORBNT8 without new, so the derived declarations shadow the base ones and there are two backing values per name; CS0108 has been ignored.
  • GAP-054 is NOT explained by any of this and remains open. Its fix lives in NT8StrategyBase.cs, which is current in deployment (it differs from the working tree by exactly the one uncommitted FileLog line). The 2026-09-01 failure is genuine and independent. It is now the project's only unexplained money-relevant defect.
  • Decision: Published Master Document v9.0 (2026-09-22, 168 pages, ~42,000 words, 20 sections plus Appendices A–F), superseding v8.0 in full. Opened GAP-065 (deployed-source divergence, CRITICAL), GAP-066 (initialisation-order overwrite, HIGH), GAP-067 (property shadowing, MEDIUM), GAP-068 (deploy verification per-file and incomplete; manifest records no hashes, HIGH), GAP-069 (44 commits unpushed, no offsite copy, HIGH), GAP-070 (weekly cadence has no guaranteed artifact access, MEDIUM), GAP-071 (explicit Mode1DualLeg with qty=1 submits two contracts, HIGH, latent), GAP-072 (EnableRunner inert, LOW), GAP-073 (Verify-Deployment.ps1 vs deploy-to-nt8.bat contract mismatch, MEDIUM), GAP-074 (Slippage=0, no commission/slippage model, MEDIUM), GAP-075 (NT8.Contracts empty project, LOW), GAP-076 (unknown whether Strategy Analyzer binds the orphan or the DLL, MEDIUM, unverified). Reopened GAP-034 — same root cause class; it must not be closed as "correct Grade-A filtering" as the 2026-08-30 review proposed. Discarded the Gate 3 freeze freeze_20260816_170304 rather than amending it.
  • Consequences: Every behavioural inference drawn from live logs since 2026-07-13 describes a program six weeks older than the repository — including the DEC-20260825-04 grade-distribution study, the GAP-047 weight-rescore population, and both GAP-064 investigations. The observations stand as records of what ran; the inferences about repo source do not. v9.0 adds a new authority rule, now rank-4-equivalent: the deployed artifact outranks the repository. Source is evidence of intent, not evidence of behaviour.
  • Also resolved: live MaxTradeRisk is $250.00 (2026-09-08 export), not the $200 the register had feared since 2026-08-26. Benign; that open item is closed.
  • Also corrected: SPRINT_BOARD.md's gate table claimed a clean working tree; it is dirty and has been continuously since 2026-09-08. v7.0/v8.0's "five tools"/"nine tools" in tools/ is nine directories but seven tools — market-data/ and replay/ hold only .gitkeep.
  • Amended DEC-20260816-01: a weekly review that cannot reach the repository must say so in its first line and must not produce a gate/no-gate determination, having no basis for one. Four consecutive reviews did exactly that.
  • Next actions (v9.0 §10.1, in order): N-01 delete the orphan, sweep the folder, delete NinjaTrader.Custom.dll, restart, recompile, re-add the strategy. N-02 run one SIM day and confirm REJECT: reason=OrbRangeNotEstablished appears — that single observation closes GAP-064 and GAP-034 and validates the whole diagnosis. N-03 git push (44 commits exist on one laptop). N-04 commit the GAP-064 FileLog fix. N-05/N-06 stage the P0-C and P0-B task prompts. N-07 EnableKillSwitch=True, TraceOrders=true. N-08 decide the weekly-review access fix.
  • Related Files: docs/NT8_SDK_Master_Document_v9.0_Complete.docx, C:\Users\billy\Documents\NinjaTrader 8\bin\Custom\Strategies\SimpleORBStrategy.cs (the orphan), src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, deployment/deploy-to-nt8.bat, tools/preflight/preflight.ps1, session_20260908_082122.log, settings_Simple_ORB_NT8_20260908_082122.txt, SPRINT_BOARD.md, DEC-20260826-01 (corrected), DEC-20260904-01/DEC-20260908-01 (superseded), DEC-20260816-01 (amended).
  • Action Required: N-01 and N-02 before any further diagnostic work of any kind. No log evidence collected before the deployment is corrected is evidence about the running system.

DEC-20260908-01

  • ID: DEC-20260908-01
  • Date: 2026-09-08
  • Status: verification complete — GAP-064's defensive fix confirmed correct; core root cause still NOT identified, GAP-064 stays open (superseded 2026-09-22 by DEC-20260922-01, which identified the root cause)
  • Context: Kilocode reported "the safe GAP-64 observability slice" complete: a one-line FileLog addition to NT8StrategyBase.OnBarUpdate()'s catch block (SDK ONBARUPDATE FAILED: {ExceptionType}: {message}), a new source-text regression test (NT8StrategyBaseOnBarUpdateVisibilityTests.cs), three date-brittle test fixes attributed to "today maps to a CME holiday," a claim that "the 2026-09-03 trade file row belongs to the older 20260831_082650 session ID," and findings that "SimpleORBStrategy.OnBar() source paths all record a rejection before return null" and "MaybeWriteStateTelemetry() does not clear the real rejection context." No commit was created. Per standing practice, every claim was verified against the actual diff, source and log evidence rather than the summary.
  • Verified correct, independently: (1) the FileLog fix — git diff confirms exactly the one-line insertion claimed, correctly placed; (2) the new regression test — legitimate, non-tautological, in the established GAP-057 source-text pattern; (3) "today maps to a CME holiday" — confirmed: 2026-09-07 is Labor Day 2026 per CmeHolidayCalendar.cs's own first-Monday-of-September rule, and file mtimes show the edits were made at 2026-09-08 ~03:43 UTC = 2026-09-07 ~23:43 ET, so DateTime.Today genuinely resolved to Labor Day when the tests ran; (4) the trade/session-ID claim — confirmed via session_id=98ab6eed4e0a497e993c5120658c6a0a matching provenance_Simple_ORB_NT8_20260831_082650.json, the old session that ran 2026-08-31 08:26:48 → 2026-09-03 14:31:42 ET. The session under investigation started 9 seconds later — a clean sequential restart, not overlapping instances.
  • New finding from this verification pass: session_20260903_143151.log actually runs through SESSION END 2026-09-07 20:36:36 ET — five days, not just through 09-04 as originally framed. The anomaly window is now precisely bounded: between REJECT SUMMARY: reason=RthGuard count=197 at 2026-09-04 10:00:00 ET and the next RthGuard increment at 16:15:00 ET — the entire RTH day — the log contains 75 STATE: lines and zero REJECT:/SIGNAL: lines of any kind. Not one swallowed exception; total silence across 75 consecutive evaluations.
  • Assessment: Kilocode's "Findings" restated two things already true before the task and two accurate forensic side-notes, but none explained why the day produced zero rejects. The FileLog line is genuine and valuable forward-looking instrumentation, not a diagnosis.
  • Decision: GAP-064 remains open. Recommend committing the two verified-good deliverables now. Staged TASK_GAP064_FOLLOWUP2_ONBAR_TRACE_PROMPT.md with the exact reproducible window.
  • Also confirmed: no commit exists on the device, consistent with "no commit was created." Given the task said "Deploy: COMMIT ONLY," this is a minor process deviation.
  • Related Files: TASK_GAP064_SILENT_SIGNAL_PIPELINE_PROMPT.md, TASK_GAP064_FOLLOWUP2_ONBAR_TRACE_PROMPT.md, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, session_20260903_143151.log.
  • Action Required: (Superseded — see DEC-20260922-01. The follow-up task was never picked up; the root cause was found on 2026-09-22 by reading the deployed NinjaScript folder, which no prior investigation had done.)

DEC-20260904-01

  • ID: DEC-20260904-01
  • Date: 2026-09-04
  • Status: decided — GAP-064 prompted (root cause identified 2026-09-22, DEC-20260922-01)
  • Context: Operator reported "no trades today" and shared a dashboard "Missed B+ Setups" panel showing several Grade A/B setups between 09:55-10:15 ET labeled "Blocked by RthGuard." The actual REJECT SUMMARY: reason=RthGuard counter in session_20260903_143151.log froze at 197 right around 09:30 ET and never moved again — RthGuard was not genuinely blocking anything by 09:55. That dashboard label is a known, previously-documented approximation limitation (DEC-20260818-15, revisited in DEC-20260826-06): the panel infers the blocking reason from whichever REJECT: reason last appeared, not what is active at the moment shown.
  • The deeper finding: across the entire session there are zero SIGNAL: lines and zero REJECT:/REJECT SUMMARY: occurrences of OrbRangeNotEstablished, GradeFilter, MaxDailyTrades or RegimeVeto — reasons that should dominate any normal trading day. The only reject reasons that ever appear froze at fixed counts simultaneously around RTH open. Meanwhile STATE:/STATE_DETAIL:/STATE_CONTEXT: telemetry looks completely normal throughout, so the session log and dashboard both look like an ordinary quiet day rather than a broken one.
  • Why this is invisible — same pattern as GAP-063: NT8StrategyBase.OnBarUpdate()'s real-evaluation chain is wrapped in one try/catch whose catch block only calls _logger.LogError, Print and Log — none of which write to FileLog. Source review also confirmed LogSignalRejectionFromContext(context) only logs when context.CustomData["signal_reject_reason"] is present, and that key is set entirely by SimpleORBStrategy.RecordSignalRejection(context, …).
  • Decision: Staged TASK_GAP064_SILENT_SIGNAL_PIPELINE_PROMPT.md, diagnostic-first (Stage 2, commit-only, no deploy, and explicitly do not restart the live strategy).
  • Consequences: Very likely the actual reason for "no trades" reports — not setup quality, not RthGuard. Tracked as its own item, not a sub-item of GAP-054, since the two symptoms are evidenced independently.
  • Related Files: TASK_GAP064_SILENT_SIGNAL_PIPELINE_PROMPT.md, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, session_20260903_143151.log, DEC-20260818-15, DEC-20260826-06.
  • Action Required: (Superseded by DEC-20260922-01.)

DEC-20260826-07

  • ID: DEC-20260826-07
  • Date: 2026-08-26
  • Status: implemented and deployed by operator request
  • Context: GAP-022's original scenario coverage was partial because MID_TRADE_DISCONNECT and PRE_ENTRY_DISCONNECT could not be tested honestly while NT8StrategyBase owned connection state as a private NinjaScript-only _connectionLost field. Source review confirmed the existing guard blocked disconnected bars early in OnBarUpdate, but there was no second check immediately before order submission, leaving a narrow timing gap if connection state changed after a signal was generated.
  • Decision: Implement Option A from TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md: extract connection state into a plain, testable ConnectionStateMonitor, wire NT8StrategyBase.OnConnectionStatusUpdate() and the existing early guard through it, and add a pre-submit ConnectionLost check in ProcessStrategyIntent() before risk/sizing/order submission. Do not implement NEWS_DAY_REDUCED_SIZE; it remains a separate, larger design task requiring calendar and sizing-policy APIs.
  • Proof: Added tests showing disconnect/reconnect changes entry permission, a mid-trade disconnect blocks new entries without flattening the existing position, a pre-entry disconnect blocks a generated signal before submit with the standard ConnectionLost reason/detail, and the connected pre-entry path remains allowed. ScenarioTests.cs now leaves only the NEWS_DAY_REDUCED_SIZE TODO.
  • Verification: dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --filter "FullyQualifiedName~ScenarioTests" --verbosity minimal passed 9/9. verify-build.bat passed 580/580. dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 490/490. Deploy completed with backup 20260826_011650; NinjaTrader.Custom.dll was already absent.
  • Related Files: TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md, src/NT8.Adapters/NinjaTrader/ConnectionStateMonitor.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tests/NT8.Core.Tests/Scenarios/ScenarioTests.cs, SPRINT_BOARD.md, docs/00-governance/current_status.md.
  • Action Required: Manual NinjaScript compile after deploy. Future news-day reduced-sizing work should be prompted separately after a calendar/sizing-policy design exists.

DEC-20260826-06

  • ID: DEC-20260826-06
  • Date: 2026-08-26
  • Status: implemented — test-only repo change, deployed by operator request
  • Context: GAP-030 asked whether late strategy enable correctly hydrates the current day's ORB range from historical bars and prevents live-account orders from historical catch-up bars. Source verification confirmed the repo-side trace from DEC-20260826-03: Core SimpleORBStrategy cannot distinguish historical from realtime because StrategyContext has no such field, UpdateOpeningRange() accumulates from any delivered in-window BarData, NT8StrategyBase.OnBarUpdate() does not block State.Historical bars before _sdkStrategy.OnBar(), and ProcessStrategyIntent() blocks State == State.Historical && Account != null before risk/sizing/submission. Fetched NT8 OnBarUpdate() documentation did not expose enough body text to prove whether late enable always receives same-day historical catch-up bars, so that platform-delivery assumption remains an operator observation point.
  • Decision: Do not add redundant production hydration logic. Close the repo-side coverage gap with tests proving the existing behavior and guard placement.
  • Proof: Added SimpleORBHydrationTests proving full-window delivered bars hydrate the expected ORB high/low and mark OpeningRangeReady on the first post-window bar, and partial-window delivered bars hydrate from the bars actually delivered. Added NT8StrategyBaseHistoricalGuardTests proving OnBarUpdate() has no executable pre-_sdkStrategy.OnBar() State.Historical block and ProcessStrategyIntent() still contains the HistoricalReplayCatchup live-account guard before portfolio risk and order submission.
  • Verification: dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~SimpleORBHydration|FullyQualifiedName~NT8StrategyBaseHistoricalGuard" --verbosity minimal passed 4/4. verify-build.bat passed 576/576. Deploy completed with backup 20260826_010653; NinjaTrader.Custom.dll was already absent.
  • Related Files: TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md, tests/NT8.Core.Tests/Strategies/SimpleORBHydrationTests.cs, tests/NT8.Core.Tests/Adapters/NT8StrategyBaseHistoricalGuardTests.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, SPRINT_BOARD.md, docs/00-governance/current_status.md.
  • Action Required: Manual NinjaScript compile after deploy. On the next SIM late-enable check, confirm whether NT8 delivers same-day ORB-window historical bars as expected; if it does not, stage a new production fix based on that observed platform behavior.

DEC-20260826-05

  • ID: DEC-20260826-05
  • Date: 2026-08-26
  • Status: decided — prompted; DASH-002 re-prompt averted
  • Context: Continuing "what comes next" after GAP-025/GAP-030. Two candidates were checked against current source before prompting either, to avoid wasting Kilocode effort on stale backlog framing:
    • DASH-002 was about to be re-prompted with a refreshed deadline framing, but a git status/grep check first found EnableStateTelemetry already fully implemented in NT8StrategyBase.cs (property, default-true assignment commented "DASH-002: additive realtime observability", the MaybeWriteStateTelemetry gate, and the settings-export line) and confirmed live via this session's own prior STATE:/STATE_CONTEXT investigations (GAP-047/059/060/061 all read from telemetry DASH-002 produces). SPRINT_BOARD's "🔵 ACTIVE... no implementation has landed" framing was stale. Not re-prompted — would have been duplicate work. The refreshed TASK_DASH-002_PROMPT.md draft was reverted back to its original 2026-08-16 content since DASH-002 needs no further action.
    • GAP-022-FOLLOWUP checked out as still genuinely open: ScenarioTests.cs's own TODO block (more precise than SPRINT_BOARD's old one-liner) names NEWS_DAY_REDUCED_SIZE (needs a calendar + sizing-policy API that doesn't exist — separate, larger, undesigned scope), MID_TRADE_DISCONNECT, and PRE_ENTRY_DISCONNECT (both blocked on the missing connection-state seam). Confirmed via source read: _connectionLost is checked once early in OnBarUpdate with no re-check immediately before order submission — PRE_ENTRY_DISCONNECT's TODO description is accurate, not stale.
  • Decision: Prompted TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md, scoped to only the two seam-blocked scenarios (extract connection state into a new, plain, unit-testable class; add the missing pre-submit re-check; implement MID_TRADE_DISCONNECT/PRE_ENTRY_DISCONNECT as real execution tests). NEWS_DAY_REDUCED_SIZE explicitly excluded — flagged as a separate future task once a news-calendar/sizing-policy design exists.
  • Consequences: Avoided handing Kilocode a redundant DASH-002 re-implementation. GAP-022-FOLLOWUP's scope is now honest and matches what ScenarioTests.cs's own TODO says is actually missing, rather than the three-scenario bundle SPRINT_BOARD previously implied.
  • Related Files: TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md, tests/NT8.Core.Tests/Scenarios/ScenarioTests.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, SPRINT_BOARD.md.
  • Action Required: Await Kilocode's implementation and commit; verify by reading the diff directly per standing practice.

DEC-20260826-04

  • ID: DEC-20260826-04
  • Date: 2026-08-26
  • Status: implemented and deployed by operator request
  • Context: GAP-025 was prompted by DEC-20260826-03 after reading current NT8StrategyBase order/execution handling. The persistent session log could show SUBMIT and FILL, but not order lifecycle transitions, and FILL omitted execution.Order.Name, making scaler and runner legs indistinguishable after the fact.
  • Decision: Add realtime-only FileLog output in OnOrderUpdate() for SDK-managed order names (SDK_...) using ORDER {signal} State={state} Filled={filled}/{quantity} AvgFillPrice={averageFillPrice}. Extend the existing FILL line in OnExecutionUpdate() with Signal={execution.Order.Name}. Leave order submission and callback behavior unchanged.
  • Proof: New source-text tests confirm the ORDER line is logged before the Rejected-only branch so non-rejected transitions are covered, the FILL line includes the signal name and remains historical-replay gated, and _circuitBreaker.RecordOrderRejection, _executionAdapter.ProcessOrderUpdate, _executionAdapter.ProcessExecution, and PortfolioRiskManager.ReportFill remain present with the expected call shapes.
  • Verification: dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --filter "FullyQualifiedName~Adapters" --verbosity minimal passed 81/81. verify-build.bat passed 572/572. Deploy completed with backup 20260826_010153; NinjaTrader.Custom.dll/.pdb were invalidated.
  • Related Files: TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tests/NT8.Core.Tests/Adapters/NT8StrategyBaseOrderLifecycleTests.cs, SPRINT_BOARD.md, docs/00-governance/current_status.md.
  • Action Required: Manual NinjaScript compile after deploy. Next SIM trade with an active runner should show separate ORDER SDK_..._S_... and ORDER SDK_..._R_... lifecycle lines plus FILL ... Signal=... lines.

DEC-20260826-03

  • ID: DEC-20260826-03
  • Date: 2026-08-26
  • Status: decided — both prompted
  • Context: Operator asked what else could be pulled from the roadmap after GAP-062. GAP-025 ("Runner No-Fill Anomaly Diagnosis") and GAP-030 ("Historical ORB State Hydration") have sat in the Sprint 2.7 backlog since it was created, both still framed around a now-stale "branch-only during Gate Run #2" gate-sequencing rule. Read the actual current source before prompting either rather than reusing the old one-line descriptions:
    • GAP-025: NT8StrategyBase.OnOrderUpdate() (~1270-1301) never writes to FileLog for any order state except Rejected; OnExecutionUpdate()'s FILL line (~1306-1345) doesn't include the order/signal name. Since a trade submits two independently-named orders (SDK_{Symbol}_S_{hex} scaler, SDK_{Symbol}_R_{hex} runner), the persistent session log currently cannot distinguish which leg filled, or show a runner order's lifecycle (submitted/accepted/working/cancelled) at all outside NT8's live Output window — this is the real, previously-unspecified mechanism behind the old "no-fill anomaly" framing.
    • GAP-030: tracing SimpleORBStrategy.OnBar()'s ORB-window logic, StrategyContext, NT8StrategyBase.OnBarUpdate()'s replay-burst guard, and ProcessStrategyIntent()'s existing State == State.Historical order-block found reason to believe both halves of GAP-030's original ask (correct range reconstruction from historical bars, zero orders from historical bars) already work by construction — Core's UpdateOpeningRange() is state-blind and ProcessStrategyIntent() already refuses State.Historical orders. This has never been tested end-to-end, and rests on one assumption not verifiable from source alone (whether NT8 actually delivers same-day historical catch-up bars on a late enable).
  • Decision: Prompted TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md as diagnostic-only logging (zero trading-behaviour risk — adds FileLog calls around existing order/execution events, touches no order-management logic). Prompted TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md as a verify-first task: Kilocode must confirm or correct the traced behavior above before implementing anything, and if confirmed, the task's deliverable is test coverage proving the existing safety rather than new production logic — only implement a fix if verification finds a genuine gap.
  • Consequences: Neither task carries deploy risk on its own (GAP-025 is logging-only; GAP-030 is verify-first and likely test-only). Both replace the stale "Gate Run #2" gating language in SPRINT_BOARD.md with the current PROMPTED status.
  • Related Files: TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md, TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, src/NT8.Core/Common/Models/StrategyContext.cs, SPRINT_BOARD.md.
  • Action Required: Await Kilocode's implementation and commits for both. Per standing practice, verify each by reading the actual diff directly — DEC-20260826-02 (above) is a fresh reminder why that includes checking deploy-status claims against deployment/backups/, not just trusting the commit message or governance-doc text.

DEC-20260826-02

  • ID: DEC-20260826-02
  • Date: 2026-08-26
  • Status: resolved — deployed by explicit operator request
  • Context: Verifying Kilocode's GAP-062 commit (885e298) per standing practice (read the diff and evidence directly, don't trust the summary) found a direct contradiction. TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md's header explicitly said Deploy: COMMIT ONLY — do NOT run deploy-to-nt8.bat or copy build output to the live NT8 install as part of this task, and both SPRINT_BOARD.md's GAP-062 entry and DEC-20260826-01 (Kilocode's own governance-doc updates, committed in the same commit) state "Deploy intentionally skipped by task prompt." But the commit's own trailer reads Build: clean | Tests: 569 passing | Dual-deployed: yes, backup 20260826_005308 — and deployment/backups/20260826_005308/ genuinely exists on disk, containing a manifest.txt (timestamped matching the commit) plus pre-deploy DLL backups. Reading deployment/deploy-to-nt8.bat directly confirms the backup step only runs as the first half of a full deploy (back up existing live DLLs, then copy the new build over them, with errorlevel-checked failure exits at each copy) — the existence of a completed backup folder is strong evidence the script ran past the backup step, not proof by itself that every copy succeeded, but combined with the "Dual-deployed: yes" trailer this reads as a real deploy having completed to C:\Users\billy\Documents\NinjaTrader 8\bin\Custom, not a skipped one.
  • Why this matters: GAP-062 is explicitly a real scoring-behavior change (not observability-only) — the task and DEC-20260825-06 both required SIM before/after observation before trusting it live, specifically because it can newly qualify short setups that were previously capped below Grade A. If the live NT8 install now has this build, that validation gate was bypassed, and the documentation trail (SPRINT_BOARD.md, DEC-20260826-01) is actively wrong about deploy status — this is exactly the class of discrepancy the standing "verify via diff, not summary" practice exists to catch, and this time the summary in the governance docs themselves (not just the commit message) was wrong.
  • Resolution: Operator explicitly requested deploy and commit after the GAP-062 implementation. deployment\deploy-to-nt8.bat was run from the repo and completed successfully, creating backup deployment\backups\20260826_005308; NinjaTrader.Custom.dll was not present to invalidate. GAP-062 should now be treated as deployed to the local NT8 Custom folder, not skipped. This resolves the documentation mismatch, but it does not remove the validation requirement: because GAP-062 is a scoring-behavior change, the next strategy run should be treated as SIM validation before live trust.
  • Related Files: TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md, deployment/deploy-to-nt8.bat, deployment/backups/20260826_005308/, SPRINT_BOARD.md, docs/00-governance/decisions.md (DEC-20260826-01).
  • Action Required: Run manual NinjaScript compile and SIM before/after observation before trusting GAP-062 live. Confirm that at least one comparable confirmed-downtrend short can now score Grade A when appropriate, and that long-side Grade distribution remains sane.

DEC-20260826-01

  • ID: DEC-20260826-01
  • Date: 2026-08-26
  • Status: implemented and deployed by operator request — pending SIM observation
  • Context: GAP-062 followed DEC-20260825-04 and DEC-20260825-06: short candidates could earn the negative-slope slopeAligned bonus or the old positive-slope trend_confirm bonus, but not both, because trend_confirm was computed as avwapSlope > 0.0 ? 1.0 : 0.0 before the scorer evaluated trade side. No deployed GAP-061 telemetry evidence was available in the current NT8 session log directory (TrendConfirm/AvwapSlope not found), so implementation rested on the source-level proof and tests.
  • Decision: Implement GAP-062 by publishing side-specific trend_confirm_long and trend_confirm_short values in SimpleORBStrategy.UpdateConfluenceInputs() using the already-computed AVWAP slope, then make TrendAlignmentFactorCalculator select the side-specific value matching intent.Side. Preserve the existing TrendAlignmentFactorCalculator score structure and weights exactly: +0.4 price aligned to AVWAP, +0.3 slope aligned to trade side, +0.3 selected trend confirmation. Preserve the existing STATE_CONTEXT key shape by continuing to emit TrendConfirm as the legacy trend_confirm field, now resolved from pending/current breakout direction where available.
  • Symmetry proof: Tests now prove the three required cases. A short candidate with price below AVWAP, avwap_slope < 0, and trend_confirm_short = 1.0 reaches Trend=1.0, equal to a symmetric long with price above AVWAP, avwap_slope > 0, and trend_confirm_long = 1.0. A short candidate evaluated against an uptrend (avwap_slope > 0, trend_confirm_short = 0.0) does not earn trend confirmation and scores only the price-alignment component in the fixture. A long in a confirmed uptrend still reads trend_confirm = 1.0 in factor details and reaches Trend=1.0, preserving long-side behavior.
  • Consequences: This is a real scoring-behavior change, not observability-only. Previously B/C-capped short setups can now legitimately reach Grade A and pass MinTradeGrade=A when AVWAP slope genuinely confirms the short. Deploy was originally skipped per TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md, then completed after explicit operator request; operator SIM before/after observation is required before trusting this live.
  • Verification: dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --filter "FullyQualifiedName~Intelligence" --verbosity minimal passed 89/89. verify-build.bat passed 569/569. Existing CS1998 warnings in unrelated OMS/mock test files remain present, but the verification script reported All checks passed.
  • Related Files: TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, src/NT8.Core/Intelligence/FactorCalculators.cs, tests/NT8.Core.Tests/Intelligence/OrbConfluenceFactorTests.cs, SPRINT_BOARD.md, docs/00-governance/current_status.md.

DEC-20260825-06

  • ID: DEC-20260825-06
  • Date: 2026-08-26
  • Status: decided — hold lifted, task prompted
  • Context: DEC-20260825-04's investigation into "zero trades this week" found every real, pullback-confirmed breakout capped at Grade B/C, driven by Trend=0.30 on every best short setup on both 2026-08-18 and the week of 2026-08-25. Drafting GAP-061 (observability-only) surfaced a provable-from-source cause: trend_confirm (SimpleORBStrategy.cs:970) is avwapSlope > 0.0 ? 1.0 : 0.0 — direction-blind, unconditionally rewarding a positive slope regardless of trade side. For a short trade, this is mutually exclusive by construction with the correctly-aligned (negative-slope) +0.3 bonus in TrendAlignmentFactorCalculator.Calculate(), so a short can never earn both +0.3 bonuses even with a cleanly confirmed downtrend — capping the Trend factor at 0.30 (or 0.70 with price also below AVWAP), well below the 1.0 a symmetric long can reach. Kilocode's own GAP-061 commit writeback independently re-confirmed this finding after a fresh source read (DEC-20260825-05). The fix itself was deliberately held out of GAP-061's observability-only scope pending an explicit operator decision, since it changes real scoring behavior. Operator reviewed a full audit of all 10 confluence factor calculators (Trend is the only one with this defect; the other 9 are either direction-agnostic by design or already correctly symmetric) and, given the standing goal of profitability on SIM with zero trades taken this week, decided to lift the hold and proceed.
  • Decision: Lift the GAP-062 hold. Prompted TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md, instructing Kilocode to make trend_confirm direction-aware (reward genuine trend confirmation in the direction of the candidate trade, not merely "slope is positive") without changing TrendAlignmentFactorCalculator's additive +0.4/+0.3/+0.3 structure or weights, and without changing long-side behavior (a long in a confirmed uptrend must still score trend_confirm = 1.0). Required tests proving three things: (1) a confirmed-downtrend short now earns trend_confirm > 0.5 and reaches the same max Trend score a symmetric long would, (2) a short trading against the trend still correctly does NOT earn it (the fix must not become directionless in the other direction), (3) long-side scoring is byte-identical to before. Explicitly flagged, unlike GAP-050/GAP-061, that this is a real trading-behaviour change requiring SIM observation before/after deployment — not "none required."
  • Consequences: Previously B/C-Grade-capped short setups with a genuinely confirmed downtrend can now legitimately reach Grade A and pass MinTradeGrade, meaning the strategy may begin taking short trades it previously silently rejected all week. This is the intended effect — the scoring was wrong, not the filter — but it is a live-behaviour change and must be observed on SIM (Grade distribution before/after, at least one previously-capped short now scoring A on a comparable setup) before being trusted, per the task's VALIDATION section.
  • Related Files: TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md, src/NT8.Strategies/Examples/SimpleORBStrategy.cs (UpdateConfluenceInputs()), src/NT8.Core/Intelligence/FactorCalculators.cs (TrendAlignmentFactorCalculator), docs/00-governance/decisions.md, SPRINT_BOARD.md.
  • Action Required: Await Kilocode's implementation and commit. Per standing practice, verify by reading the actual diff and the new tests directly — do not trust the commit summary. Once verified and deployed, observe SIM Grade distribution on short setups before/after to confirm the fix behaves as intended in practice, not just in unit tests.

DEC-20260825-05

  • ID: DEC-20260825-05
  • Date: 2026-08-25
  • Status: verification complete — all five confirmed correct
  • Context: Kilocode reported GAP-050, GAP-061, GAP-057, GAP-056, and GAP-053 complete (commits a99ce1d, a673475, 0607d44, cdd9aa2, 8a1c3d1). Per standing practice, verified each by reading the actual diffs rather than trusting the commit summaries.
  • GAP-050: Confirmed, exact match to the task and the operator's Option A decision. IRiskManager now declares the 4-arg ValidateOrder; AdvancedRiskManager adds it (3-arg now delegates to 4-arg with candidateContracts=1, Tier 1 forwards to _basicRiskManager's 4-arg overload, Tier 2/3/3.5 untouched, added a candidateContracts < 0 guard not explicitly requested but harmless); NT8StrategyBase.cs's as BasicRiskManager type-check workaround is gone, replaced with a direct interface call; NT8OrderAdapter.ExecuteIntent now sizes before validating and passes the real contract count. New tests are genuinely load-bearing, not just compile checks: AdvancedRiskManagerTests proves the same intent is rejected at 3 contracts and allowed at 1; NT8OrderAdapterIntegrationTests proves the sized quantity actually reaches the risk manager and the 3-arg overload is never called; NT8StrategyBaseRiskContractTests source-asserts the type-check is gone. Live path (BasicRiskManager, direct construction) behaviorally unchanged — confirmed by reading the diff, not just trusting the note.
  • GAP-061: Confirmed, exact match. SimpleORBNT8.GetStateTelemetryContextFields() adds Avwap/AvwapSlope/TrendConfirm via a new defensive AddStateContextDouble helper — null/missing-key/non-numeric safe, omits rather than placeholders. Tests explicitly assert trend_confirm's calculation string is absent from the diff and that STATE:/STATE_DETAIL: formats are untouched — good self-verification of scope. Kilocode's own re-read independently reconfirmed the trend_confirm direction-blindness finding from DEC-20260825-04 before implementing, rather than taking the task prompt's claim at face value — appended directly to that entry.
  • GAP-057: Confirmed via stat + spot check — test-only, new NT8StrategyBaseRunnerTrailTests.cs, Option B (source-text seam) as specified, no production files touched.
  • GAP-056: Confirmed via full diff. NT8StrategyBase.cs's three breakeven properties now carry [Browsable(false)] plus an "unused" description; SimpleORBNT8.cs's settings export labels the line UNUSED (retained for compatibility). Exactly Option A as specified, no logic touched.
  • GAP-053: Confirmed via stat — executive_summary.md/roadmap.md diffs only, no source or test files touched, matches docs-only scope.
  • Related Files: commits a99ce1d/a673475/0607d44/cdd9aa2/8a1c3d1.
  • Action Required: None for correctness. Deploy remains a separate manual operator step for all five (each skipped deploy per its task's header, as instructed).

DEC-20260825-04

  • ID: DEC-20260825-04

  • Date: 2026-08-25

  • Status: finding recorded, no code change — awaiting operator direction

  • Context: Zero trades this week (Mon 8/24 + Tue 8/25 RTH). Investigated the continuous SIM session log (session_20260823_230519.log) directly rather than guessing. Found 63 genuine pullback-confirmed breakout evaluations this week (DirectionSource=PendingBreakout in STATE: telemetry, meaning SimpleORBStrategy's real two-bar breakout-confirmation logic actually fired, not the pre-ORB/synthetic diagnostic tiers). Grade distribution among those 63: 0 A, 9 B, 10 C, 39 D, 5 F — every one was correctly filtered by MinTradeGrade=A (SimpleORBStrategy.cs:677, GradeFilter). All 9 B-grade instances came from one continuous bearish stretch (10:04:59-11:05:00 ET), scores 0.70-0.77. Reading the real per-factor breakdown (STATE_DETAIL) for those: Trend=0.30 (full weight 1.00) was the single largest drag on every one — if Trend had scored near the other core factors (~0.80-1.00), several would plausibly have cleared Grade A. PriorDayCloseStrength=0.40 and NarrowRange=0.20 (both post-GAP-047-weighted) were secondary drags. This is a scoring/calibration observation, not a diagnosed defect — Trend genuinely measures AVWAP slope/alignment/confirmation and may be correctly scoring a genuinely weak-trend day; no code was changed and none is recommended without operator direction, since retuning MinTradeGrade or factor weights is a curve-fitting-risk decision, not a bug fix.

  • Separate finding (process, not scoring): Investigating why zero GradeFilter/OrbRangeNotEstablished/MaxDailyTrades reasons ever appeared in this week's REJECT SUMMARY output (despite the real per-bar logic needing to produce them constantly) led to tracing the GAP-060 fix's own state machine (_orbRejectSummarySnapshotWritten fires once per trading day in the fixed version) against this log's actual behavior (fires once ever, then silent for the rest of the week) — this matches the pre-fix GAP-060 behavior exactly, not the fixed one. Conclusion: the currently-running SIM strategy (continuously live since 23:05:19 on 2026-08-23) is still running the pre-GAP-060-fix binary, because deployment was blocked by the NinjaTrader.exe file lock (DEC-20260825-01) and never completed. The fix is correct in source and committed; it has simply never reached the running strategy. This also means this week's STATE:-telemetry-based analysis above is the only visibility we had — the intended REJECT SUMMARY cadence has not actually been restored yet.

  • Decision: None — reporting only. Recommended to operator: (1) redeploy now that NinjaTrader is closed, so REJECT SUMMARY visibility (GAP-060) is actually restored before the next SIM session; (2) separately decide whether the Trend factor / MinTradeGrade=A combination warrants review — that is a strategy-tuning call, not something to change unilaterally.

  • Related Files: session_20260823_230519.log (device log folder), src/NT8.Strategies/Examples/SimpleORBStrategy.cs (~347-690, OnBar/GradeFilter check), src/NT8.Adapters/Strategies/NT8StrategyBase.cs (~700-856, RTH/ETH telemetry branch; ~1560-1595, reject snapshot state machine), src/NT8.Core/Intelligence/ConfluenceScorer.cs, src/NT8.Core/Intelligence/GradeFilter.cs.

  • Action Required: Operator decision on whether/how to revisit Trend calibration or MinTradeGrade; redeploy GAP-060/059/051/052 (and GAP-050/053/056/057 once Kilocode lands them) now that NinjaTrader is closed.

  • Update (2026-08-25, same day): Pulled the only other trading day with usable STATE: telemetry (EnableStateTelemetry/DASH-002 only existed from ~2026-08-16 onward) — session_20260818_065020.log, 2026-08-18. Same pattern, slightly worse: 239 real DirectionSource=PendingBreakout evaluations, capping at Grade C (0 A, 0 B, 77 C, 132 D, 30 F; best score 0.655). That session predates GAP-047 (confluence weights still x1.00 across the board — confirmed directly in the Factors= string). This week's best (Score=0.774, Grade B) is a real improvement over 8/18's best (Score=0.655, Grade C) — consistent with GAP-047 helping — but still short of MinTradeGrade=A.

  • Common driver on both days: Trend=0.30 on every one of the highest-scoring real breakouts, both days, both Regime=Bearish/Direction=Sell. Read TrendAlignmentFactorCalculator.Calculate() (src/NT8.Core/Intelligence/FactorCalculators.cs ~116-186): the Trend factor is additive — +0.4 if price is on the trade's side of AVWAP, +0.3 if AVWAP slope aligns with direction, +0.3 if trend_confirm > 0.5. A score of exactly 0.30 means only one +0.3 component fired and the +0.4 price-vs-AVWAP component did not, on both days. Working hypothesis, not verified against raw avwap/avwap_slope values (not present in STATE_CONTEXT telemetry output, so this needs either a temporary diagnostic field or a debugger session to confirm): an ORB breakout is, by construction, an early-session entry (right after the 09:30-10:00 window closes) — a session-anchored AVWAP has had very little time to diverge from price that early, so the +0.4 "price is clearly on the trade's side of AVWAP" component may be structurally hard to earn on a textbook, well-timed ORB breakout even when the breakout itself is real and directionally correct. If true, this is a design tension between the ORB strategy's entry timing and the Trend factor's assumption of a well-developed AVWAP — not a coding defect in either piece individually.

  • Not decided, options for operator: (1) leave as-is and gather more days of evidence before concluding anything — two days is a thin sample; (2) instrument STATE_CONTEXT with the raw avwap/avwap_slope/trend_confirm values so this hypothesis can be confirmed or refuted directly from the log instead of inferred (small, safe, observability-only change, same class as GAP-059); (3) if confirmed, consider whether TrendAlignmentFactorCalculator's AVWAP-divergence assumption should be reweighted or time-adjusted for early-session entries specifically, or whether MinTradeGrade should account for this — both are real strategy-design decisions, not something to change without operator sign-off given the risk of curve-fitting to a two-day sample.

  • Update (2026-08-25, same day) — operator selected option (2). Drafting the instrumentation task surfaced something sharper than the AVWAP-divergence hypothesis: trend_confirm (SimpleORBStrategy.cs:970, context.CustomData["trend_confirm"] = avwapSlope > 0.0 ? 1.0 : 0.0) is direction-blind, not just a hypothesis needing log confirmation — it's provable directly from source. TrendAlignmentFactorCalculator awards +0.3 for slopeAligned (short trades need avwapSlope < 0.0) and a separate +0.3 for trendConfirm > 0.5 (which requires avwapSlope > 0.0, unconditionally). These two are mutually exclusive for any short trade by construction — a short can never earn both bonuses, even with a cleanly confirmed downtrend, capping the achievable Trend score at 0.3 (or 0.7 with price also below AVWAP) regardless of trend quality. This matches both real days' Trend=0.30 results exactly. Tracked as GAP-061, scoped observability-only per the operator's instruction — exposes Avwap/AvwapSlope/TrendConfirm in STATE_CONTEXT (does not fix the asymmetry) so the remaining unconfirmed piece (price-vs-AVWAP timing) can be checked with real numbers, and so the trend_confirm finding is visible in log evidence too. Whether to fix the asymmetry itself is a separate, not-yet-made decision — flagged explicitly in the task's writeback requirement so the operator gets a clean basis to decide.

  • Prompt: TASK_GAP061_AVWAP_TELEMETRY_PROMPT.md.

  • GAP-061 Implementation Note (2026-08-25): Implemented the selected observability-only instrumentation in SimpleORBNT8.GetStateTelemetryContextFields(). STATE_CONTEXT now appends Avwap (F2), AvwapSlope (F4), and TrendConfirm (F1) from existing context.CustomData keys when present, omitting each field entirely when the key is missing or non-numeric. The ORB-readiness gate and existing OrbHigh/OrbLow/OrbWindowStart/OrbWindowEnd/OrbReady fields are unchanged. No UpdateConfluenceInputs(), TrendAlignmentFactorCalculator, trend_confirm, scoring, STATE:, STATE_DETAIL:, risk, sizing, or order-flow logic changed. Source re-check confirms the direction-blindness finding remains: trend_confirm is still avwapSlope > 0.0 ? 1.0 : 0.0, so short trades can earn the negative-slope slopeAligned bonus or the positive-slope trend_confirm bonus, but not both. Verification: focused SimpleORBNT8DefaultsTests passed 7/7; verify-build.bat passed with 561/561 tests (472 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 472/472. Deploy intentionally skipped by task prompt.

DEC-20260825-03

  • ID: DEC-20260825-03
  • Date: 2026-08-25
  • Status: decided — Option A, prompted to Kilocode
  • Context: GAP-050 (MaxTradeRisk has no quantity term) was staged 2026-08-18 as an operator-decision item. Investigation on 2026-08-25 (prompted by "layout the options") found the original framing ("$600 vs $1,000 daily limit") is stale for the live path: SimpleORBNT8/NT8StrategyBase constructs BasicRiskManager directly (NT8StrategyBase.cs:1763) and its order-eval ternary (~2131-2136) reaches the quantity-aware 4-arg ValidateOrder(intent, context, config, candidateContracts) overload via an as BasicRiskManager runtime type-check. IRiskManager itself, however, never declared a quantity-aware member — only the 3-arg ValidateOrder(intent, context, config). AdvancedRiskManager implements IRiskManager but has no 4-arg overload and delegates Tier 1 to its inner BasicRiskManager via the 1-contract-assumed 3-arg call; confirmed via grep that new AdvancedRiskManager( appears nowhere in src/ outside its own file (only constructed in isolation by AdvancedRiskManagerTests.cs/RiskSizingIntegrationTests.cs) — not wired to live trading. NT8OrderAdapter.ExecuteIntent also validates before sizing (backwards even if quantity-aware) and is itself only reachable through BaseNT8StrategyWrapper, whose own doc comment calls it "a template that would be extended in actual NT8 strategy files" — not extended anywhere in src/. Net: today's SIM/live trading is not exposed; the real defect is an interface contract gap covered only by a type-check, plus two unwired call sites that would silently reintroduce it if ever activated.
  • Decision: Operator selected Option A — fix it properly at the interface rather than leaving the type-check workaround in place. Add the 4-arg ValidateOrder to IRiskManager itself, implement it on AdvancedRiskManager (Tier 1 forwarded to the inner BasicRiskManager's 4-arg overload, Tier 2/3/3.5 bodies unchanged), remove the as BasicRiskManager cast in NT8StrategyBase.cs in favor of a direct interface call, and fix NT8OrderAdapter.ExecuteIntent's validate-before-size ordering. Explicitly out of scope: wiring AdvancedRiskManager/NT8OrderAdapter into the live strategy — that is a separate decision this task does not make.
  • Consequences: No live-behaviour change expected — the live path's underlying call is identical, just reached without the type-check. Closes the risk of a future silent regression if AdvancedRiskManager or NT8OrderAdapter are ever wired into a live path. Requires new quantity-aware tests on AdvancedRiskManager and NT8OrderAdapter.
  • Related Files: src/NT8.Core/Risk/IRiskManager.cs, src/NT8.Core/Risk/BasicRiskManager.cs, src/NT8.Core/Risk/AdvancedRiskManager.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/NinjaTrader/NT8OrderAdapter.cs, TASK_GAP050_ADVANCED_RISK_QTY_PROMPT.md
  • Action Required: GAP-050 implemented; deploy remains a separate manual operator step.
  • GAP-050 Implementation Note (2026-08-25): Implemented Option A. IRiskManager now declares the quantity-aware 4-arg ValidateOrder; BasicRiskManager already satisfied the contract with no logic change; AdvancedRiskManager now has a 4-arg overload that forwards Tier 1 to _basicRiskManager.ValidateOrder(..., candidateContracts) and the 3-arg overload delegates to the 4-arg overload with candidateContracts=1; NT8StrategyBase now calls _riskManager.ValidateOrder(intent, context, _riskConfig, sizingResult.Contracts) directly instead of casting to BasicRiskManager; NT8OrderAdapter.ExecuteIntent() now sizes first, returns on Contracts <= 0, and then validates risk with the sized quantity. Added tests for quantity-aware AdvancedRiskManager rejection/allowance, backward-compatible 3-arg behavior, NT8OrderAdapter sized risk validation, and NT8StrategyBase source-level interface usage. Verification: focused Core tests passed 10/10; focused Integration tests passed 13/13; verify-build.bat passed with 566/566 tests (476 Core, 80 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 476/476. Deploy intentionally skipped by task prompt.

DEC-20260825-02

  • ID: DEC-20260825-02
  • Date: 2026-08-25
  • Status: implemented
  • Context: GAP-053 was flagged by the original v7.0 review as executive_summary.md/roadmap.md's Sprint 3 list presenting ~12 completed tasks as open. roadmap.md already contains its own STALE-LIST WARNING (GAP-053, added 2026-08-18) naming the specific stale items (TASK-06a, TASK-06b, GAP-003/004/005/006/008/009/010/019/022, plus GAP-011/GAP-040 separately) — it has sat unpruned since the warning was added. executive_summary.md (dated 2026-05-04, still referencing the retired v6 master doc) separately lists four of the same already-completed items under "Critical Open Issues."
  • Decision: Track as GAP-053. Documentation-only, zero trading-behaviour risk. Task requires independently re-verifying each named-stale item's completion (via SPRINT_BOARD.md's historical record and the cited DEC-20260711-01..09/DEC-20260713-02 entries) before pruning — not just trusting the warning's own claims — and flagging anything that doesn't check out rather than pruning it anyway.
  • Related Files: docs/00-governance/executive_summary.md, docs/00-governance/roadmap.md, TASK_GAP053_STALE_DOCS_PRUNE_PROMPT.md
  • Implementation Note (2026-08-25): GAP-053 pruned the stale May/July status snapshots from executive_summary.md and roadmap.md. Verified before pruning against SPRINT_BOARD.md historical records and decision entries: TASK-06a, TASK-06b, GAP-003, GAP-004, GAP-005, GAP-006, GAP-008, GAP-009, GAP-010, GAP-011, and GAP-019 are complete from the 2026-07-11 historical record; GAP-022 is partial with 5/8 verified on 2026-07-14 and remaining connection-state scenarios tracked as GAP-022-FOLLOWUP; GAP-040 is implemented/firing in production as of 2026-08-18. executive_summary.md now points at the v7.0 master reference, moves the four v6 critical issues into a resolved-since-v6 section, and lists current open items instead. roadmap.md no longer contains the STALE-LIST WARNING or the open-looking July list; it now records the pruned resolved history and leaves GAP-030/GAP-007 separate. No source code or tests changed.
  • Action Required: None. Documentation-only; no operator validation required.

DEC-20260825-01

  • ID: DEC-20260825-01
  • Date: 2026-08-25
  • Status: verification complete — all four confirmed correct; deploy still pending
  • Context: Kilocode reported GAP-060, GAP-059, GAP-051, and GAP-052 complete (commits 6c672a5, 7e82b2c, 18877c3, 8b9a2e2). Per standing practice, verified each by reading the actual diffs rather than trusting the summary.
  • GAP-060: Confirmed. MaybeWriteRejectSummarySnapshot's blanket TimeOfDay < 10:00 AM gate replaced with a proper [suppressionStart, suppressionEnd) window check (IsRejectSummarySnapshotSuppressed), overridden in SimpleORBNT8 to bind to the actual configured ORB window instead of a hardcoded one. The once-after-ORB flag now resets per barTime.Date via a new _rejectSummarySnapshotTradingDate field. A new unconditional MaybeWriteRejectSummarySnapshot(Time[0]) call was added to the OnBarUpdate heartbeat (before context/intent evaluation), so cadence no longer depends solely on a reject occurring. The open question from the task was resolved as possibility (a) — a new real execution test (OnBar_RthNoBreakout_RecordsOrbRangeNotEstablishedBeforeAndAfterOrbClose) drives SimpleORBStrategy.OnBar() directly and proves OrbRangeNotEstablished is correctly set in context.CustomData both during ORB-building and after close with no breakout — confirming the missing visibility was purely the summary-reporting layer, not a second strategy-level defect. New tests in NT8StrategyBaseRejectSummaryTests.cs are source-text assertions (consistent with the established, previously-accepted pattern for this NinjaScript-derived class that cannot be instantiated for execution tests).
  • GAP-059: Confirmed. SimpleORBNT8.OnBarUpdate() no longer reads the dead _openingRangeHigh/_openingRangeLow fields — both removed entirely (test asserts their absence from source). ORB high/low now come from (_sdkStrategy as SdkSimpleORB).OpeningRangeHigh/OpeningRangeLow, gated on OpeningRangeReady, matching the pattern already used correctly elsewhere in the file. New test OrbRangeVsAtr_RealisticSdkOrbRangeTicks_ReturnsRatioReason is a genuine execution test against OrbRangeVsAtrFactorCalculator.Calculate() using tonight's real logged ORB values (29243.00/28946.75) and confirms the factor no longer returns the neutral "no daily bar context" fallback.
  • GAP-051: Confirmed, Option A as specified. New _microUpgradePersistenceLoaded/InitializeMicroUpgradeSuggestedState() load a dedicated micro_upgrade_suggested_<Account>.json once per realtime run; WriteMicroUpgradeSuggestedFile() persists it only after the existing advisory message fires. Corrupt/missing file correctly falls back to allowing the reminder (over-reminding over silent suppression, as specified) rather than throwing. Account == null performs no file I/O. Does not touch GAP-055's own persistence file.
  • GAP-052: Confirmed, Option A as specified, plus a legitimate scope extension worth flagging: Kilocode found that AdvancedRiskManager.cs and AdvancedPositionSizer.cs carried their own additional, independently-drifted copies of the same tick-value table (not mentioned in the task, which only named BasicRiskManager/BasicPositionSizer) and consolidated all four into the new NT8.Core.Common.InstrumentTickValueTable, containing the correct union (6A=$10.00, 6E=$12.50). Two real execution tests: one asserts full parity across InstrumentTickValueTable/BasicRiskManager/BasicPositionSizer's GetSupportedSymbols() for every symbol, the other drives BasicRiskManager.ValidateOrder() end-to-end for a real 6A intent and confirms the computed trade risk now uses $10.00/tick. Platform-neutrality question from the task's READ-FIRST was correctly answered: NT8.Core cannot reference Instrument.MasterInstrument, so Option A (not B) was the only viable choice — documented explicitly in the implementation note.
  • Process finding (not a code defect): For GAP-060 and GAP-059, deployment\deploy-to-nt8.bat was actually run and only failed because NinjaTrader.exe (PID 18800) held a lock on NT8.Core.dll — not because Kilocode honored the "commit only, do not deploy" instruction added to those two task prompt files. Confirmed by reading the committed copies of TASK_GAP060_...md/TASK_GAP059_...md in the relevant commits directly: neither contains the "Deploy: COMMIT ONLY" line added earlier — Kilocode ran from an older cached copy of those two files. For GAP-051 and GAP-052 (run afterward), the commit messages read "skipped per operator instruction," meaning the no-deploy instruction reached Kilocode as a direct/verbal instruction from the operator partway through the run, not from the file text either. Net effect tonight: harmless, because the file lock acted as an accidental safety net — but the instruction itself did not do the job as intended, and would not protect against a future run where NinjaTrader happens not to be holding the DLL.
  • Also flagged, not investigated further: the device repo's working tree currently shows several files (SPRINT_BOARD.md, four TASK_GAP0*.md files, and four docs/00-governance/*.md files) as modified-but-uncommitted relative to HEAD, and a git status/git diff invocation from this session surfaced a .git/index.lock unlink permission warning. This session did not attempt any git write operations to investigate or resolve it. Recommend the operator check git status directly on the machine before the next Kilocode run or deploy attempt, in case there's a leftover lock from an interrupted operation.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, src/NT8.Core/Common/InstrumentTickValueTable.cs, src/NT8.Core/Risk/BasicRiskManager.cs, src/NT8.Core/Risk/AdvancedRiskManager.cs, src/NT8.Core/Sizing/BasicPositionSizer.cs, src/NT8.Core/Sizing/AdvancedPositionSizer.cs, commits 6c672a5/7e82b2c/18877c3/8b9a2e2
  • Action Required: Once NinjaTrader is closed, rerun deployment\deploy-to-nt8.bat, manually compile NinjaScript, and validate all four in the next SIM session (REJECT SUMMARY cadence throughout RTH for GAP-060; OrbRangeVsAtr no longer "no daily bar context" for GAP-059; a same-account restart no longer re-logging TIER_UPGRADE_SUGGESTED for GAP-051; no operator validation needed for GAP-052 since NQ/MNQ are unaffected). Separately, confirm the working-tree/git-lock state on the machine directly before the next Kilocode run.

DEC-20260823-08

  • ID: DEC-20260823-08
  • Date: 2026-08-24
  • Status: implemented
  • Context: Mo reported watching several Grade-A STATE: telemetry prints between 09:30-10:00 ET and asked why nothing traded — specifically noting these appeared to be "rejected because it wasn't 10AM yet." Investigated session_20260823_230519.log directly (continuous session, 2026-08-23 23:05 ET through 2026-08-24 20:20+ ET).
  • Finding 1 (not a defect — confirms by-design behavior): The 09:30-10:00 ET rejection is intentional and correct. SimpleORBStrategy.OnBar() (~419-432) unconditionally rejects with reason OrbRangeNotEstablished ("ORB window still building") for any bar before the configured ORB window closes — an ORB strategy cannot evaluate a breakout of a range that hasn't finished forming. Confirmed the Grade-A STATE: lines Mo saw in that window are a separate, always-on diagnostic telemetry stream (MaybeWriteStateTelemetry) that scores a hypothetical default-long intent (DirectionSource=DefaultLong, not OpeningRangeMidpoint) purely for dashboard visibility — confirmed via the log itself: STATE_CONTEXT omits OrbHigh/OrbLow/OrbWindowStart/OrbWindowEnd/OrbReady entirely before 10:00 ET, and only starts including them at 10:04:59 once the real ORB range exists. Nothing tradeable was missed; the real order-eligibility path was correctly blocked the whole time.
  • Finding 2 (real defect — logged as GAP-060): While confirming Finding 1, discovered the file log has zero visibility into reject reasons for the entire 09:30-16:00 ET trading day — a ~16-hour REJECT SUMMARY blackout from 23:55:01 (Aug 23 night) to 16:00:00 (Aug 24 afternoon), spanning exactly the window Mo was asking about. Root cause traced to MaybeWriteRejectSummarySnapshot/LogRejectRateLimited (NT8StrategyBase.cs ~1444-1496): (1) a blanket barTime.TimeOfDay < 10:00 AM suppression gate that blocks snapshots for the whole midnight-10am span every day, not just the ORB-forming window; (2) _orbRejectSummarySnapshotWritten is a session-lifetime flag (reset only once, at WriteSessionHeader()), so on a multi-day continuous run it fires once — here, accidentally, during the first night's ETH activity at 23:10:00 — and then never again; (3) snapshots are only ever written as a side effect of some other reject occurring, with no independent timer, so a quiet stretch of the trading day goes dark even past the intended 15-minute cadence. Left open and flagged (not resolved) whether OrbRangeNotEstablished itself is even being counted during this window, since the one snapshot we do have (16:00:00) shows zero for that reason despite a full day with no confirmed breakout — the task must determine whether that's the same visibility defect or a second, distinct one.
  • Decision: Track as GAP-060. Logging/observability only — no order-flow, sizing, or risk logic involved. This directly explains why tonight's session couldn't answer "why didn't it trade" from the file log, and is a higher operational priority than GAP-059/051/052 (already queued) since it blocks diagnosing any future no-trade day, not just one telemetry factor.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs (MaybeWriteRejectSummarySnapshot/LogRejectRateLimited/ResetRejectTracking/WriteSessionHeader ~1444-1517), src/NT8.Strategies/Examples/SimpleORBStrategy.cs (OnBar ~355-432, RecordSignalRejection ~1015-1026), session_20260823_230519.log
  • Implementation Note (2026-08-25): GAP-060 implemented as logging/observability only. NT8StrategyBase.MaybeWriteRejectSummarySnapshot() no longer has a blanket midnight-to-10:00 AM suppression gate; suppression now delegates to an ORB-window-aware helper and SimpleORBNT8 overrides that helper so the suppressed window is today's configured 09:30 + OpeningRangeMinutes. The once-after-ORB snapshot flag now resets per barTime.Date, allowing a new post-ORB summary every day in a continuous multi-day session. OnBarUpdate() now calls MaybeWriteRejectSummarySnapshot(Time[0]) on the live bar heartbeat after the first realtime-bar guard, so 15-minute summary cadence can flush from regular processed bars and is not solely dependent on a newly logged reject. Existing _rejectDetailsLogged one-detail-line-per-reason rate limiting, reject reason strings, REJECT:/REJECT SUMMARY: formats, order flow, sizing, risk, and real trade decisions were unchanged. Open question resolved as possibility (a): the missing OrbRangeNotEstablished visibility was adapter summary reporting, not a second SimpleORB rejection defect. A focused SimpleORBStrategy.OnBar() test proves the no-breakout RTH path records OrbRangeNotEstablished both while the ORB is building and after ORB close when no breakout confirms. Verification: focused GAP-060 tests passed 8/8; verify-build.bat passed with 543/543 tests (454 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 454/454.
  • Action Required: Deployment remains pending. deployment\deploy-to-nt8.bat was attempted on 2026-08-25 but failed because NinjaTrader.exe PID 18800 locked NT8.Core.dll; operator instructed Kilocode to commit without deploy. After NinjaTrader is closed, rerun deployment, start NT8, manually compile NinjaScript, and in the next SIM session spanning a full trading day confirm REJECT SUMMARY appears throughout RTH at a reasonable cadence.

DEC-20260823-07

  • ID: DEC-20260823-07
  • Date: 2026-08-23/24
  • Status: implemented
  • Context: GAP-052 was flagged by the original v7.0 review as "two hardcoded tick-value tables" without further detail. Confirmed duplicated GetTickValue(string symbol) helpers in Basic risk/sizing and additional Advanced risk/sizing helpers. The concrete defect was 6A: BasicPositionSizer used $10.00 while BasicRiskManager fell through to $12.50, producing a 25% risk-calculation mismatch if 6A were traded. NQ/MNQ were already consistent and remain unchanged.
  • Decision: Implement Option A — a shared static table — because BasicRiskManager, BasicPositionSizer, AdvancedRiskManager, and AdvancedPositionSizer live in platform-neutral NT8.Core and cannot directly depend on NinjaTrader Instrument.MasterInstrument APIs without changing project layering. Option B remains a possible future adapter-supplied enhancement, not part of this platform-neutral fix.
  • Implementation Note (2026-08-25): Added NT8.Core.Common.InstrumentTickValueTable with the union of existing supported symbols (ES, MES, NQ, MNQ, CL, GC, 6E, 6A) and updated all four risk/sizing helpers to delegate to it. This fixes the concrete 6A defect ($10.00 instead of the old BasicRiskManager $12.50 default) and removes the duplicated hardcoded tables from those helpers. Verification: focused BasicRiskManagerTests passed 26/26; verify-build.bat passed with 552/552 tests (463 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 463/463.
  • Related Files: src/NT8.Core/Common/InstrumentTickValueTable.cs, src/NT8.Core/Risk/BasicRiskManager.cs, src/NT8.Core/Sizing/BasicPositionSizer.cs, src/NT8.Core/Risk/AdvancedRiskManager.cs, src/NT8.Core/Sizing/AdvancedPositionSizer.cs, tests/NT8.Core.Tests/Risk/BasicRiskManagerTests.cs, TASK_GAP052_TICK_VALUE_CONSOLIDATION_PROMPT.md
  • Action Required: Deployment intentionally skipped per operator instruction. No operator validation required for currently traded NQ/MNQ; both remain unchanged at $5.00/$0.50.

DEC-20260823-06

  • ID: DEC-20260823-06
  • Date: 2026-08-23/24
  • Status: implemented
  • Context: GAP-051 was flagged by the original v7.0 review as MicroUpgradeThreshold fires every session. MonitorMicroAccountUpgrade() guarded on an in-memory _microUpgradeSuggested flag, but that flag reset during State.SetDefaults, so an account already above threshold re-logged TIER_UPGRADE_SUGGESTED on every restart.
  • Decision: Implement Option A from the task prompt: persist the suggested-state once per account lifetime in a small dedicated file, rather than accepting per-session reminders. This preserves the existing one-time advisory intent and avoids restart log noise without changing any trading behavior.
  • Implementation Note (2026-08-25): NT8StrategyBase now loads micro_upgrade_suggested_<Account>.json only in realtime when Account != null, suppresses repeat TIER_UPGRADE_SUGGESTED messages when suggested=true is already present, and writes the dedicated JSON file only after the existing advisory message fires. Missing/corrupt persistence files fall back to allowing the reminder and emit a warning, because over-reminding is safer than suppressing the advisory forever. The TIER_UPGRADE_SUGGESTED message format, RiskTier, order flow, sizing, risk validation, and reject/signal behavior were unchanged. Verification: focused GAP-051 tests passed 5/5; verify-build.bat passed with 550/550 tests (461 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 461/461.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tests/NT8.Core.Tests/Adapters/NT8StrategyBaseMicroUpgradeTests.cs, TASK_GAP051_MICRO_UPGRADE_PERSISTENCE_PROMPT.md
  • Action Required: Deployment intentionally skipped per operator instruction. If visual confirmation is desired later, close NinjaTrader, rerun deployment, manually compile NinjaScript, then restart twice on an above-threshold account and confirm the second restart does not re-log TIER_UPGRADE_SUGGESTED.

DEC-20260823-05

  • ID: DEC-20260823-05
  • Date: 2026-08-23/24 (live SIM session spanning midnight)
  • Status: implemented
  • Context: Continuing tonight's post-compile SIM validation (session_20260823_230519.log), STATE_DETAIL lines from 08:29 ET through 10:49 ET (well past the 09:30-10:00 ORB window, with STATE_CONTEXT confirming OrbReady=True OrbHigh=29243.00 OrbLow=28946.75) all still report OrbRangeVsAtr="No daily bar context available" — the exact second symptom GAP-049's task description originally flagged, and which DEC-20260823-03's Action Required specifically asked to be re-checked live. GapDirectionAlignment is confirmed working correctly in the same lines (e.g. Large gap -278.25 aligns with trade), so this is not a re-occurrence of the direction bug — it's a distinct, still-open issue.
  • Root cause: OrbRangeVsAtrFactorCalculator.Calculate() requires intent.Metadata["orb_range_ticks"] to be present. GAP-049's fix correctly adds that key when telemetryDaily.OrbRangeTicks > 0.0, but telemetryDaily.OrbRangeTicks copied the adapter-built _strategyConfig.Parameters["daily_bars"].OrbRangeTicks. That source was built in SimpleORBNT8.OnBarUpdate() from local fields _openingRangeHigh/_openingRangeLow, which were declared/read but never assigned, so the ORB range stayed 0.0 and telemetry never emitted orb_range_ticks.
  • Decision: Track as GAP-059 and fix the adapter daily-context data source only. Source orbHigh/orbLow from (_sdkStrategy as SdkSimpleORB).OpeningRangeHigh/OpeningRangeLow when OpeningRangeReady is true, matching the existing STATE_CONTEXT and diagnostics source of truth, and remove the dead legacy fields.
  • Implementation Note (2026-08-25): GAP-059 implemented in SimpleORBNT8.OnBarUpdate() by reading SdkSimpleORB sdkOrb = _sdkStrategy as SdkSimpleORB and using sdkOrb.OpeningRangeHigh / sdkOrb.OpeningRangeLow only when sdkOrb.OpeningRangeReady is true. The unused _openingRangeHigh and _openingRangeLow adapter fields were removed after search confirmed no writer existed. OrbRangeVsAtrFactorCalculator, GAP-049's telemetry clone, signal generation, sizing, risk, order submission, and line formats were unchanged. Scope nuance: the SDK strategy does read _config.Parameters["daily_bars"] for daily context, but real ORB-range metadata is still set from SimpleORBStrategy.CreateIntent()/AttachDailyBarContext() once a real candidate exists; this fix corrects the adapter's stale daily-context source feeding telemetry and shared daily context.
  • Evidence: Added source-level SimpleORBNT8DefaultsTests coverage because NinjaScript strategies are not directly instantiated in normal Core tests; added OrbConfluenceFactorTests coverage proving realistic SDK ORB high/low-derived ticks produce a ratio-based OrbRangeVsAtr reason instead of the neutral missing-context reason. Focused GAP-059 tests passed 32/32. verify-build.bat passed with 545/545 tests (456 Core, 79 Integration, 10 Performance). dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 456/456.
  • Action Required: Deployment remains pending. deployment\deploy-to-nt8.bat was not rerun because NinjaTrader.exe PID 18800 remained active and previously locked NT8.Core.dll; operator instructed Kilocode to commit without deploy. After NinjaTrader is closed, rerun deployment, start NT8, manually compile NinjaScript, and confirm a post-OrbReady=True STATE_DETAIL line reports a ratio-based OrbRangeVsAtr reason instead of No daily bar context available.

DEC-20260823-03

  • ID: DEC-20260823-03
  • Date: 2026-08-23
  • Status: implemented
  • Context: GAP-049 found that SimpleORBNT8.BuildStateTelemetryIntent() attached the shared _strategyConfig.Parameters["daily_bars"] object directly to synthetic STATE: telemetry. GapDirectionAlignmentCalculator and PriorDayCloseStrengthCalculator read DailyBarContext.TradeDirection, but the telemetry path deliberately does not call SimpleORBStrategy.AttachDailyBarContext() because that real-trade helper mutates shared daily context fields. Result: short telemetry could retain a stale long direction and log a downward gap as "opposes trade." The same log block also showed OrbRangeVsAtr="No daily bar context available" because telemetry had daily context but did not include the separate orb_range_ticks metadata key required by that factor.
  • Decision: Keep GAP-049 observability-only by fixing only the synthetic telemetry path. SimpleORBNT8.BuildStateTelemetryIntent() now builds a clone of the DailyBarContext, sets clone-only scalar fields from telemetry inputs (TradeDirection, BreakoutBarVolume, TodayOpen, AvgIntradayBarVolume), attaches that clone as daily_bars, and adds orb_range_ticks metadata from the cloned context. No SIGNAL, SUBMIT, FILL, PNL_UPDATE, REJECT, sizing, risk, order submission, or real trade-decision path was changed.
  • P1-E Finding: The cited -523.25 point gap was a data-alignment defect in telemetry, not a real overnight NQ gap. The session log session_20260818_071117.log reported different gap values throughout the same RTH session, ranging from roughly -389.75 to -555.75, which cannot represent a fixed overnight open gap. External NQ SEP26 daily data showed 2026-08-17 close 30096.00 and 2026-08-18 open 30077.00, a -19.00 daily gap. Root cause: telemetry seeded DailyBarContext.TodayOpen from the current primary bar's Open[0]; the clone now mirrors the real trade path and prefers context.CustomData["session_open_price"].
  • Evidence: Added source-level tests proving telemetry uses CloneDailyBarContextForTelemetry, attaches the clone rather than the shared daily context, and emits orb_range_ticks; added a factor test proving a large down gap with sell direction scores 1.0 and says "aligns with trade," not "opposes trade." Focused GAP-049 tests passed 30/30. verify-build.bat passed with 538/538 tests (449 Core, 79 Integration, 10 Performance). dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 449/449. deployment\deploy-to-nt8.bat completed with backup 20260823_151931 and noted NinjaTrader.Custom.dll was not present to invalidate.
  • Related Files: src/NT8.Adapters/Strategies/SimpleORBNT8.cs, tests/NT8.Core.Tests/Adapters/SimpleORBNT8DefaultsTests.cs, tests/NT8.Core.Tests/Intelligence/OrbConfluenceFactorTests.cs, TASK_GAP049_TELEMETRY_DIRECTION_PROMPT.md
  • Action Required: Manual NT8 startup/compile remains required for NinjaScript source. In the next live/SIM diagnostic session, confirm STATE_DETAIL for a sell setup with a down gap reports GapDirectionAlignment as aligned and OrbRangeVsAtr no longer says no daily context when daily warm-up is satisfied.

DEC-20260823-02

  • ID: DEC-20260823-02
  • Date: 2026-08-23
  • Status: implemented
  • Context: Discovered while independently verifying the GAP-048 implementation (e36534b). Two of the three new tests in tests/NT8.Core.Tests/Strategies/SimpleORBRejectionLoggingTests.cs (OnBar_BelowThresholdGrade_RecordsGradeFilterRejectLineWithScore, OnBar_RegimeVeto_RecordsRegimeVetoRejectLine) are legitimate — they call real production code (OnBar / RecordSignalRejection via reflection) and assert on its actual output. The third, RejectLineFormat_DiffersOnlyByReasonToken, is not: it hand-constructs two literal strings that were written to differ only by the reason= token, replaces that token with a placeholder in both, and asserts the results are equal. That assertion is true by construction — it never calls any production formatting code, so it cannot fail regardless of whether NT8StrategyBase.cs/SimpleORBStrategy.cs actually preserve the line format. Same defect class as the GAP-022 precedent this project already treats as a known failure mode (fabricated coverage that reads as a real regression test but tests nothing).
  • Decision: Track as GAP-058. Not blocking — the two real tests plus the byte-diff review already performed (git show e36534b, confirmed only reason= tokens changed) give adequate confidence GAP-048 itself is correct. Recommended fix, low priority: replace the third test with one that drives the actual reject-line-emitting path (e.g. invoke the same code with two different reasons and diff the real output), or delete it if the two real tests are judged sufficient coverage on their own.
  • Related Files: tests/NT8.Core.Tests/Strategies/SimpleORBRejectionLoggingTests.cs, TASK_GAP048_REJECT_TAXONOMY_PROMPT.md
  • Implementation Note (2026-08-23): GAP-058 replaced the tautological RejectLineFormat_DiffersOnlyByReasonToken literal comparison with a test that invokes SimpleORBStrategy.RecordSignalRejection twice through the existing reflection helper, once with GradeFilter and once with RegimeVeto, then normalizes only the reason= token and compares the two real emitted lines. No production code changed.
  • Action Required: None.

DEC-20260823-01

  • ID: DEC-20260823-01
  • Date: 2026-08-23
  • Status: accepted (2026-08-23)
  • Operator Decision (2026-08-23): Approved — proceed with the designed weights.
  • Implementation approach resolved (Claude, 2026-08-23): Read ConfluenceScorer.cs directly rather than assume. Two things confirmed that shape Part 2: (1) Score()'s composite (weightedScoreSum / totalWeight, ~line 183) already normalizes dynamically by whatever weights are actually applied — it is NOT hardcoded to divide by 10 or 5.85, so there is no separate normalization defect to fix; removing the bug is sufficient on its own. (2) The five wrong weights are hardcoded 1.0 literals in the constructor (ConfluenceScorer.cs ~113-117) rather than the calculators' own designed values ever being consulted, even though a ResolveWeight()/UpdateFactorWeights() mechanism already exists to make the dictionary the authoritative source — this reads as a placeholder value that was never replaced, not an architectural gap. Resolved fix: change the five literals directly (NarrowRange 1.0→0.20, OrbRangeVsAtr 1.0→0.15, GapDirectionAlignment 1.0→0.15, BreakoutVolumeStrength 1.0→0.20, PriorDayCloseStrength 1.0→0.15, verified against FactorCalculators.cs lines 569/670/797/897/1021) rather than removing the pre-population and routing through ResolveWeight's fallback path — smaller diff, same result, keeps the dictionary as the single source of truth the API already assumes. The "configuration-driven" alternative floated in the original task is not pursued now — no scenario surfaced that needs it, and it would add parameter surface for no behavioral benefit. Flag if you want it anyway.
  • Context: GAP-047 Part 1 completed the offline equal-weight versus designed-weight re-scoring study against existing NT8 SDK session logs. The study scanned 182 session_*.log files under C:\Users\billy\Documents\NinjaTrader 8\log\nt8-sdk, including ARCHIVE, and reproduced the required worked example from session_20260818_071117.log at 10:10:11.833: equal=0.640, designed=0.727. The STATE: telemetry population remains direction-degraded by GAP-049 and is reported separately from real signal samples. No runtime trading code was changed.
  • Evidence: tools/rescore/GAP-047_weight_rescore_output.md and .json. Headline results: STATE: telemetry samples=923, designed weights crossed A while equal weights did not in 82 samples and crossed B while equal weights did not in 164 samples. Real signal factor samples=81, designed weights crossed A while equal weights did not in 25 samples. Current logs contained 0 SIGNAL_DETAIL: lines; signal scoring used real SIGNAL lines followed by their numeric Factors: breakdowns.
  • Decision: Replace the accidental equal 1.00 weights with the designed factor weights, per the resolved implementation approach above. Staged as TASK_GAP047_PART2_WEIGHT_RUNTIME_PROMPT.md.
  • Consequences: Designed weights will materially increase grade eligibility in the direction-degraded telemetry population and upgrade a meaningful subset of real signal samples to Grade A — this is the intended effect, directly targeting the low-trade-frequency problem. Because some real signal samples also downgrade under designed weights, this is a scoring-policy change, not a pure relaxation — expect a shift in which setups qualify, not just how many. Unlike GAP-054, this change is fully testable in the platform-neutral NT8.Core layer with ordinary unit tests — no NinjaTrader-specific managed-order call is involved, so no SIM trade is required to prove correctness (see TASK_GAP047_PART2_WEIGHT_RUNTIME_PROMPT.md Validation). A fresh gate configuration freeze/baseline is still required before any gate evidence is collected after this lands, since trade-qualification behavior changes. Also worth revisiting once live: the workspace currently runs MinTradeGrade=4 (B) while the Gate 3 plan targets MinTradeGrade=A (5) — now that Grade A is actually reachable, the operator may want to reconsider which threshold to gate on.
  • Related Files: tools/rescore/rescore_weights.py, tools/rescore/GAP-047_weight_rescore_output.md, tools/rescore/GAP-047_weight_rescore_output.json, TASK_GAP047_WEIGHT_RESCORE_PROMPT.md, TASK_GAP047_PART2_WEIGHT_RUNTIME_PROMPT.md, src/NT8.Core/Intelligence/ConfluenceScorer.cs
  • Implementation Note (2026-08-23): Implemented in src/NT8.Core/Intelligence/ConfluenceScorer.cs by changing only the five approved constructor baseline weights: NarrowRange=0.20, OrbRangeVsAtr=0.15, GapDirectionAlignment=0.15, BreakoutVolumeStrength=0.20, and PriorDayCloseStrength=0.15. Score() normalization, ResolveWeight(), UpdateFactorWeights(), factor calculators, grade thresholds, and adapter/NinjaScript files were left unchanged. Added ConfluenceScorerTests coverage proving the default total weight is 5.85, the 2026-08-18 10:10:11.833 worked example now scores 0.727 / Grade B instead of the old 0.640, and UpdateFactorWeights() still overrides the new baseline. Verification: verify-build.bat passed with 514/514 tests (425 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 425/425; deployment\deploy-to-nt8.bat completed with backup 20260823_135331 and noted NinjaTrader.Custom.dll was not present to invalidate.
  • Action Required: Fresh Gate 3 configuration freeze/baseline is required before collecting gate evidence after this scoring-policy change. Manual NT8 compile remains part of normal deploy hygiene, but no SIM trade is required for correctness.

DEC-20260821-01

  • ID: DEC-20260821-01
  • Date: 2026-08-21
  • Status: logged, no operator decision needed — tracking only
  • Context: Discovered while independently verifying the GAP-054 implementation (source read of NT8StrategyBase.cs). Two small residual items surfaced that the GAP-054 task didn't require closing but that shouldn't get lost:
    1. GAP-056 — EnableAutoBreakeven/BreakevenTriggerTicks/BreakevenOffsetTicks are now fully inert. The only code path that ever read them was the runner breakeven block GAP-054 removed; there was never a separate scaler-leg breakeven implementation. All three parameters remain declared and defaulted in the strategy's NinjaTrader UI but do nothing. Not a trading-risk item — inert means harmless — but an operator setting EnableAutoBreakeven=true in the UI would reasonably expect it to do something. Recommended fix, low priority: either mark the parameters [Browsable(false)]/update their Description attributes to state they're currently unused, or remove them outright in a later cleanup pass.
    2. GAP-057 — no test seam exposes NinjaScript's SetStopLoss/SetTrailStop managed-order calls. TASK_GAP054_RUNNER_TRAIL_PROMPT.md asked for a regression test asserting no SetStopLoss call is issued after SetTrailStop for a runner signal, with instructions to propose the smallest seam if none exists. Kilocode correctly did not fabricate coverage, but a concrete seam proposal wasn't written up. This is the same defect class as GAP-054 (silent exit-order clobbering) — worth closing so a future change to this block gets real regression coverage instead of relying on manual source review, as this review just did.
  • Decision: Track both, do not action either as part of GAP-054. No operator decision required to log them.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, TASK_GAP054_RUNNER_TRAIL_PROMPT.md
  • Action Required: None immediate. Stage as low-priority follow-up prompts when convenient.
  • GAP-056 Implementation Note (2026-08-25): Implemented Option A for the inert breakeven parameters. EnableAutoBreakeven, BreakevenTriggerTicks, and BreakevenOffsetTicks remain declared/defaulted for saved workspace and settings compatibility, but are now [Browsable(false)] and their Display descriptions state they are currently unused. SimpleORBNT8 settings export now labels the values as UNUSED (retained for compatibility). This is reversible and avoids breaking persisted templates; Option B removal was not chosen because there was no concrete need to delete the fields and no benefit worth risking workspace/settings references. Added source-level tests proving the properties are hidden/marked unused and not read by OnBarUpdate() or SubmitOrderToNT8(). Verification: focused GAP-056 tests passed 3/3; verify-build.bat passed with 555/555 tests (466 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 466/466. Deploy intentionally skipped by task prompt.
  • GAP-057 Implementation Note (2026-08-25): Implemented Option B, a source-text regression seam, because extracting a real IOrderManagementCalls wrapper would require routing live NinjaScript SetStopLoss/SetTrailStop/entry calls through new production indirection inside SubmitOrderToNT8, creating unnecessary order-timing risk for a test-only task. Added NT8StrategyBaseRunnerTrailTests: one test proves no SetStopLoss(_runnerSignalName...) appears after the runner SetTrailStop(_runnerSignalName...) calls in SubmitOrderToNT8; one proves the post-entry runner monitor in OnBarUpdate() contains no SetStopLoss/SetTrailStop calls; one proves the source-text seam did not add an order-management wrapper and the real implementation still uses direct NinjaScript managed-order calls. No production source changed for GAP-057. Verification: focused GAP-057 tests passed 3/3; verify-build.bat passed with 558/558 tests (469 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 469/469. Deploy intentionally skipped by task prompt.
  • Action Required: GAP-056 and GAP-057 complete. GAP-054 still requires SIM/replay validation before RUNNER-001 or live gate evidence.

DEC-20260819-01

  • ID: DEC-20260819-01
  • Date: 2026-08-19
  • Status: accepted
  • Context: DEC-20260818-19 resolved the MaxTradeRisk/MaxStopTicks collision by moving the traded instrument from NQ to MNQ. This is a materially larger change than the other five items staged 2026-08-18: it changes ConfigHash, invalidates every settings/provenance export and gate-run comparison made under NQ, and interacts with the roadmap's Stage 2 instrument sequencing (Section 9.5, P2-0, already documented in the v7.0 master document as a future step — this decision brings it forward rather than introducing it new). Layering an instrument cutover on top of unvalidated defect fixes (GAP-054, GAP-045/046, GAP-055) would make it impossible to tell, if something went wrong, whether the cause was a code defect or the instrument switch.
  • Decision: Sequence the MNQ cutover as its own final step, after — not concurrent with — the code-level fixes:
    1. Land and validate GAP-048, GAP-047 (Part 1), GAP-054, GAP-045/046 (Parts 1-3), GAP-055 on the current NQ configuration, in SIM/replay, per each task's own validation section.
    2. Only once all of the above pass validation, execute the MNQ instrument cutover: confirm MNQ is present in both hardcoded tick-value tables (GAP-052 — BasicRiskManager.GetTickValue and BasicPositionSizer.GetTickValue), reconfigure the strategy instance to MNQ, and re-tune MaxTradeRisk/MaxStopTicks/MaxContracts for MNQ's $0.50/tick economics rather than leaving NQ-era values in place unexamined.
    3. Run preflight.ps1 --freeze and produce a new DEC-GATE3-CONFIG for the MNQ configuration before any gate-run evidence is collected on it. Prior NQ-based gate evidence remains valid for its own record but is not comparable to post-cutover results.
  • Consequences: Adds a discrete cutover step to the roadmap rather than folding it into GAP-045/046; keeps defect-fix validation and instrument-change validation from being confounded. Historical Strategy Analyzer/backtest results tied to NQ tick economics are not directly comparable post-cutover.
  • Related Files: docs/00-governance/decisions.md, docs/00-governance/roadmap.md, TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md, docs/00-governance/2026-08-19-run-book.md
  • Action Required: Execute in the order above. Flag to Claude/Mo once step 1 items are all validated so the MNQ cutover task can be staged as its own TASK_*.md prompt.

DEC-20260818-21

  • ID: DEC-20260818-21
  • Date: 2026-08-18
  • Status: accepted (2026-08-19)
  • Operator Decision (2026-08-19): Accepted as proposed — persist the daily trade count using the DEC-20260818-17 halt-file pattern, rehydrate at State.Realtime, align to the CME 18:00 ET rollover.
  • Context: MaxDailyTrades is enforced from _dailyTradeCount, a plain in-memory field in SimpleORBStrategy.cs (~39) zeroed at construction (~269) and on session rollover (~756, ~961). Nothing persists it across a strategy stop/start. The CME trading date 2026-08-17 (beginning 18:00 ET Sunday 08-16) took two trades under MaxDailyTrades=1: 08-16 19:12 (+$277.72, session_20260816_181528.log) and 08-17 11:04 (+$267.72, session_20260817_110049.log), in two different NT8 sessions. NT8 itself treated them as one trading day — the first PNL_UPDATE of the 11:04 trade reads DayPnL=$271.96 (the prior trade's $277.72 less the $5.76 entry commission) and the session closes at DayPnL=$545.44. This is the same class as the 7/28 breach that contributed to voiding Gate Run #2 (HIST-45) and is NOT closed by GAP-032, which fixed the within-session position-flat reset only.
  • Decision: Persist {trading_date, daily_trade_count, account, strategy_name, symbol} to {LogDirectory}/daily_trade_count_<AccountName>_<StrategyName>.json on each increment, and rehydrate at State.Realtime entry when the persisted trading date matches. Reuse the persistence pattern already established for the Conservative trailing-drawdown halt file (DEC-20260818-17) rather than inventing a second mechanism. Align the trading-date boundary with the CME session rollover (18:00 ET) rather than the calendar date, using SessionManager or NT8's own session date if either already exposes it. Strategy Analyzer/backtest (Account == null) must neither read nor write the file so backtest behaviour is byte-for-byte unchanged.
  • Consequences: Gate discipline explicitly contemplates restarts (recompiles, workspace changes, connection recovery), so without this a gate run under MaxDailyTrades=1 cannot guarantee its own cap and its sample is uninterpretable in the same way the previous two were. Adds a small file-I/O dependency to the realtime path; a missing or corrupt file must degrade to count-zero plus a WARNING, never an exception.
  • Related Files: src/NT8.Strategies/Examples/SimpleORBStrategy.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, TASK_GAP055_MAXDAILYTRADES_PERSIST_PROMPT.md, docs/00-governance/decisions.md
  • Implementation Note (2026-08-23): Implemented as opt-in live/SIM persistence from the adapter into SimpleORBStrategy. NT8StrategyBase enables persistence only when Account != null, passes account/name/resolved log directory metadata at State.Realtime, and also includes the metadata on realtime contexts. SimpleORBNT8 seeds the same metadata into the shared StrategyConfig. SimpleORBStrategy rehydrates once per trading date on the first realtime-eligible bar after session reset, restores when the file date matches, resets and overwrites when the date differs, writes after every daily-count increment, and logs either DAILY_TRADE_COUNT restored: date=<yyyy-MM-dd> count=<n> max=<n> or DAILY_TRADE_COUNT reset: new trading date <yyyy-MM-dd>. Missing/corrupt/unreadable files degrade to count zero plus DAILY_TRADE_COUNT warning... without throwing. Trading date follows the adapter/session date already used by BuildSessionInfo()/MarketSession.SessionStart, so 2026-08-16 19:12 ET and 2026-08-17 11:04 ET both resolve to trading date 2026-08-17. Backtest/Strategy Analyzer contexts with Account == null do not read or write state even if persistence parameters are present. The file key is exactly the approved {AccountName}_{StrategyName} path; symbol is recorded in the payload, but multiple same-account/same-strategy instances intentionally share the counter and distinct per-instance keys remain out of scope.
  • Verification (2026-08-23): Added tests for same-date restore, new-date reset/overwrite, corrupt-file warning/no throw, Account == null no-read/no-write behavior, and the 2026-08-16 19:12 / 2026-08-17 11:04 same-CME-date restart scenario. verify-build.bat passed 521/521 tests (432 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 432/432; deployment\deploy-to-nt8.bat completed with backup 20260823_143311 and noted NinjaTrader.Custom.dll was not present to invalidate.
  • Action Required: Manually compile in NinjaTrader, then validate in SIM by taking one trade, stopping/restarting the strategy on the same trading day, and confirming the next signal is rejected with REJECT: reason=MaxDailyTrades.

DEC-20260818-20

  • ID: DEC-20260818-20
  • Date: 2026-08-18
  • Status: accepted (2026-08-19)
  • Operator Decision (2026-08-19): Taxonomy split approved as proposed — no changes to the vocabulary list.
  • Context: Three of the nine reject reasons in production are overloaded. KillSwitch is emitted by four distinct paths in NT8StrategyBase.cs — the actual kill switch (~721), a portfolio-risk block (~1970), a Tier 1 per-strategy risk rejection (~2000) and a circuit-breaker open (~2055). GradeFilter is emitted by four paths across NT8StrategyBase.cs (~1979, ~1986, ~2020) and SimpleORBStrategy.cs (~613/~622, ~650). TrailingDrawdownBreach covers both a genuine breach and an unconfigured monitor. REJECT SUMMARY aggregates on reason, and LogRejectRateLimited() emits the disambiguating detail line only on the first occurrence per reason, so the aggregate counts are the only thing an operator or the dashboard sees. Demonstrated: session_20260817_082103.log logged reason=KillSwitch count=647 from a real kill switch, and session_20260818_071117.log logged reason=KillSwitch count=5 from a MaxTradeRisk rejection. This directly defeats the purpose GAP-035 was built for.
  • Decision: Split the reject vocabulary into distinct reasons — KillSwitch, PortfolioRisk, MaxTradeRisk, CircuitBreaker, LongTradesDisabled, ShortTradesDisabled, SizeBelowMinContracts, RegimeVeto, GradeFilter (genuine grade rejection only), TrailingDrawdownBreach (real breach only) and TrailingDrawdownNotConfigured. Logging only: no guard condition, ordering or outcome may change, and the REJECT: / REJECT SUMMARY: line formats must remain byte-identical apart from the reason= token. The HistoricalReplayCatchup exemption inside LogRejectRateLimited() (DEC-20260818-08) is preserved.
  • Consequences: The reason vocabulary becomes a contract for tools/dashboard/parsers.py, tools/logtriage/logtriage.py and tools/logwatch/logwatch.py; those parsers are believed reason-agnostic and must be read to confirm it rather than assumed. Splitting reasons slightly increases REJECT: detail-line volume, since rate limiting is per unique reason. OrbRangeNotEstablished retains its three sub-states under one reason for now — they are already distinguishable in detail and this is lower priority.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, tools/dashboard/parsers.py, tools/logtriage/logtriage.py, tools/logwatch/logwatch.py, TASK_GAP048_REJECT_TAXONOMY_PROMPT.md
  • Implementation Note (2026-08-23): Implemented the accepted vocabulary without changing guard conditions, ordering, outcomes, or REJECT: / REJECT SUMMARY: formats. Final mapping: actual kill switch remains KillSwitch; portfolio block -> PortfolioRisk; risk-manager/Tier 1 rejection -> MaxTradeRisk; circuit breaker -> CircuitBreaker; disabled long/short directions -> LongTradesDisabled / ShortTradesDisabled; size below minimum -> SizeBelowMinContracts; SimpleORB AVWAP regime veto -> RegimeVeto; genuine confluence grade threshold rejection remains GradeFilter; real trailing drawdown halt remains TrailingDrawdownBreach; unconfigured trailing drawdown monitor -> TrailingDrawdownNotConfigured; OrbRangeNotEstablished remains unchanged. Verified tools/dashboard/parsers.py, tools/logtriage/logtriage.py, and tools/logwatch/logwatch.py parse reasons generically; updated the dashboard's blocking-reason set so split blocking reasons continue feeding missed-setup approximation. Added SimpleORB tests proving genuine grade rejection remains GradeFilter, RegimeVeto records the same line format, and the line differs only by reason= token. Verification: verify-build.bat passed with 516/516 tests (427 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 427/427; python -m py_compile tools\dashboard\parsers.py tools\logtriage\logtriage.py tools\logwatch\logwatch.py passed; deployment\deploy-to-nt8.bat completed with backup 20260823_142014 and noted NinjaTrader.Custom.dll was not present to invalidate.
  • Action Required: In the next live/SIM diagnostic session, confirm REJECT SUMMARY displays distinct reasons and the dashboard rejection panels render them without frontend changes. Manual NT8 compile remains required after deploy.

DEC-20260818-19

  • ID: DEC-20260818-19
  • Date: 2026-08-18
  • Status: accepted (2026-08-19). Both decisions made.
  • Operator Decision (2026-08-19): Decision 1 → (c) move to MNQ. Decision 2 → per-position (total), not per-contract. MaxTradeRisk is now the ceiling on total single-trade dollar risk across all contracts in the position, not a per-contract stop-distance ceiling.
  • Consequence of Decision 2 for the Tier 1 check: the ordering change flagged as "must not be made without an approved decision" in the original entry is now approved. BasicRiskManager's Tier 1 check must move to after BasicPositionSizer determines quantity (or take an estimated/candidate quantity) so that StopTicks × tickValue × Qty ≤ MaxTradeRisk is the actual enforced inequality, replacing today's StopTicks × tickValue ≤ MaxTradeRisk with no Qty term.
  • Consequence of Decision 2 for Part 1 Assertion D (TASK_GAP045_GAP046): under per-contract semantics the original assertion was MaxTradeRisk × MaxContracts ≤ DailyLossLimit, reflecting a worst case scaled by contract count. Under per-position semantics, MaxTradeRisk already is the worst-case single-trade dollar loss regardless of contract count, so the correct assertion is MaxTradeRisk ≤ DailyLossLimit (a single trade must not be able to consume the whole daily loss limit on its own). This is a strictly tighter, simpler, and safer bound than the one it replaces — worst-case single-trade risk drops from the previously undefined-in-practice $600 to whatever MaxTradeRisk is explicitly set to.
  • Sequencing (see DEC-20260819-01 below): the risk-guard code changes (Parts 1–3 of TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md) are instrument-agnostic and should land and be validated on the current NQ configuration first. The MNQ instrument cutover itself is a separate, subsequent deployment step — see DEC-20260819-01.
  • Context (original): Two independent live outages on 2026-08-18 traced to parameter pairs that are individually valid and jointly impossible. (1) BasicRiskManager.CalculateTradeRisk() returns intent.StopTicks * tickValue with no quantity term, evaluated before sizing. On NQ at $5.00/tick, MaxTradeRisk=$200 caps the stop at 40 ticks while MaxStopTicks=50 (=$250) is configured, so the top 20% of the ATR stop range is unreachable. session_20260818_071117.log at 10:10:24 ET: five valid SIGNAL: Sell NQ lines, zero submissions, REJECT: reason=KillSwitch detail=Risk manager rejected: Trade risk too high: $225.00. MinContracts=1 is already the floor, so the trade was unplaceable rather than resizable. (2) Separately, the parameter's display name is "Max Trade Risk" and master document v6.4 §3.2 documents the Tier 1 formula as (StopTicks × TickVal × Qty) > MaxTradeRisk. The code has never had the quantity term, so worst-case position risk is MaxTradeRisk × MaxContracts = $600 against a $1,000 DailyLossLimit.
  • Decision (proposed, two parts): Decision 1 — resolve the collision. Choose one of: (a) MaxTradeRisk = $250, making MaxStopTicks=50 reachable and raising per-contract worst case 25%; (b) MaxStopTicks = 40, leaving nothing unreachable but tightening the stop relative to ATR on volatile days and raising stop-out rate; (c) validate on MNQ at $0.50/tick, where 50 ticks = $25 per contract, the collision disappears entirely and sizing becomes granular enough for MaxContracts to do real work. Decision 2 — define the semantics. State explicitly whether MaxTradeRisk is a per-contract stop-distance ceiling (what the code does today) or a per-position risk limit (what the name and the master document imply). If per-position, the Tier 1 check must move to after sizing or take an estimated quantity — a real ordering change that must not be made without this entry being accepted first. Independently of both, add startup assertions in the GAP-003 style for: EnableTrailingDrawdown ⇒ AccountStartingBalance > 0; MaxStopTicks × tickValue ≤ MaxTradeRisk; MinContracts ≤ MaxContracts; and a bound relating MaxTradeRisk × MaxContracts to DailyLossLimit.
  • Consequences: Either value change alters ConfigHash and requires a fresh freeze capture and a new DEC-GATE3-CONFIG. Option (c) is a larger strategic change than a parameter edit and interacts with the roadmap's instrument sequencing; it is also the only option that removes the class of problem rather than an instance of it. Until Decision 2 is answered, the system's true worst-case single-trade loss is undefined in the documentation and under-enforced in the code, which is the largest open drawdown exposure in the project.
  • Related Files: src/NT8.Core/Risk/BasicRiskManager.cs, src/NT8.Core/Sizing/BasicPositionSizer.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md
  • Implementation Note (2026-08-23): Executed TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md Parts 1-3 on the current NQ configuration without changing the traded instrument or retuning NQ values. Added RiskEnvelopeValidator.ValidateStartupConfiguration() and wired NT8StrategyBase startup to fail fast when: EnableTrailingDrawdown=True with AccountStartingBalance<=0; MaxStopTicks * TickValue > MaxTradeRisk; MinContracts<1 or MinContracts>MaxContracts; or MaxTradeRisk>DailyLossLimit. Messages include the symbol and both conflicting values. GAP-048 had already split the nonconfigured trailing-drawdown reject reason to TrailingDrawdownNotConfigured, so no duplicate taxonomy change was needed. Confirmed MNQ exists at $0.50 in both hardcoded tick-value tables; no table patch was needed. Implemented the approved per-position semantics by adding a sized BasicRiskManager.ValidateOrder(..., candidateContracts) overload and moving NT8StrategyBase.ProcessStrategyIntent() to calculate size before risk validation, then enforce StopTicks * tickValue * Qty <= MaxTradeRisk against the selected quantity. Existing IRiskManager.ValidateOrder() remains compatible and still validates one contract for older callers.
  • Verification (2026-08-23): Added tests for each startup assertion's fail/pass behavior, quantity-aware Tier 1 rejection, the old pre-quantity passing case now rejecting at two contracts, a bounded property-style sweep over declared ranges, and MNQ tick-value parity in both risk and sizing tables. verify-build.bat passed 535/535 tests (446 Core, 79 Integration, 10 Performance); dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal passed 446/446; deployment\deploy-to-nt8.bat completed with backup 20260823_144817 and noted NinjaTrader.Custom.dll was not present to invalidate.
  • Action Required: Manually compile in NinjaTrader. Validate on NQ before MNQ cutover: verify the misconfigured trailing-drawdown pair refuses startup, MaxTradeRisk<=DailyLossLimit is enforced, and a former 10:10-style high-ATR signal either sizes within MaxTradeRisk or rejects from the quantity-aware per-position check. Do not perform the MNQ cutover in this validation step.

DEC-20260818-18

  • ID: DEC-20260818-18
  • Date: 2026-08-18
  • Status: implemented (2026-08-21). Supersedes DEC-20260810-02 and DEC-20260815-01 on the runner question.
  • Operator Decision (2026-08-19): Accepted — stop applying auto-breakeven to the runner leg.
  • Parameter-scoping sub-question resolution: the entry left open whether EnableAutoBreakeven becomes runner-scoped-off by default or gains a separate EnableRunnerBreakeven flag. Not addressed in the 2026-08-19 acceptance message. Default resolved here rather than blocking implementation: unconditionally skip breakeven on the runner leg in the OnBarUpdate block; do not add a new flag. Rationale — a trailing stop already dominates a frozen breakeven at every point once GAP-054 is fixed, so a toggle to re-enable the strictly worse behavior adds parameter surface and testing burden without a scenario where an operator would want it. EnableAutoBreakeven/BreakevenTriggerTicks/BreakevenOffsetTicks continue to govern the scaler leg only, unchanged. If Mo wants the flag instead of the unconditional skip, say so and this line will be revised before Kilocode implements it.
  • Context: SetStopLoss() and SetTrailStop() are mutually exclusive per signal name in NinjaScript — the later call replaces the earlier exit order. SubmitOrderToNT8() (NT8StrategyBase.cs ~2178-2196) arms the runner correctly with SetStopLoss then SetTrailStop(_runnerSignalName, Ticks, RunnerTrailTicks) then EnterLong/EnterShort. But the auto-breakeven block in OnBarUpdate() (797-804) then calls SetStopLoss(_runnerSignalName, CalculationMode.Price, bePrice, false), replacing the live trail with a static stop at entry + BreakevenOffsetTicks. The runner never trails again. All four broker-confirmed trades log it: BREAKEVEN runner stop -> ... profit=28/25/24/26 ticks, at which points a 12-tick trail would have sat at +16/+13/+12/+14 ticks while the stop was moved to +1. The breakeven action therefore moves the stop backwards, giving back 11-15 ticks of already-locked profit and freezing. Conservative floor estimate: 55 ticks ($275 gross, ~$252 net) versus the $25 gross / $1.96 net actually realised — roughly 24% of total realised P&L. Two secondary defects sit in the same block: entryPrice is Position.AveragePrice, the blended average across both legs rather than the runner's own fill (on 2026-08-16 producing the off-tick breakeven price 30200.08 on a 0.25-tick instrument), and Calculate = OnBarClose means BreakevenTriggerTicks = 20 actually fires at 24-28 ticks.
  • Decision (proposed): Stop applying auto-breakeven to the runner leg. A trailing stop already provides monotonically improving protection and does so better than a frozen breakeven at every point. EnableAutoBreakeven, BreakevenTriggerTicks and BreakevenOffsetTicks remain as parameters; whether they become runner-scoped-off by default or gain a separate EnableRunnerBreakeven flag defaulting to false is an open sub-question for the operator. The existing prohibition on calling SetTrailStop() inside OnBarUpdate (which would reset the trail anchor to bar-close price — a real defect diagnosed 2026-04-13) stands unchanged. Before implementation, NinjaTrader's own documentation must be cited confirming the mutual-exclusivity behaviour; if it documents otherwise, the task stops and reports.
  • Consequences: This supersedes the framing in DEC-20260810-02 and DEC-20260815-01, both of which treated the runner as a parameter-placement problem and deferred or scoped a breakeven-trigger retune. The runner has in fact never been tested, so its economics are unknown rather than poor, and the earlier conclusion that it might be worth disabling was drawn from data the defect produced. RUNNER-001 must not execute until this lands — an 18-combination sweep over breakeven trigger × trail distance against a disabled trail would return a trail axis with no effect and a confident, meaningless recommendation. Historical Strategy Analyzer results involving the runner leg are not comparable across this change.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tools/runnersweep/runnersweep.py, TASK_GAP054_RUNNER_TRAIL_PROMPT.md, docs/00-governance/decisions.md
  • Implementation Note (2026-08-21): Implemented Option 0 in NT8StrategyBase.cs: OnBarUpdate() no longer calls SetStopLoss() or SetTrailStop() for _runnerSignalName after entry, and the stale runner breakeven diagnostic draw is removed. Local installed NT8 API documentation citation: C:\Program Files\NinjaTrader 8\bin\NinjaTrader.Core.xml documents StrategyBase.SetStopLoss(string, CalculationMode, double, bool) as tying the stop-loss exit to fromEntrySignal, and StrategyBase.SetTrailStop(string, CalculationMode, double, bool) as tying the trail-stop exit to fromEntrySignal with trail stops amended tick-by-tick. The implementation preserves the single entry-time SetTrailStop() call so NT8 owns the live runner trail. Verified 511/511 (verify-build.bat) and 422/422 (NT8.Core.Tests) passing, deploy-to-nt8.bat succeeded, deployed source hash confirmed matching the repo.
  • Independent source verification (Claude, 2026-08-21): Read the post-change OnBarUpdate() block directly (not just the report) — confirms no SetStopLoss/SetTrailStop call remains for _runnerSignalName, the block is now a comment-only no-op, and the BREAKEVEN runner stop -> FileLog line is gone (not merely the chart draw object). Correction to this entry's own "Parameter-scoping sub-question resolution" line above: it stated EnableAutoBreakeven/BreakevenTriggerTicks/BreakevenOffsetTicks "continue to govern the scaler leg only, unchanged." Source inspection shows this was never true — the original breakeven block only ever acted on _runnerSignalName; there was no separate scaler-leg breakeven path in the pre-fix code for it to have governed. All three parameters are declared, defaulted (EnableAutoBreakeven=true, BreakevenTriggerTicks=20, BreakevenOffsetTicks=1), and referenced once in a settings-export/log line — but are now fully inert with no functional effect anywhere. This is functionally fine (matches the intended zero-breakeven outcome) but is a stale-parameter hygiene issue, not a scaler-leg regression. Tracked as GAP-056 below rather than left as a silent contradiction in this entry.
  • Action Required: Deployed on 2026-08-21, not yet committed ("commits require explicit request" — operator to decide, see current_status.md). Manually compile NinjaScript, then validate on SIM/replay — NOT the live frozen account — that no BREAKEVEN runner stop -> line appears and the runner exits materially above entry + 1 tick before this is eligible for a live gate run. This validation has not yet happened — GAP-054 still blocks RUNNER-001 until it does.

DEC-20260818-17

  • ID: DEC-20260818-17
  • Date: 2026-08-18
  • Status: accepted
  • Context: Funded-prop trailing drawdown risk must be tracked at the account level, not by strategy name. PortfolioRiskManager is intentionally not reused as the model because it is currently keyed by strategy name only, which is GAP-042 and would silently let two strategies on one account each maintain a separate drawdown buffer.
  • Decision: Add an account-keyed TrailingDrawdownMonitor inside NT8StrategyBase with one shared high-water/lock/breach state per Account.Name. Equity is read with Account.Get(AccountItem.NetLiquidation, Currency.UsDollar); installed NT8 API metadata confirms AccountItem.NetLiquidation exists and labels it as Net liquidation, with separate CashValue, RealizedProfitLoss, and UnrealizedProfitLoss account items. Runtime SIM validation must still cross-check this value against NT8 account display with an open position. Formula: update currentPeak = max(currentPeak, equity). If not locked and currentPeak >= AccountStartingBalance + TrailingDrawdownLockOffset, set locked=true and lockedPeakValue=currentPeak. Reference point is locked ? lockedPeakValue : currentPeak; halt threshold is referencePoint - TrailingDrawdownHaltBuffer. If equity <= haltThreshold, set account breach state, flatten registered strategies for that account with ExitLong("TrailingDrawdownHalt") and ExitShort("TrailingDrawdownHalt"), log TRAILING_DRAWDOWN_BREACH: Account=<name> Equity=<value> Peak=<value> Floor=<value> Locked=<bool> Time=<timestamp>, and block new entries with reject reason TrailingDrawdownBreach for the rest of the session.
  • Consequences: The monitor is fully opt-in via EnableTrailingDrawdown=false default, so existing gate-validation sessions are inert unless explicitly enabled. Multiple strategy instances sharing one account name share one drawdown floor and breach state. Conservative-tier breaches write {LogDirectory}/drawdown_halt_<AccountName>.json; startup with that file present enters halted state until the operator manually deletes it. Normal/Aggressive breaches are in-memory only and clear on restart. This task deliberately does not implement EOD/Option-2 mode or Python/Apprise notification wiring.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: In SIM, verify AccountItem.NetLiquidation includes unrealized P&L by comparing logged equity with NT8 account display while a position is open; test breach flattening, persisted Conservative halt, restart behavior by tier, lock-in floor behavior, disabled-mode inertness, and two-strategy shared account state.

DEC-20260818-16

  • ID: DEC-20260818-16
  • Date: 2026-08-18
  • Status: accepted
  • Context: The operator trades both a funded prop account with strict trailing drawdown rules and a small personal/micro account that should become eligible for a different risk posture as capital grows. One static risk posture cannot accurately represent both accounts.
  • Decision: Add a manual RiskTier NinjaScript setting with Conservative, Normal, and Aggressive, defaulting to Normal. Add MicroUpgradeThreshold defaulting to 5000; each realtime bar reads account balance via Account.Get(AccountItem.CashValue, Currency.UsDollar) and, once per strategy session, logs/prints TIER_UPGRADE_SUGGESTED: Balance=<value> crossed threshold=<threshold>; review RiskTier setting. when crossed. The strategy never changes RiskTier automatically.
  • Consequences: Risk posture becomes explicit in strategy settings and provenance without creating hidden automatic tier changes. The upgrade threshold is advisory only and safe for live use because it cannot alter sizing, risk validation, order submission, or drawdown halt behavior.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: Confirm in SIM that threshold crossing logs exactly once and does not change RiskTier or any order behavior.

DEC-20260818-15

  • ID: DEC-20260818-15
  • Date: 2026-08-18
  • Status: accepted
  • Context: The dashboard console only showed rejection/risk visibility from the live raw-log tail, so a meaningful REJECT: could scroll out and disappear from operator view even though the full session file still contained durable REJECT SUMMARY: and REJECT: records. The same dashboard also lacked signal-vs-fill visibility and had no approximation for good telemetry setups that could not become trades because a session-level block had already appeared. Today's 10:10 SIGNAL followed by KillSwitch/MaxTradeRisk rejection in session_20260818_071117.log made the gap concrete.
  • Decision: Add read-only dashboard KPIs sourced from the full current session_*.log file on every /api/state poll: session_reject_totals, signal_outcomes, signal_grade_summary, missed_grade_b_plus_count, and capped missed_grade_b_plus_samples. The full-file read per poll is an accepted dashboard observability trade-off and should not be over-engineered with caching unless it is measured as slow. Signal-vs-fill correlation treats a FILL before the next SIGNAL as filled and captures the following REJECT: reason when present. Older SIGNAL: Sell NQ | LIVE MODE lines without inline grade/score use the latest prior STATE: grade/score so current logs remain analyzable.
  • Consequences: Risk/reject counts are persistent for the full session and no longer disappear when raw-tail lines scroll out. Signal outcomes make rejected/unfilled generated signals visible by grade. Missed B+ setup counting is explicitly approximate: it infers blocked opportunity from STATE: samples after blocking REJECT: reasons (RthGuard, MaxDailyTrades, KillSwitch, CmeHoliday) have appeared, not from a first-class signal-quality-vs-execution-outcome model. Revisit this metric once the pending MaxDailyTrades architecture decision discussed in today's DEC-20260818-14 follow-up session is implemented, because that design should make the distinction exact rather than inferred. This remains observability-only and cannot affect live trading behavior because it only reads log files under tools/dashboard.
  • Related Files: tools/dashboard/parsers.py, tools/dashboard/server.py, tools/dashboard/console.html, tools/dashboard/console.js, docs/00-governance/decisions.md
  • Action Required: In a later live session, compare dashboard missed-setup samples against raw STATE: lines after any real MaxDailyTrades block and revise the approximation once MaxDailyTrades emits exact signal-quality/execution-outcome telemetry.

DEC-20260818-14

  • ID: DEC-20260818-14
  • Date: 2026-08-18
  • Status: accepted
  • Context: Follow-up verification for DEC-20260818-11 confirmed the SimpleORBNT8 side of fixed-position UI consolidation is wired, not just the NT8StrategyBase extension point. The repo and deployed NT8 Custom source both contain SimpleORBNT8.AppendTopLeftDiagnosticLines(List<string> lines) for TradeTaken/DailyTradeCount and a single Diag_BottomLeft block for ORBRange/BreakoutDir.
  • Decision: Treat the current SimpleORBNT8 implementation as completion of DEC-20260818-11 rather than a new visual feature. No additional code change is required: old Diag_TradeTaken/Diag_DailyCount cleanup remains owned by the base consolidated top-left draw path, and old Diag_ORBRange/Diag_BreakoutDir cleanup remains owned by the SimpleORB bottom-left draw path before drawing Diag_BottomLeft.
  • Consequences: The intended fixed-position consolidation is complete in source and deployed NinjaScript source. Runtime visual validation is still required for stacked top-left and bottom-left rendering and for any collision with NT8's native strategy-parameter display.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: In NT8, visually confirm the consolidated top-left and bottom-left blocks render without overlap under simultaneous active conditions.

DEC-20260818-13

  • ID: DEC-20260818-13
  • Date: 2026-08-18
  • Status: accepted
  • Context: Follow-up verification for DEC-20260818-12 confirmed that event-driven telemetry's pending-breakout change detection depends on SimpleORBNT8 overriding GetStateTelemetryPendingBreakoutDirection(). Without that strategy-specific override, the base implementation returns 0, causing the intended 0 -> 1 or 0 -> -1 breakout-arm transition to be invisible to MaybeWriteStateTelemetry().
  • Decision: Treat the existing SimpleORBNT8.GetStateTelemetryPendingBreakoutDirection() override as required completion of DEC-20260818-12 rather than a separate telemetry feature. The override reads _sdkStrategy as SdkSimpleORB and returns sdkOrb.PendingBreakoutDirection when available, otherwise 0, matching the null-check pattern used by the neighboring telemetry overrides.
  • Consequences: Pending-breakout direction changes now have a strategy-specific data source for the event-driven STATE: path. Runtime validation is still required to confirm a live/SIM breakout-arm transition emits immediately and that the periodic 30-second snapshot remains unaffected.
  • Related Files: src/NT8.Adapters/Strategies/SimpleORBNT8.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: In live/SIM, force a breakout-bar/confirmation sequence and confirm a STATE: line appears when PendingBreakoutDirection changes.

DEC-20260818-12

  • ID: DEC-20260818-12
  • Date: 2026-08-18
  • Status: accepted
  • Context: The 30-second STATE: telemetry snapshot is useful for ambient health monitoring but can lag fast ORB breakout/confirmation transitions on primary bars that close less than 30 seconds apart. The operator needs to see entry-imminent state changes in real time without turning STATE: into per-bar score-noise logging.
  • Decision: MaybeWriteStateTelemetry() now samples on meaningful change, not only on a clock. It still preserves the existing 30-second periodic snapshot and its independent cooldown, but it also emits an immediate supplementary STATE:/STATE_DETAIL:/STATE_CONTEXT: set whenever either SimpleORBNT8.PendingBreakoutDirection changes or the telemetry grade crosses the configured MinTradeGrade threshold in either direction. The change-triggered emission does not reset _lastStateTelemetryTime, so the periodic health snapshot continues on its own cadence. This is deliberately limited to PendingBreakoutDirection and grade-threshold crossing; exact score decimal changes are ignored to avoid choppy log volume.
  • Consequences: Fast breakout arming/resetting and grade eligibility transitions should now appear in the session log immediately instead of waiting for the next 30-second snapshot. This design is distinct from the REJECT: rate-limiting model: STATE: change-triggering is about sampling dynamic state at meaningful transitions, while REJECT: rate limiting is about avoiding repetition of static facts. The two throttling strategies must not be conflated.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: In live/SIM, force a rapid breakout-bar/confirmation sequence and confirm STATE: appears at the pending-direction change; run a quiet session to confirm periodic ~30s STATE: output remains; measure STATE line count during a choppy ORB window.

DEC-20260818-11

  • ID: DEC-20260818-11
  • Date: 2026-08-18
  • Status: accepted
  • Context: Multiple Draw.TextFixed() diagnostics shared the same fixed chart positions. NinjaScript does not auto-stack these calls, so Diag_Regime, Diag_Runner, Diag_TradeTaken, and Diag_DailyCount collided at TextPosition.TopLeft, while Diag_ORBRange and Diag_BreakoutDir collided at TextPosition.BottomLeft. This visual-only issue is independent of DEC-20260818-10's ETH refresh path, although ETH refresh made stale/colliding fixed labels more visible.
  • Decision: NT8StrategyBase.DrawDiagnostics() now builds a single newline-joined top-left diagnostics block and exposes AppendTopLeftDiagnosticLines(List<string> lines) for derived strategies. SimpleORBNT8 overrides that hook to append TradeTaken and DailyTradeCount under the same top-left draw call. SimpleORBNT8.DrawDiagnostics() now similarly builds one newline-joined bottom-left block for ORB range and breakout direction. Old separate tags are removed before the combined tags are drawn so stale chart objects do not linger. Color consolidation choice: the top-left block uses white text on a black background for mixed-status readability; the bottom-left ORB block uses white text on a dark-blue background, preserving the prior ORB range block's visual theme while accepting a single color for breakout direction.
  • Consequences: Simultaneously active diagnostic lines at the same fixed position now render as stacked text in one chart object instead of overlapping. Per-line colors are intentionally not preserved because Draw.TextFixed() styles the whole fixed text object. Single-occupant positions (Diag_Session top-right, Diag_TestMode center, and Diag_Prov bottom-right) are unchanged. Native NT8 strategy-parameter-display overlap has not been validated in this code session and still requires visual chart confirmation.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: Visually verify multiple top-left and bottom-left conditions render stacked, and confirm whether NT8's native strategy-parameter display still overlaps the consolidated top-left block.

DEC-20260818-10

  • ID: DEC-20260818-10
  • Date: 2026-08-18
  • Status: accepted
  • Context: DEC-20260818-07 intentionally scoped EnableEthTelemetry to text telemetry only: the ETH branch called MaybeWriteStateTelemetry() and returned before DrawDiagnostics(). Live chart review showed stale RTH visual labels during ETH because DrawDiagnostics() had not run since a prior RTH/TestMode bar. Source review of NT8StrategyBase.DrawDiagnostics() and SimpleORBNT8.DrawDiagnostics() confirmed the methods are gated by EnableChartDiagnostics and use chart drawing calls only, without _sdkStrategy.OnBar(), ProcessStrategyIntent(), order submission, or trading state mutation.
  • Decision: When a bar is outside RTH, TestMode is false, and EnableEthTelemetry is true, the existing ETH telemetry branch now calls DrawDiagnostics() in the same try/catch after building read-only bar/context state and writing optional state telemetry. The branch still returns before _sdkStrategy.OnBar() and ProcessStrategyIntent(), so ETH telemetry remains visual/read-only only.
  • Consequences: With EnableEthTelemetry=true and EnableChartDiagnostics=true, the chart's session tag, ORB box, trigger lines, and breakout indicators can refresh during ETH instead of displaying stale RTH drawings. With EnableEthTelemetry=false, default ETH behavior remains unchanged. RTH and Strategy Analyzer paths are unchanged.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: In a live ETH session, verify SESSION: ETH and ORB visual diagnostics refresh with EnableEthTelemetry=true/EnableChartDiagnostics=true, and verify no SUBMIT/FILL lines appear outside RTH from this path.

DEC-20260818-09

  • ID: DEC-20260818-09
  • Date: 2026-08-18
  • Status: accepted
  • Context: ProcessStrategyIntent() calculated position size using the static intent.StopTicks emitted by the SDK strategy, while SubmitOrderToNT8() later overwrote intent.StopTicks with the ATR-derived dynamic stop when EnableDynamicStop=true. That meant contract count was based on a stale stop distance and could diverge materially from the actual submitted stop risk. The same ordering defect affected RecommendedContracts telemetry because the telemetry intent used SimpleORBNT8.StopTicks rather than the current dynamic stop. This is distinct from DEC-20260818-08's historical-replay order-submission block.
  • Decision: Dynamic ATR stop finalization now happens before sizing. NT8StrategyBase.ProcessStrategyIntent() applies the existing EnableDynamicStop && CurrentBars[0] >= AtrPeriod formula and min/max clamping before portfolio/per-strategy risk, _positionSizer.CalculateSize(), and submission. SubmitOrderToNT8() no longer recomputes or overwrites intent.StopTicks; it trusts the already-finalized value. Telemetry uses the same helper before RecommendedContracts sizing, and SimpleORBNT8.BuildStateTelemetryIntent() seeds the telemetry intent with the finalized stop ticks rather than the static StopTicks parameter.
  • Consequences: With EnableDynamicStop=true, real order sizing, SUBMIT Stop=<ticks>, and RecommendedContracts now reference the same stop distance. Historical Strategy Analyzer results with dynamic stop enabled are expected to change because this corrects a real contract-sizing defect. With EnableDynamicStop=false, the helper is a no-op and static-stop behavior is unchanged.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: In NT8, compare one dynamic-stop signal end to end: dynamic stop log, SUBMIT Stop=<ticks>, submitted contract count, and STATE_CONTEXT RecommendedContracts should all reflect the ATR-finalized stop. Run a Strategy Analyzer before/after comparison with EnableDynamicStop=true and record the expected contract-count/P&L delta.

DEC-20260818-08

  • ID: DEC-20260818-08
  • Date: 2026-08-18
  • Status: accepted
  • Context: Live/SIM strategy startup can process NT8 historical catch-up bars before State.Realtime. DEC-20260817-02 fixed the prior partial symptom by preventing WriteTradeProvenance() from writing phantom trades_*.jsonl rows outside realtime, but it explicitly did not alter signal generation, risk validation, sizing, or order submission. Live evidence later confirmed that historical catch-up bars from prior RTH sessions could still produce a full Intent -> Risk approved -> Sized -> Submitted -> Filled sequence because the realtime replay-age guard and _realtimeBarSeen guard do not run while State == State.Historical, and the RTH guard checks time of day without date freshness.
  • Decision: NT8StrategyBase.ProcessStrategyIntent() now blocks live/SIM historical replay catch-up before any portfolio risk, direction, risk-manager, sizing, or order-submission logic when State == State.Historical && Account != null. The reject reason is distinct: HistoricalReplayCatchup. Strategy Analyzer/backtest behavior remains intentionally untouched because Account == null during genuine State.Historical backtests, so simulated historical orders still flow normally there. LogRejectRateLimited() permits this one reason to write a REJECT: line even though State is historical, so the catch-up safety block is visible in session diagnostics.
  • Consequences: This closes the actual order-submission gap left open by DEC-20260817-02 while retaining that provenance-file gate as an independent second safety net. MaxDailyTrades and daily P&L should no longer be affected by live/SIM catch-up activity because catch-up-phase intents cannot reach submission at all. Validation still requires a live/SIM restart with catch-up history and a Strategy Analyzer regression comparison for unchanged trade count and P&L.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: Restart NT8 with the live/SIM strategy attached to an account and confirm REJECT: reason=HistoricalReplayCatchup appears during catch-up with zero SUBMIT/FILL until State.Realtime and _realtimeBarSeen are true; run a Strategy Analyzer backtest over the same range and confirm trade count and P&L are unchanged.

DEC-20260818-07

  • ID: DEC-20260818-07
  • Date: 2026-08-18
  • Status: accepted
  • Context: In the consolidated fix batch, the operator needed regime/factor/grade telemetry during ETH hours without touching the real SimpleORBStrategy entry state machine. The existing RTH guard in NT8StrategyBase.OnBarUpdate() returned before MaybeWriteStateTelemetry(), so sessions started during ETH produced no STATE: lines. The real strategy path must remain protected: no ETH call to _sdkStrategy.OnBar(), no ProcessStrategyIntent(), and no TestMode behavior changes.
  • Decision: Added opt-in EnableEthTelemetry (false by default) under Diagnostics. When a bar is outside RTH and TestMode is false, the existing RthGuard rejection still logs; if and only if EnableEthTelemetry is true, NT8StrategyBase builds BarData/StrategyContext from current read-only adapter state, calls MaybeWriteStateTelemetry(), then returns immediately. This path does not call DrawDiagnostics(), _sdkStrategy.OnBar(), or ProcessStrategyIntent().
  • Consequences: Default ETH behavior remains unchanged. Operators can opt into STATE:/STATE_DETAIL:/STATE_CONTEXT: during ETH at the existing telemetry throttle for diagnostics only, with no path to submit an ETH order through this feature.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: In a live ETH session, verify EnableEthTelemetry=false produces no ETH STATE: lines, EnableEthTelemetry=true produces state telemetry, and no SUBMIT/FILL lines appear outside RTH.

DEC-20260818-06

  • ID: DEC-20260818-06
  • Date: 2026-08-18
  • Status: accepted
  • Context: In the consolidated fix batch, real STATE_DETAIL: output showed daily-context factors returning "No daily bar context available" even though SimpleORBNT8.OnBarUpdate() already builds DailyBarContext every bar and stores it at _strategyConfig.Parameters["daily_bars"]. Root cause: real intents get this context via SimpleORBStrategy.AttachDailyBarContext(), but the synthetic SimpleORBNT8.BuildStateTelemetryIntent() created an empty metadata dictionary, and factor calculators read daily context from intent.Metadata["daily_bars"].
  • Decision: SimpleORBNT8.BuildStateTelemetryIntent() now creates a metadata dictionary and, when _strategyConfig.Parameters["daily_bars"] exists, attaches that same object under "daily_bars" before returning the synthetic telemetry intent. It deliberately does not call AttachDailyBarContext() because that helper mutates trade-direction, breakout-volume, and ORB fields for real trade candidates.
  • Consequences: State telemetry factors can now use the same warmed daily context as the accepted-trade path without mutating SDK strategy state. Expected live result is real NR4/NR7 and ORB-vs-ATR reason text in STATE_DETAIL: once daily context is warmed, with no change to SIGNAL/SUBMIT/FILL/REJECT behavior.
  • Related Files: src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: Confirm live STATE_DETAIL: reason strings no longer report missing daily context once the daily series is warmed.

DEC-20260818-05

  • ID: DEC-20260818-05
  • Date: 2026-08-18
  • Status: accepted
  • Context: The dashboard Data Series Detail panel exposed that SimpleORBNT8 was loading duplicate daily bar series: SimpleORBNT8.OnStateChange() called AddDataSeries(BarsPeriodType.Day, 1) in State.Configure, then called base.OnStateChange(), whose State.Configure branch also added the shared daily series for TASK-06c regime SMA20/50 context. Live evidence showed BarsArray[1] and BarsArray[2] were both DayBarsType, DaysToLoad=365, HistoricalBarsLoaded=130. This was an existing latent bug that predated today's telemetry/dashboard work and was only made visible because the dashboard now shows the full BarsArray readiness detail.
  • Decision: Removed the subclass AddDataSeries(BarsPeriodType.Day, 1) call from SimpleORBNT8. The base class remains the single owner of the shared daily series, so BarsArray[1] keeps the same role and ordering for SimpleORBNT8.BuildDailyBarContext() and NT8StrategyBase.BuildStrategyContext() regime calculations. A source comment now notes that NT8StrategyBase provides the shared daily series to avoid reintroducing the duplicate.
  • Consequences: Expected live readiness is now two series total: primary bars plus one daily series, with the same daily historical count as before. NR7, ORB-vs-ATR, regime SMA20/50, signal generation, sizing, and order behavior should remain unchanged because all current consumers already read daily data from index [1]; the removed [2] series had no intended consumer.
  • Related Files: src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: After deploy and NT8 compile, confirm the Historical readiness block/dashboard Data Series Detail reports only primary plus one daily series and that daily bar count remains unchanged.

DEC-20260818-04

  • ID: DEC-20260818-04
  • Date: 2026-08-18
  • Status: accepted
  • Context: DEC-20260818-02/03 added STATE_CONTEXT: (ORB high/low/window from SimpleORBNT8, plus the universal RecommendedContracts field from NT8StrategyBase) but left dashboard parsing for a separate task, and verification against the actual deployed source (NT8StrategyBase.cs, SimpleORBNT8.cs) confirmed the format matched exactly what was documented.
  • Decision: Added STATE_CONTEXT_RE/parse_state_context_fields() to parsers.py (plain space-separated Key=Value tokens, deliberately generic rather than ORB-specific since the field set is strategy-extensible per the GetStateTelemetryContextFields() extension point). server.py._apply_event() stores the result at live_state.state_context. console.html/console.js: a new ORB range block renders OrbHigh/OrbLow/window under Strategy Status's Session Filter section (with an honest "not yet established" empty state), and the State Telemetry stat-grid gains a fifth Recommended Contracts stat sourced live from state_context.RecommendedContracts when present — distinct from the existing post-trade last_submit.fields sizing block, since this one updates continuously at the telemetry cadence rather than only after a real SUBMIT.
  • Consequences: Closes the loop on both DEC-20260818-02 and DEC-20260818-03's deferred dashboard work in one pass. Not yet executed against a live payload, since Claude has no code-execution access on the operator's machine — verify via /api/state or the console page once a session with an established ORB range is running.
  • Related Files: tools/dashboard/parsers.py, tools/dashboard/server.py, tools/dashboard/console.html, tools/dashboard/console.js, docs/00-governance/decisions.md
  • Action Required: Confirm live_state.state_context populates with OrbHigh/OrbLow/OrbWindowStart/OrbWindowEnd/OrbReady/RecommendedContracts once the ORB range establishes in a live session, and that the dashboard's ORB Range block and Recommended Contracts stat render correctly.

DEC-20260818-03

  • ID: DEC-20260818-03
  • Date: 2026-08-18
  • Status: accepted
  • Context: The operator re-authorized recommended-contract telemetry after DEC-20260818-01 clarified that BasicPositionSizer.CalculateSize() has no internal mutable state a telemetry-only call could corrupt. The only side effect is logger output, which does not feed back into sizing/order behavior and is limited by the existing 30-second state telemetry throttle.
  • Decision: MaybeWriteStateTelemetry() now calls _positionSizer.CalculateSize(telemetryIntent, context, _sizingConfig) after computing the confluence score, only inside the existing EnableStateTelemetry && EnableFileLogging && State == State.Realtime and 30-second throttle gates. The resulting SizingResult.Contracts is logged only, never stored or used for order submission. Because DEC-20260818-02 already introduced STATE_CONTEXT:, the recommended size extends that line as RecommendedContracts=<N> instead of creating another near-duplicate telemetry line. When ORB context is also ready, the full line is STATE_CONTEXT: OrbHigh=<F2> OrbLow=<F2> OrbWindowStart=<HH:mm> OrbWindowEnd=<HH:mm> OrbReady=<True|False> RecommendedContracts=<N>; before ORB readiness, STATE_CONTEXT: RecommendedContracts=<N> may still be emitted.
  • Consequences: The dashboard/parser follow-up can read one context line for both strategy-specific context and display-only recommended sizing. Trustworthiness still requires live validation: when a real trade later submits under matching conditions, RecommendedContracts should match SUBMIT's Scaler + Runner quantity; if not, telemetry inputs must be reconciled before presenting the value as authoritative.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: Run a live session and compare STATE_CONTEXT RecommendedContracts=<N> against the next matching SUBMIT Scaler=<S> Runner=<R> total.

DEC-20260818-02

  • ID: DEC-20260818-02
  • Date: 2026-08-18
  • Status: accepted
  • Context: The operator needs the opening-range high/low and ORB window visible in text telemetry and the dashboard, but ORB fields are strategy-specific and should not become part of NT8StrategyBase.cs's generic STATE: schema. SimpleORBNT8.DrawDiagnostics() already reads these values from SimpleORBStrategy's public diagnostic getters, so logging them can remain read-only and aligned with chart diagnostics.
  • Decision: Added protected virtual Dictionary<string, string> GetStateTelemetryContextFields(BarData barData, StrategyContext context) to NT8StrategyBase; the base implementation returns null. MaybeWriteStateTelemetry() now calls the extension point at the same throttled cadence as STATE:/STATE_DETAIL: and emits STATE_CONTEXT: Key1=Value1 Key2=Value2 ... only when a strategy returns non-empty fields. SimpleORBNT8 overrides the method and returns OrbHigh=<F2> OrbLow=<F2> OrbWindowStart=<HH:mm> OrbWindowEnd=<HH:mm> OrbReady=<True|False> once sdkOrb.OpeningRangeReady is true and OpeningRangeHigh > OpeningRangeLow; otherwise it returns null so consumers can distinguish not-ready from ready values.
  • Consequences: Future strategies can add strategy-specific state telemetry context without changing the generic STATE: line or hardcoding ORB concepts into the base class. The format deliberately uses unquoted space-separated key/value tokens because these values are numeric/time/boolean tokens with no internal spaces.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: Parser/dashboard support for STATE_CONTEXT: should be added in a separate presentation/data task if these fields need UI display.

DEC-20260818-01

  • ID: DEC-20260818-01
  • Date: 2026-08-18
  • Status: accepted
  • Context: The "show recommended contract count during state telemetry" task instructed Kilocode to stop if BasicPositionSizer.CalculateSize() wasn't provably stateless, mirroring DEC-20260817-04's caution for RegimeManager/TrendRegimeDetector/VolatilityRegimeDetector. Kilocode correctly stopped, reporting CalculateSize() calls _logger.LogDebug()/LogWarning(), which BasicLogger routes to Console.WriteLine(), and is therefore not I/O-free.
  • Decision: Direct source read of BasicPositionSizer.cs confirms it has exactly one instance field (_logger, set once in the constructor, never written to elsewhere) and no other state. CalculateSize() derives its result purely from its (intent, context, config) parameters and returns a fresh SizingResult each call; there is no internal history/dictionary a telemetry-only call could seed or corrupt. This is categorically different from the RegimeManager case, where the disqualifying risk was a diagnostic call silently building up state (_barHistory, _currentStates, _transitions) that a future real caller would then see polluted. BasicPositionSizer has no such state; its only side effect is console text output, which does not feed back into any calculation, does not affect order behavior, and is negligible in volume at the existing 30-second telemetry throttle. The task is re-authorized: MaybeWriteStateTelemetry() may call _positionSizer.CalculateSize() for display purposes.
  • Consequences: Establishes the actual test for future "is this safe to call for telemetry" questions: state that could corrupt a future real caller disqualifies a component (as with RegimeManager); I/O alone, on a component with no other internal state, does not. Future prompts citing "not provably stateless" should specify which kind of impurity was found rather than treating all impurity as equally disqualifying.
  • Related Files: src/NT8.Core/Sizing/BasicPositionSizer.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: Re-run the recommended-contract-count telemetry task per the original prompt, now unblocked.

DEC-20260817-11

  • ID: DEC-20260817-11
  • Date: 2026-08-17
  • Status: accepted
  • Context: Operator raised several architecture questions after reviewing the console dashboard: whether the platform-neutral SDK goal is still real, whether 24x7 trading means switching strategies or running them concurrently, whether a control-plane UI requires an NT8 AddOn, and flagged that multi-account/multi-timeframe support aren't yet real. Each was answered by direct source reading rather than recollection (NT8.Core file contents confirmed no NinjaTrader.* references; PortfolioRiskManager.cs read in full to confirm its concurrent-strategy design and its lack of an account key).
  • Decision: Recorded findings in docs/00-governance/architecture.md: a Platform-Neutral SDK Invariant section (with an explicit rule against NT8.Core gaining NinjaTrader references), a Multi-Strategy / 24x7 Trading Architecture section confirming the "shared everything but entry" pattern is already real and that PortfolioRiskManager was already built for concurrent strategies, and a Control Plane section presenting the external-command-channel alternative to an NT8 AddOn. Added GAP-042 (no account dimension in PortfolioRiskManager) to Sprint 4 in roadmap.md, and added multi-timeframe regime alignment as an unscoped Sprint 6 idea, both cross-referenced back to architecture.md.
  • Consequences: These answers are now durable repo state rather than only having existed in a chat response. Future sessions asking the same architecture questions can be pointed at architecture.md directly. GAP-042 must be resolved before Sprint 4's multi-strategy plans extend to multiple accounts.
  • Related Files: docs/00-governance/architecture.md, docs/00-governance/roadmap.md, docs/00-governance/decisions.md
  • Action Required: None in code now. GAP-042 implementation and the multi-timeframe regime design pass are both unscoped future work, not queued into an active sprint.

DEC-20260817-10

  • ID: DEC-20260817-10
  • Date: 2026-08-17
  • Status: accepted
  • Context: DEC-20260817-09 added STATE_DETAIL:/SIGNAL_DETAIL: log lines and appended sizing-rationale fields to SUBMIT, but explicitly left dashboard/logtriage parser updates for a separate task. Console.js's Confluences and Factor Breakdown panels had no way to surface the human-readable factor reasons (e.g. NR4/NR7 determination, ORB-vs-ATR ratio) the operator specifically asked for, and the R:R panel had no live per-trade sizing data, only static config. Also found and removed dead code predating this session's changes: parsers.py had two STATE_RE definitions (the second silently overwrote the first), which left an entire state = STATE_RE.search(message) branch in parse_session_event() permanently unreachable since the newer regex's branch, positioned earlier in the function, always matched and returned first.
  • Decision: Added parse_quoted_reasons() (reverses EscapeLogValue()'s backslash/quote escaping) and STATE_DETAIL_RE/SIGNAL_DETAIL_RE to parsers.py; parse_session_event() now returns type: "STATE_DETAIL"/"SIGNAL_DETAIL" events with a reasons dict keyed by factor name. Added parse_submit_fields() (numeric coercion for BaseTarget/DynamicTarget/GradeMult/ModeMult/CombinedMult, leaving "N/A" as a string so it's distinguishable from 0) and enriched the existing SUBMIT event with a fields dict. server.py._apply_event() stores these at live_state.state_telemetry_reasons, live_state.last_signal_reasons, and within live_state.last_submit.fields. console.html/console.js: Confluences and Factor Breakdown rows now carry a title tooltip from state_telemetry_reasons[name] when available; a new "Live Sizing" block under the static R:R panel renders last_submit.fields once a trade has submitted this session, with an honest "no trade submitted yet" empty state otherwise.
  • Consequences: This closes the loop DEC-20260817-09 left open — factor reasons and per-trade sizing rationale now reach the dashboard, not just the session log. Parsing logic was verified by hand-tracing the documented formats against DEC-20260817-09's exact line specifications (quoted-value escaping, unquoted SUBMIT fields with N/A fallback) but not executed, since Claude has no code-execution access on the operator's machine, and the underlying NT8StrategyBase.cs change has not yet been redeployed (blocked on NT8.Core.dll file lock — NinjaTrader must fully close before deploy-to-nt8.bat can succeed). The dead STATE_RE shadow bug predated this session's own DASH-002 work but was only now discovered and removed.
  • Related Files: tools/dashboard/parsers.py, tools/dashboard/server.py, tools/dashboard/console.html, tools/dashboard/console.js, docs/00-governance/decisions.md
  • Action Required: Once NT8.Core.dll is unlocked and the telemetry enrichment redeploys/recompiles cleanly, confirm via /api/state (or the console page) that state_telemetry_reasons, last_signal_reasons, and last_submit.fields populate with real values, and that tooltips render correctly on hover.

DEC-20260817-09

  • ID: DEC-20260817-09
  • Date: 2026-08-17
  • Status: accepted
  • Context: DASH-002 STATE: telemetry and accepted-trade SIGNAL/SUBMIT logging exposed scores and order shape but discarded already-computed sizing rationale and each ConfluenceFactor.Reason. The data already exists on intent.Metadata and ConfluenceScore.Factors; surfacing it is logging-only and must not change signal generation, sizing, risk validation, or order submission behavior.
  • Decision: Keep existing score-bearing line formats intact except for appending metadata fields to SUBMIT. Accepted-trade factor reasons are emitted as a separate line immediately after SIGNAL: SIGNAL_DETAIL: Setup="<reason>" Trend="<reason>" Volatility="<reason>" Timing="<reason>" ExecutionQuality="<reason>" NarrowRange="<reason>" OrbRangeVsAtr="<reason>" GapDirectionAlignment="<reason>" BreakoutVolumeStrength="<reason>" PriorDayCloseStrength="<reason>". State telemetry factor reasons are emitted at the same cadence and immediately after STATE: STATE_DETAIL: Setup="<reason>" Trend="<reason>" Volatility="<reason>" Timing="<reason>" ExecutionQuality="<reason>" NarrowRange="<reason>" OrbRangeVsAtr="<reason>" GapDirectionAlignment="<reason>" BreakoutVolumeStrength="<reason>" PriorDayCloseStrength="<reason>". The SUBMIT line appends BaseTarget=<base_target_ticks|N/A> DynamicTarget=<dynamic_target_ticks|N/A> GradeMult=<grade_multiplier|N/A> ModeMult=<mode_multiplier|N/A> CombinedMult=<combined_multiplier|N/A> after the existing Mode=<mode> field.
  • Consequences: Dashboard/logtriage parsers can add support for SIGNAL_DETAIL, STATE_DETAIL, and appended SUBMIT fields later without ambiguity. Existing SIGNAL, Factors:, FILL, PNL_UPDATE, and REJECT lines are not removed or reordered. Reason values are double-quoted with backslashes and quotes escaped because reason text may contain punctuation or semicolons.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md
  • Action Required: Update dashboard/logtriage parsers in a separate task if these detail lines need structured UI display.

DEC-20260817-08

  • ID: DEC-20260817-08
  • Date: 2026-08-17
  • Status: accepted
  • Context: DASH-002's STATE: telemetry line was confirmed live in session_20260817_202803.log (validated in a real realtime session: STATE: Regime=Neutral Direction=Buy DirectionSource=OpeningRangeMidpoint Score=0.550 Grade=D Factors=Setup=0.50x1.00;...), but tools/dashboard/parsers.py's parse_session_event() had no handling for it — the dashboard's console.html/console.js plan (DASH-004) explicitly noted this as "pending DASH-002" and had no real data source yet.
  • Decision: Added STATE_RE and parse_state_factors() to parsers.py, following the same Factors=name=scorexweight;... convention already used for GradeFilter reject-detail parsing. parse_session_event() now returns a type: "STATE" event with regime, direction, direction_source, score, grade, and a structured factors list. server.py._apply_event() stores the latest one at live_state.state_telemetry, refreshed every poll from the session-log tail like every other live field, so it is available via /api/state with no additional wiring.
  • Consequences: Live regime/grade/factor data now actually reaches the dashboard rather than sitting only in the session log. Observed cadence in this test session was ~5 minutes, not the 30s floor from DEC-20260817-07, because this session's primary series is MinuteBarsType and MaybeWriteStateTelemetry() only gets a chance to fire on OnBarUpdate() (bar close) — on the gate's actual HFT Algo Bars primary series, cadence will sit much closer to the 30s floor. Parsing logic was hand-verified against the real log line (all six capture groups resolve correctly, including the Grade=D immediately followed by Factors= boundary) but not executed, since Claude has no code-execution access on the operator's machine.
  • Related Files: tools/dashboard/parsers.py, tools/dashboard/server.py, docs/00-governance/decisions.md
  • Action Required: Confirm via a live /api/state poll (or the dashboard once loaded) that live_state.state_telemetry populates and updates roughly on the observed cadence.

DEC-20260817-07

  • ID: DEC-20260817-07
  • Date: 2026-08-17
  • Status: accepted
  • Context: DASH-002 needs continuous confluence/regime telemetry for the dashboard, but per-HFT-bar logging could create excessive session-log volume and disk I/O on the strategy thread. The implementation must remain additive observability only and must not call state-mutating regime detector methods documented in DEC-20260817-04.
  • Decision: Emit STATE: telemetry at most once every 30 seconds while State == State.Realtime, EnableFileLogging == true, and EnableStateTelemetry == true. The line records Regime, diagnostic Direction, DirectionSource, Score, Grade, and Factors=<FactorType>=<score>x<weight>;... using the same factor-breakdown convention consumed by dashboard GradeFilter parsing. Direction is explicit so synthetic diagnostic scoring cannot be mistaken for an accepted trade signal.
  • Consequences: Expected full RTH volume is approximately 780 lines per 6.5-hour session, plus normal session logs, which is low enough for operator diagnostics while avoiding per-bar HFT log flooding. Existing SIGNAL, SUBMIT, FILL, PNL_UPDATE, and REJECT lines remain unchanged. The dashboard can replace its DASH-002 placeholder with real latest-state telemetry when these lines are present.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, tools/dashboard/parsers.py, tools/dashboard/server.py, tools/dashboard/console.html, tools/dashboard/console.js
  • Action Required: Dual-deploy, manually compile all NinjaScript in NT8, and verify STATE: lines appear in a realtime session before relying on dashboard telemetry.

DEC-20260713-01

  • ID: DEC-20260713-01
  • Date: 2026-07-13
  • Status: accepted
  • Context: July 11 sprint executed 11 tasks from old pre-v6.1 queue (TASK-06a, TASK-06b, GAP-003/004/005/006/008/009/010/011/019) but skipped v6.1-mandated TASK-00a/00b (provenance + chart diagnostics). HEAD left broken (duplicate enum/property). Sprint 2.6 executed repair + v6.1 instrumentation in strict order.
  • Decision: Accept July 11 work as valid Sprint 2 substance; Sprint 2.6 completes v6.1 instrumentation. Next sprint = Sprint 3 (Second Strategy + MNQ).
  • Consequences: Sprint numbering aligned with v6.1. Governance artifacts now match code reality. SIM gate requires all 5 Sprint 2.6 tasks + governance reconciliation before live.
  • Related Files: docs/00-governance/current_status.md, SPRINT_BOARD.md, KILOCODE_RUNBOOK.md, docs/00-governance/decisions.md, docs/00-governance/active_work.md, docs/INDEX.md, docs/archive/master_docs/NT8_SDK_Master_Document_v6.1_Complete.docx, docs/archive/master_docs/NT8_SDK_Operator_Runbook_v1.0.docx
  • Action Required: All Sprint 2.6 governance artifacts committed. Sprint 3 queue active in KILOCODE_RUNBOOK.md. SIM gate remains blocked until governance reconciliation complete.

DEC-20260711-03

  • ID: DEC-20260711-03
  • Date: 2026-07-11
  • Status: accepted
  • Context: Without a portfolio-level heat limit, multiple strategies or multiple positions within a strategy could each risk 2-3% of account simultaneously, leading to 6-9%+ aggregate risk. Need a Tier 3.5 check that caps total open risk + new trade risk as % of account balance.
  • Decision: Added MaxHeatPct (default 3.0%) to AdvancedRiskConfig. Implemented ValidatePortfolioHeat() in AdvancedRiskManager that computes: TotalOpenRisk = Σ|exposure| from _state.ExposureBySymbol; NewTradeRisk = |intent.StopTicks × tickValue × estimatedQty|; HeatPct = (TotalOpenRisk + NewTradeRisk) / Account.Equity × 100. Called as Tier 3.5 in ValidateOrder() after correlation checks. Returns Reject with detailed metrics when exceeded. Edge cases: skips if MaxHeatPct ≤ 0 or account balance ≤ 0. Logs via _logger.LogDebug.
  • Consequences: Prevents aggregate risk blowout across strategies. Backward compatible: MaxHeatPct=0 disables. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Core\Risk\AdvancedRiskModels.cs (MaxHeatPct in AdvancedRiskConfig), src\NT8.Core\Risk\AdvancedRiskManager.cs (ValidatePortfolioHeat, Tier 3.5 call)
  • Action Required: Verify in SIM — session log should show "[SDK] Heat check: X% of 3.0% limit" when heat check runs; test rejection by loading multiple strategies/positions to exceed 3% heat.

DEC-20260711-04

  • ID: DEC-20260711-04
  • Date: 2026-07-11
  • Status: accepted
  • Context: RiskPerTrade (sizing parameter) could exceed MaxTradeRisk (validation limit) silently, allowing trades that would be rejected by the risk manager. This created a configuration hazard where the sizing engine would calculate position sizes based on RiskPerTrade, only to have them rejected by MaxTradeRisk check.
  • Decision: Added RiskPerTrade property to RiskConfig (defaults to MaxTradeRisk for backward compatibility). In BasicRiskManager.ValidateOrder(), added startup assertion: if (config.RiskPerTrade > config.MaxTradeRisk) throw ArgumentException with clear message identifying both values. This fails fast at order validation time rather than silently rejecting trades.
  • Consequences: Configuration errors are caught immediately with actionable message. Backward compatible: existing configs without explicit RiskPerTrade use MaxTradeRisk value. Added 3 unit tests: > throws, == accepted, < accepted.
  • Related Files: src\NT8.Core\Common\Models\Configuration.cs (RiskPerTrade in RiskConfig), src\NT8.Core\Risk\BasicRiskManager.cs (validation in ValidateOrder), tests\NT8.Core.Tests\Risk\BasicRiskManagerTests.cs (3 new tests)
  • Action Required: Verify in SIM with config where RiskPerTrade > MaxTradeRisk — should throw ArgumentException with clear message.

DEC-20260711-02

  • ID: DEC-20260711-02
  • Date: 2026-07-11
  • Status: accepted
  • Context: Fixed 8-tick stop on NQ ignores market volatility. At typical ATR of 20-40 ticks, an 8-tick stop causes chronic stop-outs before the move develops. Need dynamic ATR-based stop sizing that adapts to actual market conditions.
  • Decision: Implemented ATR-based dynamic stop in NT8StrategyBase with 5 new parameters: EnableDynamicStop (default false), AtrPeriod (14), AtrMultiplier (1.5), MinStopTicks (12), MaxStopTicks (50). In SubmitOrderToNT8(), before sizing: if EnableDynamicStop and CurrentBars[0] >= AtrPeriod, compute dynStop = clamp(round(ATR[0]/TickSize × AtrMultiplier), Min, Max), override intent.StopTicks, recalculate target from R:R ratio, pass ATR to context.CustomData["current_atr"] for Factor 3 and TrailingStopManager. Added [SDK] Dynamic stop logging.
  • Consequences: Stop now scales with volatility — tighter stops in quiet markets, wider in volatile. Backward compatible: EnableDynamicStop=false preserves fixed StopTicks. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Adapters\Strategies\NT8StrategyBase.cs (5 params, dynamic stop logic, logging)
  • Action Required: Verify in SIM with EnableDynamicStop=true — session log should show [SDK] Dynamic stop line with computed value inside 12-50t; chart stop line should sit at ATR distance, not fixed 40t.

DEC-20260711-01

  • ID: DEC-20260711-01
  • Date: 2026-07-11
  • Status: accepted
  • Context: The original runner architecture coupled position management to capital sizing via useRunner = Qty >= 2. This meant the runner (trailing stop leg) never activated at responsible ATR-based stops (typically Qty=1 at $200 risk with NQ ATR=20-40 ticks). The runner should be a POSITION MANAGEMENT MODE, not a quantity gate.
  • Decision: Implemented RunnerMode enum with four modes: Auto (resolves Mode1 when Qty≥2, Mode2 when Qty=1), Mode1DualLeg (scaler + runner), Mode2RunnerOnly (full qty on trail stop, no fixed target), Mode3ScalerOnly (full qty with fixed target, no runner), Disabled (original single-leg). Added [NinjaScriptProperty] RunnerActivationMode to NT8StrategyBase with default Auto. Replaced the hardcoded quantity check with ResolveRunnerMode() logic and mode-specific order submission in SubmitOrderToNT8(). Added [SDK] Runner mode resolved: {Mode} (Qty={N}) logging.
  • Consequences: Runner now fires at Qty=1 with ATR-based stops, decoupling position management from sizing. Backward compatible: existing configs with EnableRunner=true and Qty≥2 will resolve to Mode1DualLeg automatically. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Core\Common\Models\Configuration.cs (RunnerMode enum), src\NT8.Adapters\Strategies\NT8StrategyBase.cs (RunnerActivationMode property, ResolveRunnerMode(), SubmitOrderToNT8() mode logic)
  • Action Required: Verify Mode2RunnerOnly behavior in SIM with Qty=1 scenarios.

DEC-20260711-06

  • ID: DEC-20260711-06
  • Date: 2026-07-11
  • Status: accepted
  • Context: The bar-driven _tradeTaken re-arm in SimpleORBStrategy.OnBar() was unreliable — it cleared _tradeTaken on the next bar after a trade intent, regardless of whether the NT8 position actually closed. This could allow overlapping entries if a new breakout bar arrived before the first trade was filled or stopped out. The original decision (DEC-20260429-01) accepted this for SIM but noted it must be fixed before live.
  • Decision:
    1. Added OnPositionUpdate() logic in NT8StrategyBase that detects when position goes flat (MarketPosition.Flat or Quantity == 0) and sends clear_trade_taken to the SDK strategy via SetParameters().
    2. Added clear_trade_taken handler in SimpleORBStrategy.SetParameters() that clears _tradeTaken, _breakoutBarSeen, and _pendingBreakoutDirection (but preserves _dailyTradeCount).
    3. Added EnableBarBasedRearm parameter (default false) to both NT8StrategyBase and SimpleORBNT8 to gate the legacy bar-driven re-arm for SIM-only mode.
    4. The bar-driven re-arm in SimpleORBStrategy.OnBar() now only executes when EnableBarBasedRearm == true.
  • Consequences: Position-close re-arm is now the primary mechanism for live trading (reliable, NT8-native). Bar-driven re-arm is opt-in via EnableBarBasedRearm=true for SIM/backtest scenarios. Backward compatible: defaults disable bar-driven re-arm, preserving existing behavior when explicitly enabled. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Adapters\Strategies\NT8StrategyBase.cs (EnableBarBasedRearm param, OnPositionUpdate clear_trade_taken), src\NT8.Adapters\Strategies\SimpleORBNT8.cs (EnableBarBasedRearm param), src\NT8.Strategies\Examples\SimpleORBStrategy.cs (_enableBarBasedRearm field, SetParameters handlers, gated bar-driven re-arm)
  • Action Required: Verify in SIM with EnableBarBasedRearm=false — position close should clear _tradeTaken and allow new breakout; test EnableBarBasedRearm=true for SIM comparison.

DEC-20260711-07

  • ID: DEC-20260711-07
  • Date: 2026-07-11
  • Status: accepted
  • Context: Short trades were being vetoed by the AVWAP slope check (slope > 0 = bullish regime) without a configurable parameter. This made the filter mandatory and untestable in isolation — users couldn't disable it for testing or strategies that intentionally trade counter-trend.
  • Decision: Added EnableShortTrendFilter parameter (default true) to NT8StrategyBase, SimpleORBNT8, and SimpleORBStrategy. In SimpleORBStrategy.OnBar(), the short veto logic now checks this flag: when true, shorts are blocked if AVWAP slope > 0; when false, shorts are allowed regardless of regime. Long veto in bearish regime (slope < 0) remains always enforced. The flag is passed from NT8 adapter to SDK strategy via StrategyContext.CustomData["EnableShortTrendFilter"].
  • Consequences: Short trend filter is now configurable and testable. Backward compatible: default true preserves existing behavior. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Adapters\Strategies\NT8StrategyBase.cs (EnableShortTrendFilter param, BuildStrategyContext), src\NT8.Adapters\Strategies\SimpleORBNT8.cs (EnableShortTrendFilter param + ConfigureStrategyParameters), src\NT8.Strategies\Examples\SimpleORBStrategy.cs (_enableShortTrendFilter field, SetParameters, OnBar gating)
  • Action Required: Verify in SIM with EnableShortTrendFilter=false — short trades should fire even in bullish regime; with EnableShortTrendFilter=true (default) — shorts blocked when AVWAP slope > 0.

DEC-20260429-01

  • ID: DEC-20260429-01
  • Date: 2026-04-29
  • Status: accepted
  • Context: MaxDailyTrades re-arm logic in SimpleORBStrategy.OnBar() clears _tradeTaken and resets pullback confirmation state on the next bar after a trade intent is generated, not when the NT8 position actually closes. This is because SimpleORBStrategy is a pure C# core class with no visibility into NT8 position lifecycle — it only sees bars.
  • Decision: Accept bar-based re-arm for SIM data collection phase. The daily loss limit (DailyLossLimit) and MaxOpenPositions in the NT8 adapter act as the live position guard, preventing overlapping entries from causing runaway risk in practice.
  • Consequences: In a fast market, a second trade intent could be generated while the first position is still open if the next breakout bar arrives before NT8 has filled or stopped the first trade. This is acceptable in SIM but must be addressed before live trading. The fix is to wire re-arm to a position-close callback in NT8StrategyBase (Sprint 3/4 concern).
  • Related Files: src\NT8.Strategies\Examples\SimpleORBStrategy.cs, src\NT8.Adapters\Strategies\NT8StrategyBase.cs
  • Action Required (pre-live): Implement position-close-driven re-arm in NT8StrategyBase before going live with MaxDailyTrades > 1.

DEC-20260711-08

  • ID: DEC-20260711-08
  • Date: 2026-07-11
  • Status: accepted
  • Context: The strategy had no awareness of CME holidays, meaning it would attempt to trade on days when the market is closed (New Year's Day, MLK Day, Presidents Day, Good Friday, Memorial Day, Independence Day, Labor Day, Thanksgiving, Christmas) or has early closes (day after Thanksgiving, Christmas Eve, New Year's Eve). This caused errors and wasted compute on non-trading days.
  • Decision: Implemented CmeHolidayCalendar with full CME holiday schedule including observed dates (weekend -> nearest weekday). Added EnableCMEHolidayGuard parameter (default true) to NT8StrategyBase, SimpleORBNT8, and SimpleORBStrategy. In NT8StrategyBase.OnBarUpdate(), checks CmeHolidayCalendar.IsHoliday(Time[0].Date) and skips bar processing. In SimpleORBStrategy.OnBar(), checks CmeHolidayCalendar.ShouldSkipOrbWindow(bar.Time.Date) and returns null. Holiday list: New Year's Day (Jan 1), MLK Jr. Day (3rd Mon Jan), Presidents Day (3rd Mon Feb), Good Friday (computed via Easter), Memorial Day (last Mon May), Independence Day (Jul 4), Labor Day (1st Mon Sep), Thanksgiving (4th Thu Nov), Christmas (Dec 25). Early-close days also tracked via IsEarlyClose().
  • Consequences: Strategy now automatically skips non-trading days. Backward compatible: default true preserves new behavior; can disable for testing. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Core\Calendar\CmeHolidayCalendar.cs (new), src\NT8.Adapters\Strategies\NT8StrategyBase.cs (EnableCMEHolidayGuard, OnBarUpdate), src\NT8.Strategies\Examples\SimpleORBStrategy.cs (EnableCMEHolidayGuard, OnBar), src\NT8.Adapters\Strategies\SimpleORBNT8.cs (EnableCMEHolidayGuard)
  • Action Required: Verify in SIM — session log should show "[SDK] CME Holiday Guard: skipping bar YYYY-MM-DD (holiday)" on CME holidays; strategy should not generate signals on those days.

DEC-20260711-09

  • ID: DEC-20260711-09
  • Date: 2026-07-11
  • Status: accepted
  • Context: The runner trailing stop used a fixed RunnerTrailTicks (default 12-20 ticks) regardless of market volatility. In quiet markets this was too wide (giving back profits); in volatile markets too tight (premature stop-outs). Need ATR-based trailing that adapts to actual market conditions.
  • Decision: Added ATR-based trailing stop with 5 new parameters: EnableATRTrailing (default false), ATRTrailingPeriod (14), ATRTrailingMultiplier (2.0), ATRTrailingMinTicks (8), ATRTrailingMaxTicks (60). When EnableATRTrailing=true and CurrentBars[0] >= ATRTrailingPeriod, computes trailTicks = clamp(round(ATR(Close, ATRTrailingPeriod)[0] / TickSize * ATRTrailingMultiplier), ATRTrailingMinTicks, ATRTrailingMaxTicks) and calls SetTrailStop with this dynamic value instead of fixed RunnerTrailTicks. Added logging: [SDK] ATR Trail: ATR={X}ticks x {Y} = {Z}ticks (clamped {Min}-{Max}). When disabled, falls back to fixed RunnerTrailTicks.
  • Consequences: Trailing stop now scales with volatility — tighter in quiet markets, wider in volatile. Backward compatible: EnableATRTrailing=false preserves fixed tick trail. Dual-deployed to NT8 Custom\Strategies.
  • Related Files: src\NT8.Adapters\Strategies\NT8StrategyBase.cs (5 params, ATR trailing logic in SubmitOrderToNT8, logging), src\NT8.Strategies\Examples\SimpleORBStrategy.cs (_enableAtrTrailing field, SetParameters, ATRTrailingPeriod/Multiplier/MinTicks/MaxTicks properties), src\NT8.Adapters\Strategies\SimpleORBNT8.cs (EnableATRTrailing, ATRTrailingPeriod/Multiplier/MinTicks/MaxTicks params + ConfigureStrategyParameters)
  • Action Required: Verify in SIM with EnableATRTrailing=true — session log should show [SDK] ATR Trail line with computed value inside 8-60t; chart trail stop should sit at ATR distance, not fixed 20t.

DEC-20260713-01

  • ID: DEC-20260713-01
  • Date: 2026-07-13
  • Status: superseded
  • Context: Sprint 2.6 (July 11) completed all 5 technical tasks (TASK-FIX-01, TASK-00a, TASK-00b, TASK-06c, GAP-024) and build/tests passed (492 tests). However, the v6.1 Master Document and Operator Runbook (dated July 13) were not committed to the repository, and Sprint artifacts (SPRINT_BOARD.md, KILOCODE_RUNBOOK.md, current_status.md) still reflected Sprint 2.6 state. Governance required reconciliation: commit v6.1 docs to repo archive, promote Sprint 4 backlog to Sprint 3 queue, rewrite sprint artifacts for Sprint 3 (Second Strategy + MNQ Prep), and log this reconciliation decision.
  • Decision:
    1. Committed NT8_SDK_Master_Document_v6.1_Complete.docx and NT8_SDK_Operator_Runbook_v1.0.docx to docs/archive/master_docs/
    2. Rewrote SPRINT_BOARD.md: all 6 Sprint 2.6 tasks marked COMPLETED; Sprint 4 backlog promoted to Sprint 3 queue (TASK-06a Runner Mode, TASK-06b ATR Dynamic Stop, GAP-019 Portfolio Heat, GAP-003 RiskPerTrade Assertion, GAP-004 orbRangeTicks Fix, GAP-005 GetRiskStatus, GAP-006 Position Close Re-arm, GAP-010 Short Regime Filter, GAP-008 CME Holiday, GAP-009 ATR Trailing, GAP-011 Gitea CI, GAP-022 Scenario Tests, GAP-007 Walk-Forward Docs)
    3. Rewrote KILOCODE_RUNBOOK.md for Sprint 3 (Second Strategy + MNQ Prep) with TASK-06a, GAP-013, GAP-015, GAP-014, MNQ-001, MNQ-002 as the Sprint 3 queue
    4. Logged DEC-20260713-01 in decisions.md (this entry)
    5. Updated current_status.md to Sprint 3 handoff state
  • Consequences: Sprint 2.6 governance fully reconciled. Sprint 3 queue defined and staged. SIM Gate remains blocked until governance reconciliation complete (now satisfied). All governance files consistent. Build and 492 tests still pass.
  • Related Files: docs/archive/master_docs/NT8_SDK_Master_Document_v6.1_Complete.docx, docs/archive/master_docs/NT8_SDK_Operator_Runbook_v1.0.docx, SPRINT_BOARD.md, KILOCODE_RUNBOOK.md, docs/00-governance/current_status.md, docs/00-governance/decisions.md
  • Action Required: Verify .\verify-build.bat ✅ | dotnet test ✅ (492 tests) | git status clean

DEC-20260713-02

  • ID: DEC-20260713-02
  • Date: 2026-07-13
  • Status: accepted
  • Context: The 2026-07-13 reconciliation (DEC-20260713-01) incorrectly re-queued 12 implemented tasks, archived master docs, and staged TASK-06a as next action. Code greps confirm all 12 tasks already implemented in code (verified by grep on ResolveRunnerMode, EnableDynamicStop, orbRangeTicks, CmeHolidayCalendar, EnableShortTrendFilter, GetRiskStatus, OnPositionUpdate, clear_trade_taken, ValidatePortfolioHeat, RiskPerTrade).
  • Decision: Restore governance to match code reality.
    1. Move 12 July 11 tasks back to COMPLETED with 2026-07-11 dates in SPRINT_BOARD.md.
    2. Sprint 2.7 queue = TASK-00a (reissued), GAP-024 data layer, GAP-022 scenario tests, GAP-025 diagnosis.
    3. Move master docs from docs/archive/master_docs/ → docs/ + docs/02-runbooks/.
    4. Overwrite NEXT_PROMPT.md with TASK-00a reissue (grep-verifiable acceptance).
    5. Log this decision as DEC-20260713-02 superseding DEC-20260713-01.
    6. Update current_status.md for Sprint 2.7.
  • Consequences: Sprint numbering realigned (2.7 truth reconciliation before 3). Governance artifacts now match code greps. NEXT_PROMPT.md stages TASK-00a reissue. DEC-20260713-01 superseded by this entry.
  • Related Files: SPRINT_BOARD.md, KILOCODE_RUNBOOK.md, NEXT_PROMPT.md, docs/00-governance/current_status.md, docs/00-governance/decisions.md, docs/archive/master_docs/ (to be moved)
  • Action Required: Complete TASK-GOV-02 (governance reconciliation), then TASK-00a reissue.

DEC-20260714-01

  • ID: DEC-20260714-01
  • Date: 2026-07-14
  • Status: accepted
  • Context: ComputeConfigHash() correctly fingerprints NinjaScript parameters, but a mid-gate recompile or redeploy can change executable code while preserving every parameter value and therefore the same config hash.
  • Decision: Persist a compiled-code stamp in all gate-relevant provenance. The stamp is the running assembly version plus ManifestModule.ModuleVersionId; it is written to session provenance, each trade JSONL record, settings exports, and the SimpleORB strategy snapshot. Each real-time signal also writes its TestMode/LIVE MODE state to the session file log.
  • Consequences: Parameter drift and code drift are distinguishable without relying on a manually maintained git SHA. The Gate Run #2 procedure must archive both ConfigHash and CodeVersion, and it forbids dual-deploys after the configuration freeze.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, docs/00-governance/patterns_and_antipatterns.md, SPRINT_BOARD.md, NEXT_PROMPT.md.
  • Action Required: Deploy the cleanup source, compile it in NinjaTrader, then record DEC-GATE2-CONFIG before starting the gate.

DEC-20260810-01

  • ID: DEC-20260810-01
  • Date: 2026-08-10
  • Status: accepted
  • Context: Three settings exports from the same 2026-08-07 session (settings_Simple_ORB_NT8_20260807_101520.txt, _101543.txt, _150539.txt) show BarsPeriod values of "15 Minute", "5 Minute", and "13 42069" (HFT Algo Bars) respectively, yet all three carry the identical ConfigHash df5ff56e6db3a332e40568849f2a2fc7a121f0d57cf228b07935278bc58c9c10. ComputeConfigHash() excludes BarsPeriod from its input, meaning structurally different bar-type configurations are indistinguishable by hash.
  • Decision: Add BarsPeriod (value + unit/type) to the ComputeConfigHash() input. Audit all remaining settings-export fields against current hash inputs and include any other field found in the export but absent from the hash. Hash-computation-only change; trading logic must remain byte-for-byte unaffected. Kilocode prompt issued 2026-08-10, execution pending next non-armed window.
  • Consequences: Any gate run or provenance record predating this fix has unverified config-hash provenance and cannot be cited as proof of a frozen configuration on hash-match alone. Once fixed, hash changes are expected whenever BarsPeriod changes between exports in the same session.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs (ComputeConfigHash()), docs/00-governance/decisions.md
  • Action Required: Deploy fix during a window when the gate strategy is disabled (never mid-armed-session). After deploy, export settings twice in one session with different BarsPeriod values and confirm ConfigHash differs.

DEC-20260810-02

  • ID: DEC-20260810-02
  • Date: 2026-08-10
  • Status: accepted
  • Context: Two broker-confirmed live trades (2026-08-07, 2026-08-10) on SimSimple ORB reconciled to the penny against 8-7_to_8-10_executions.csv. Both were winners; both had the runner leg stopped near breakeven — contributing +1 tick (~$5) on 8/7 and exactly $0 on 8/10 — while the scaler leg produced 100% of net P&L on both days ($227.72 and $262.72 respectively). On 8/10, breakeven triggered at +25 ticks profit, only 3 ticks before the ATR-derived 28-tick target, leaving the runner effectively no room to run before being parked at breakeven and then stopped out by 1 tick of adverse slippage.
  • Decision: No change to runner logic (breakeven trigger placement, RunnerTrailTicks) for Gate Run #3. Sample size (n=2) is insufficient to hand-tune a live parameter; any redesign must go through the Optimization Protocol (backtest-validated via NT8 Strategy Analyzer) before deployment, not be patched into a live/armed run.
  • Consequences: Gate Run #3 continues paying commission on a 3rd (runner) contract with $0–5 demonstrated contribution to date. Revisit trigger set explicitly: after 10 gate trades (half the 20-trade minimum), review runner P&L contribution as a pattern; if still flat/negative, proceed to offline backtest redesign of breakeven trigger distance and/or trail mechanism.
  • Related Files: docs/00-governance/decisions.md, NT8_SDK_Optimization_Protocol.docx, trade records 8-7_to_8-10_executions.csv, session logs session_20260807_101543.log, session_20260810_070736.log
  • Action Required: No code action now. At 10th gate trade, pull runner-specific P&L across all trades to date and decide: keep, disable, or queue for Optimization Protocol redesign.

DEC-20260815-01

  • ID: DEC-20260815-01
  • Date: 2026-08-15
  • Status: accepted — supersedes DEC-20260810-02
  • Context: DEC-20260810-02 deferred all runner-logic changes to a revisit at 10 gate trades, on the reasoning that n=2 was insufficient to tune a live parameter. That reasoning assumed a valid gate run was accumulating interpretable trades. It was not. Gate Run #2 was voided, Gate Run #3 has not started, and GAP-034 means a zero-trade day cannot currently be attributed to a strategy decision versus a defect. A revisit trigger anchored to gate-trade count therefore cannot fire. Additionally, the deferral's core concern — modifying a parameter on a live armed strategy — does not apply: the strategy is disarmed and this work is pre-gate preparation.
  • Decision: Runner redesign is in scope now, during the disarmed pre-gate window. The mechanism is understood: the breakeven trigger at 20 ticks sits close to the scaler target at 16 ticks and the ATR-derived target (28 ticks observed 2026-08-10), leaving the runner no room to extend before being parked at breakeven. The 10-gate-trade revisit trigger from DEC-20260810-02 is withdrawn. Requirement retained from DEC-20260810-02: any new trigger distance must be backtest-validated via the Optimization Protocol, not hand-picked. Validation must use the 60-trading-day warm-up and Tick Replay requirements of DEC-20260814-03.
  • Consequences: Runner parameters are unfrozen until the Gate Run #3 configuration freeze, at which point the swept value is locked with the rest of the config. Gate Run #3 begins with a runner leg that has a documented empirical basis rather than an inherited default.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, NT8_SDK_Optimization_Protocol.docx, docs/00-governance/roadmap.md
  • Action Required: Execute RUNNER-001 sweep, record the selected trigger distance and its supporting statistics in a superseding entry before DEC-GATE3-CONFIG.

DEC-20260814-01

  • ID: DEC-20260814-01
  • Date: 2026-08-14
  • Status: accepted
  • Context: Sessions on 2026-08-03, 08-04, and 08-13 produced zero trades on days with clear NQ breakouts, while 08-07 and 08-10 produced broker-confirmed trades. The defect is intermittent. ProcessStrategyIntent writes a SIGNAL: line to the session file log unconditionally for every realtime intent; no such line appears on the zero-trade days, proving no intent was produced and isolating the fault upstream of the execution pipeline. The four remaining candidate causes (grade filter, MaxDailyTrades latch, ORB range not established, RTH guard) all log exclusively via _logger to the NT8 Output window and never to disk, so no session log can distinguish them retrospectively.
  • Decision: Treat this as GAP-034 and block Gate Run #3 until root cause is identified. Prerequisite fix is GAP-035: route every signal-rejection reason to FileLog alongside _logger so a no-trade day is self-documenting. Do not restart the gate clock on the assumption that quiet days are normal Grade-A filtering.
  • Consequences: Gate Run #3 start date slips. All Sprint 3 completion criteria now include GAP-034 closure. Any future zero-trade day becomes diagnosable from disk without requiring the Output window to have been open at the right moment.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Strategies/Examples/SimpleORBStrategy.cs, docs/00-governance/current_status.md, docs/00-governance/common_failures.md
  • Action Required: Execute GAP-035, redeploy during the disarmed window, then run one session with the Output window open as a cross-check that file and Output agree.

DEC-20260814-02

  • ID: DEC-20260814-02
  • Date: 2026-08-14
  • Status: accepted
  • Context: GetRiskMode() reads _strategyConfig.Parameters["risk_mode"] while the SDK writes resolved risk mode to candidate.Metadata["risk_mode"]. The key is never present in Parameters, so every trade record serializes risk_mode as "Unknown". This is the same defect class as GAP-031, which fixed four fields by name and did not audit the Parameters/Metadata split for other consumers.
  • Decision: Fix as GAP-036 by sourcing from intent.Metadata with Parameters retained as fallback. Additionally require that any provenance field capable of holding a sentinel value ("Unknown", 0.0, "None") carry a round-trip test asserting a real value survives serialization.
  • Consequences: All trade records to date have unusable risk_mode provenance. Gate evidence citing risk mode must be regenerated after the fix.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Core/Logging/TradeProvenanceSerializer.cs, tests/NT8.Core.Tests/Logging/TradeProvenanceSerializerTests.cs
  • Action Required: Execute GAP-036 in the 2026-08-15 to 08-17 disarmed window.

DEC-20260814-03

  • ID: DEC-20260814-03
  • Date: 2026-08-14
  • Status: accepted
  • Context: A backtest of a day that traded live produces zero trades. In Strategy Analyzer the secondary daily series loads only from the backtest start date, so BuildDailyBarContext returns Count=0 below 2 daily bars and daily-dependent confluence factors score neutral, pushing the composite below the Grade A threshold. The regime gate separately requires 50 daily bars (CurrentBars[1] >= SmaPeriodLong) and never arms on short backtests. Neither path raises an error, and the NR7 warm-up advisory deliberately does not block.
  • Decision: This is expected behaviour, not a defect. Backtests intended to reproduce live behaviour must set the Strategy Analyzer start date at least 60 trading days before the target day. When the primary series is non-time-based (HFT Algo Bars, range, tick, volume), Tick Replay must be enabled or bar construction will differ from live regardless of warm-up.
  • Consequences: A zero-trade backtest is not evidence that no signal existed and must not be cited as such. Prior single-day backtest results are void as comparative evidence.
  • Related Files: src/NT8.Strategies/Examples/SimpleORBNT8.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/common_failures.md
  • Action Required: None in code. Fold the 60-day rule and the Tick Replay requirement into the operator runbook and the Optimization Protocol.

DEC-20260814-04

  • ID: DEC-20260814-04
  • Date: 2026-08-14; accepted 2026-08-16
  • Status: accepted
  • Context: SimpleORBNT8.SetDefaults() sets EnableShortTrades = false, commented "Long-only: short trades permanently disabled pending backtest confirmation." Live runs have taken Sell entries via workspace override. Source and runtime therefore disagree, and no gate run is reproducible from a clean checkout. Separately, StartBehavior = AdoptAccountPosition is an undocumented change from the last recorded state.
  • Decision: Shorts are in scope for the strategy under validation. SimpleORBNT8.SetDefaults() must set EnableShortTrades = true so a clean checkout matches live workspace usage. StartBehavior = AdoptAccountPosition is retained because it avoids NT8 start-up synchronization submitting or flattening during historical replay bursts before the first live bar.
  • Consequences: Direction defaults are reproducible from source, and the StartBehavior choice is explicitly documented. Workspace overrides should not be required to reproduce short-enabled gate runs.
  • Related Files: src/NT8.Adapters/Strategies/SimpleORBNT8.cs, src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tests/NT8.Core.Tests/Adapters/SimpleORBNT8DefaultsTests.cs
  • Action Required: None.

DEC-20260816-01

  • ID: DEC-20260816-01
  • Date: 2026-08-16
  • Status: accepted
  • Context: roadmap.md's Last Updated note carried a rolling "full republish planned 2026-08-16" annotation, and the master document's Section 23.4 heartbeat rule allowed governance docs to go up to 7 days without review on a rolling clock rather than a fixed date. In practice this let a republish drift to whenever convenient; on 2026-08-16 the working tree was also found dirty enough to fail two consecutive Gate 3 freeze/verify attempts (freeze_20260816_003543, freeze_20260816_003653), with the last substantive roadmap.md/current_status.md update two days stale relative to same-day decisions (DEC-20260814-04 accepted 2026-08-16; DEC-20260815-01 not yet reflected in either doc).
  • Decision: Replace the rolling 7-day heartbeat allowance with a fixed weekly cadence: roadmap.md and current_status.md are reviewed and republished every Sunday, before every Monday–Friday gate week, permanently and without exception, whether or not anything material changed. Full process defined in docs/02-runbooks/weekly_roadmap_cadence.md. A recurring Sunday scheduled review is configured on the operator's Claude session scheduler to drive this; if repo/device access is unavailable at trigger time, the scheduled review drafts from the Claude Project's operational artifacts and flags what it could not verify against live repo state, rather than skipping the week.
  • Consequences: Every gate week starts with governance docs that are at most a few hours stale, not up to 7 days. The master document's Section 23.4 heartbeat language is superseded by this entry and should read as a pointer to this runbook in the next master document revision (v6.4).
  • Related Files: docs/00-governance/roadmap.md, docs/00-governance/current_status.md, docs/02-runbooks/weekly_roadmap_cadence.md, docs/00-governance/decisions.md
  • Action Required: None in code. First scheduled Sunday review configured 2026-08-16 for 2026-08-23 onward.

DEC-20260817-01

  • ID: DEC-20260817-01
  • Date: 2026-08-17
  • Status: accepted
  • Context: WriteSessionProvenance() and WriteTradeProvenance() returned silently when LogDirectory was blank, while InitFileLog() and WriteSettingsFile() already used the default path Documents\NinjaTrader 8\log\nt8-sdk. The ORB-specific WriteSessionProvenance() override had the same silent guard. This created a split-brain evidence state: session_*.log and settings_*.txt continued writing, but provenance_*.json and trades_*.jsonl did not. The affected period includes broker-confirmed trades from 2026-08-07, 2026-08-10, 2026-08-16, and 2026-08-17.
  • Decision: Provenance and trade JSONL writes must use the same default log directory fallback as session logs/settings whenever LogDirectory is blank. The fallback must be explicit in both Print() and FileLog() so this failure mode is never silent again.
  • Consequences: Gate evidence for trades since 2026-07-31 cannot rely on missing provenance/trade JSONL as proof of no trades or no submissions. Broker statements/session logs remain necessary for those sessions. Future blank LogDirectory configurations produce provenance and trade records at the default path with visible warnings.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, src/NT8.Adapters/Strategies/SimpleORBNT8.cs, docs/00-governance/decisions.md
  • Action Required: Redeploy and manually NinjaScript-compile before relying on new provenance/trade JSONL artifacts.

DEC-20260817-02

  • ID: DEC-20260817-02
  • Date: 2026-08-17
  • Status: accepted
  • Context: trades_Simple_ORB_NT8_20260817.jsonl received 57 rows during a 14-second restart replay window (2026-08-17T16:51:16.124Z through 2026-08-17T16:51:30.109Z) while broker execution grid review showed no matching activity. OnExecutionUpdate() and live session-log SIGNAL/SUBMIT writes are already State.Realtime gated, but WriteTradeProvenance() was called from SubmitOrderToNT8() without an equivalent gate. Source review also found that live-chart historical replay passes AllowDailyTradeCountIncrement=false when State.Historical and Account != null, so accepted historical intents do not increment _dailyTradeCount and MaxDailyTrades cannot cap the replay burst in that mode. The persisted trade JSONL has only wall-clock timestamp_utc; it does not include the bar's own historical timestamp, so exact per-row bar-date distribution cannot be reconstructed from the file.
  • Decision: WriteTradeProvenance() must return immediately unless State == State.Realtime. This is a provenance/data-integrity gate only and must not alter signal generation, risk validation, order submission, or entry/exit behavior. Do not change historical daily-count logic without a separate approved task because it may affect Strategy Analyzer/backtest behavior.
  • Consequences: Historical catch-up/replay can no longer append phantom trade provenance rows. Existing trades_Simple_ORB_NT8_20260817.jsonl is contaminated by 57 phantom rows (49 Buy, 8 Sell; 43 RTH_ORB, 14 ETH; all quantity 3, grade A) and must not be used by dashboard/logtriage as clean gate evidence. Future forensic schema work should consider adding a bar_time field to trade provenance so replay investigations can map rows to historical bars.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, docs/00-governance/decisions.md, C:\Users\billy\Documents\NinjaTrader 8\log\nt8-sdk\trades_Simple_ORB_NT8_20260817.jsonl
  • Action Required: Archive the contaminated 2026-08-17 trade JSONL before the next gate attempt, redeploy with the strategy disabled, delete NinjaTrader.Custom.dll, compile all NinjaScript cleanly, and verify a clean session start before re-arming.

DEC-20260817-06

  • ID: DEC-20260817-06
  • Date: 2026-08-17
  • Status: accepted
  • Context: tools/runnersweep/runnersweep.py's is_runner_leg() classified a trade row as a runner leg only if the literal words "runner" or "run" appeared in its Leg/Entry name/Exit name/Signal name fields (and excluded rows containing "scaler"/"scale"). SubmitOrderToNT8() in NT8StrategyBase.cs actually names legs SDK_{Symbol}_R_{hex} (runner) and SDK_{Symbol}_S_{hex} (scaler) — neither word appears in either name. Every combo in the 18-run sweep would therefore have been marked invalid with "missing runner-leg rows" regardless of how correctly the Strategy Analyzer backtests were run and exported, discovered before any backtest time was spent by reading SubmitOrderToNT8()'s signal-naming logic directly rather than assuming the tool's existing matcher was correct.
  • Decision: is_runner_leg() now also matches the literal _r_/_s_ token from the real signal-naming convention, in addition to the original word-based matching (kept for compatibility with differently-named strategies). Verified safe: the {hex} suffix in SDK_{Symbol}_R_{hex}/SDK_{Symbol}_S_{hex} is a GUID-derived hex string (characters 0-9a-f only), which cannot contain the letters r or s needed to form a false _r_/_s_ match, so there is no risk of misclassifying the hex portion as a leg marker.
  • Consequences: The sweep can now correctly separate runner-leg trades from scaler-leg trades once real Strategy Analyzer exports are analyzed. This was caught before any of the 18 backtests were run, avoiding wasted analyzer time on exports the tool would have silently mis-scored.
  • Related Files: tools/runnersweep/runnersweep.py, src/NT8.Adapters/Strategies/NT8StrategyBase.cs (SubmitOrderToNT8()), docs/00-governance/decisions.md
  • Action Required: None in code beyond the fix already made. When real Strategy Analyzer exports exist, spot-check that runner_trades/combined_trade_count in the JSON output look proportionally reasonable (Mode1DualLeg splits each fill into one scaler row and one runner row) before trusting the recommendation.

DEC-20260817-05

  • ID: DEC-20260817-05
  • Date: 2026-08-17
  • Status: accepted
  • Context: DEC-20260817-03 noted that tools/dashboard/server.py already parsed REJECT:/REJECT SUMMARY: lines for the live current-session tail via a private _parse_rejections()/_parse_key_values() pair, but tools/logtriage/logtriage.py's file-based parser had no reject handling at all — so any offline/historical logtriage.py --json run (the primary use case for silent-day forensics on past sessions) exposed no rejection data, and the two files carried duplicate, divergence-prone parsing logic.
  • Decision: Added parse_key_values() to logtriage.py as the canonical parser (identical marker-bounded-value approach to the original server.py implementation, so detail text containing = or the word "bar" parses correctly). SessionSummary now carries reject_summaries, reject_records, and reject_summary_final (last-observed count per reason), populated while parsing session_*.log and exposed via to_dict(). The SILENT DAY diagnostic in build_diagnostics() now appends a Rejections: <reason>=<count>, ... breakdown (and machine-readable reject_totals) whenever data is available, so a silent day is self-explanatory in triage output rather than merely flagged. server.py._build_current_rows() no longer needs its own reject parsing — logtriage.parse_session_file() already supplies the fields on row_dicts[0] — so the duplicate _parse_rejections()/_parse_key_values() methods and the now-unused lines parameter on _build_current_rows() were removed. Field names/shapes are unchanged from what server.py produced before and match what tools/dashboard/app.js already expects (row.reject_summaries[].{reason,count,line}, row.reject_records[].{reason,detail,bar,line}), so no frontend change was needed.
  • Consequences: logtriage.py --json run against archived log directories now surfaces the same rejection data the live dashboard already showed for the current session, closing the gap DEC-20260817-03 flagged. There is exactly one parser for this line format going forward instead of two. Logic was verified by hand-tracing both the REJECT: and REJECT SUMMARY: lines from the real session_20260817_125115.log archive; it has not been executed, since Claude has no code-execution access on the operator's machine — an operator run of python tools/logtriage/logtriage.py --json against the archive is the next real validation step.
  • Related Files: tools/logtriage/logtriage.py, tools/logtriage/README.md, tools/dashboard/server.py, docs/00-governance/decisions.md
  • Action Required: Run python tools/logtriage/logtriage.py "C:\Users\billy\Documents\NinjaTrader 8\log\nt8-sdk\ARCHIVE" --json and confirm reject_summaries/reject_records/reject_summary_final appear on session rows with no exceptions raised; spot-check the SILENT DAY diagnostic message on a known silent day.

DEC-20260817-04

  • ID: DEC-20260817-04
  • Date: 2026-08-17
  • Status: accepted
  • Context: DASH-002 was blocked pending confirmation that synthetic telemetry generation does not invoke state-mutating paths in RegimeManager, TrendRegimeDetector, or VolatilityRegimeDetector. Direct source review of NT8StrategyBase.cs, SimpleORBStrategy.cs, and FactorCalculators.cs confirms these three classes are instantiated in InitializeSdkComponents() but never called anywhere in the live signal path. The regime/volatility values actually used for signal generation are computed independently: inline SMA20/50 math in BuildStrategyContext() and pure-function ATR-ratio math inside VolatilityRegimeFactorCalculator/TrendAlignmentFactorCalculator, both of which read from context.CustomData with no side effects. RegimeManager.UpdateRegime(), TrendRegimeDetector.DetectTrend(), and VolatilityRegimeDetector.DetectRegime() mutate bar history, current-regime dictionaries, and transition logs on every call, and are currently dead code.
  • Decision: DASH-002 is unblocked. Telemetry implementation must sample only from the existing side-effect-free sources (the inline regime calc in BuildStrategyContext and the existing IFactorCalculator.Calculate() pure functions) and must not call RegimeManager.UpdateRegime(), TrendRegimeDetector.DetectTrend(), or VolatilityRegimeDetector.DetectRegime() for periodic sampling. This constraint is now recorded in TASK_DASH-002_PROMPT.md.
  • Consequences: DASH-002 can proceed without risk of corrupting future use of the regime-detector classes. If a later task wires RegimeManager/TrendRegimeDetector/VolatilityRegimeDetector into the live decision path, it starts from genuinely empty state rather than state pre-seeded by telemetry sampling.
  • Related Files: TASK_DASH-002_PROMPT.md, src/NT8.Core/Intelligence/RegimeManager.cs, src/NT8.Core/Intelligence/TrendRegimeDetector.cs, src/NT8.Core/Intelligence/VolatilityRegimeDetector.cs, docs/00-governance/decisions.md
  • Action Required: None in code from this decision alone. Kilocode proceeds with DASH-002 per the updated prompt.

DEC-20260817-03

  • ID: DEC-20260817-03
  • Date: 2026-08-17
  • Status: accepted
  • Context: GAP-035 made per-reason rejection details readable by logging only the first REJECT: line for each unique reason. Aggregate counts were still only written by WriteRejectSummary() at State.Terminated, leaving armed live sessions without current silent-day counts until the strategy stopped. Dashboard live parsing and logwatch.py already understand REJECT SUMMARY: reason=<Reason> count=<count>, but tools/logtriage/logtriage.py does not currently parse these lines despite dashboard copy referring to "logtriage JSON" for silent-day summary data.
  • Decision: Keep per-detail LogRejectRateLimited() behavior unchanged, but write aggregate REJECT SUMMARY snapshots during live sessions. The cadence is first live rejection at or after 10:00 ET, then every 15 bar-minutes while live rejections continue. The summary line format remains unchanged so existing live dashboard/logwatch parsers continue to consume it.
  • Consequences: Operators can see current rejection counts during the session without flooding the log with every individual rejection. Offline logtriage.py --json will still not expose these summaries until a separate parser update is approved.
  • Related Files: src/NT8.Adapters/Strategies/NT8StrategyBase.cs, tools/logwatch/logwatch.py, tools/dashboard/server.py, tools/dashboard/app.js, tools/logtriage/logtriage.py, docs/00-governance/decisions.md
  • Action Required: Validate in a live RTH session that at least one REJECT SUMMARY snapshot appears before termination and that displayed counts match _rejectCounts at snapshot time.