[GAP-022-FOLLOWUP]: connection-state seam complete

- src/NT8.Adapters/NinjaTrader/ConnectionStateMonitor.cs: added plain testable connection-state monitor
- src/NT8.Adapters/Strategies/NT8StrategyBase.cs: wired monitor and added pre-submit ConnectionLost check
- tests/NT8.Core.Tests/Scenarios/ScenarioTests.cs: added disconnect scenario coverage
- SPRINT_BOARD.md: GAP-022-FOLLOWUP implemented/deployed
- docs/00-governance/current_status.md: updated
- docs/00-governance/decisions.md: added DEC-20260826-07

Build: clean | Tests: 580 passing | Dual-deployed: yes, backup 20260826_011650
This commit is contained in:
2026-08-26 01:18:21 -04:00
parent 9bd2a0f716
commit 186e1dd56d
7 changed files with 348 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
# NT8 SDK — Sprint Board
**Last Updated:** 2026-08-26 (GAP-030 implemented/deployed test-only; GAP-022-FOLLOWUP prompted)
**Last Updated:** 2026-08-26 (GAP-022-FOLLOWUP implemented/deployed)
**Truth source:** compiler output, test output, deployed-file comparisons, and runtime artifacts override board claims.
## Current gate state
@@ -7,9 +7,9 @@
| Area | State | Evidence / required next step |
|---|---|---|
| Core source build | ✅ | `dotnet test NT8-SDK.sln --configuration Release --verbosity minimal`: build succeeded. |
| Automated tests | ✅ | 511 passed: 422 Core, 79 Integration, 10 Performance. |
| Automated tests | ✅ | 580 passed: 490 Core, 80 Integration, 10 Performance. |
| Provenance | ✅ | Gate 3 fix serializes grade, score, submitted runner mode, and ORB ticks from the accepted intent/submission data. |
| Scenario coverage | 🟡 | 5/8 genuine assertions; 3 explicitly deferred for missing seams. |
| Scenario coverage | 🟡 | 7/8 genuine assertions; `NEWS_DAY_REDUCED_SIZE` remains deferred for missing calendar/sizing-policy APIs. |
| Gate Run #2 | ❌ | Contaminated; provenance defects were identified after the run. |
| Gate Run #3 | ⏳ | Working tree clean; freeze capture succeeded: `docs/gate-runs/gate3/baseline.json` from `freeze_20260816_170304`; `DEC-GATE3-CONFIG.md` regenerated and still `draft` pending GAP-034. Complete manual NinjaScript compile/re-arm before starting the clock. |
@@ -152,10 +152,11 @@ The dirty working tree — several modified/untracked files including live strat
- Scoped diagnostic-only: adds an `ORDER {signal} State=... Filled=.../... AvgFillPrice=...` FileLog line to `OnOrderUpdate` for every transition, and adds the signal name to the existing `FILL` line. Zero change to order submission, sizing, or execution-adapter logic.
- Prompt: `TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md`. Implemented as additive logging only: `OnOrderUpdate` now writes realtime `ORDER SDK_... State=... Filled=.../... AvgFillPrice=...` lines for SDK-managed order transitions, and the existing `FILL` line now includes `Signal=...` so scaler/runner fills are distinguishable. Existing circuit-breaker, execution-adapter, and portfolio-risk callbacks were left unchanged. Verification: focused Adapter tests 81/81, `verify-build.bat` 572/572. Deploy backup `20260826_010153`.
**[GAP-022-FOLLOWUP] Injectable connection-state seam + 2 of 3 deferred scenario tests** | Sprint 2.7 | 🟡 PROMPTED
**[GAP-022-FOLLOWUP] Injectable connection-state seam + 2 of 3 deferred scenario tests** | Sprint 2.7 | ✅ IMPLEMENTED — deployed 2026-08-26
- `ScenarioTests.cs`'s own TODO block (more precise than this board's old one-line summary) names three deferred scenarios: `NEWS_DAY_REDUCED_SIZE` (needs a high-impact-event calendar + sizing-policy API that doesn't exist yet — separate, larger, not-yet-designed scope, explicitly excluded from this task), `MID_TRADE_DISCONNECT`, and `PRE_ENTRY_DISCONNECT` (both need the connection-state seam).
- Confirmed on 2026-08-26: `_connectionLost` is a bare private field on `NT8StrategyBase`, set only by `OnConnectionStatusUpdate` and checked once early in `OnBarUpdate` — there is no re-check immediately before order submission (`ProcessStrategyIntent`/`SubmitOrderToNT8`), confirming `PRE_ENTRY_DISCONNECT`'s TODO is a real, if narrow, gap.
- Scoped to extract connection state into a new plain (non-NinjaScript-derived) class so it's genuinely unit-testable, add the missing pre-submit re-check, and implement `MID_TRADE_DISCONNECT`/`PRE_ENTRY_DISCONNECT` as real execution tests against it. `NEWS_DAY_REDUCED_SIZE` stays deferred.
- Implemented as Option A: extracted connection state into plain `ConnectionStateMonitor`, wired `NT8StrategyBase` through it, preserved the existing early `OnBarUpdate` `ConnectionLost` guard, and added a second `ConnectionLost` check in `ProcessStrategyIntent()` before risk/sizing/order submission. Added real scenario coverage for `MID_TRADE_DISCONNECT` and `PRE_ENTRY_DISCONNECT`; `NEWS_DAY_REDUCED_SIZE` stays deferred.
- Verification: focused `ScenarioTests` 9/9, `verify-build.bat` 580/580, Core Release no-build 490/490. Deploy backup `20260826_011650`.
- Prompt: `TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md`.
**[GAP-030] Historical ORB range hydration on a late strategy enable** | Sprint 2.7 | ✅ IMPLEMENTED — test-only, deployed 2026-08-26