[GAP-060]: reject summary visibility complete

- NT8StrategyBase.cs: made reject summary snapshots ORB-window/date-aware with heartbeat flush

- SimpleORBNT8.cs: bound summary suppression to configured opening range

- tests: added reject summary source guards and SimpleORB no-breakout rejection coverage

- SPRINT_BOARD.md: marked GAP-060 implemented with deploy blocker

- docs/00-governance/decisions.md: recorded DEC-20260823-08 implementation evidence

Build: clean | Tests: 543 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
This commit is contained in:
2026-08-25 10:04:22 -04:00
parent a005deeabf
commit 6c672a5247
7 changed files with 324 additions and 2 deletions

View File

@@ -13,6 +13,17 @@ Use this file to record durable project decisions that affect implementation pat
## Decision Log
### 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-03
- **ID:** DEC-20260823-03
- **Date:** 2026-08-23