[GAP-030]: ORB hydration verification complete

- tests/NT8.Core.Tests/Strategies/SimpleORBHydrationTests.cs: cover full and partial delivered-bar ORB hydration

- tests/NT8.Core.Tests/Adapters/NT8StrategyBaseHistoricalGuardTests.cs: assert historical bars reach SDK hydration and orders are blocked before submission

- SPRINT_BOARD.md: GAP-030 prompted -> implemented/deployed

- docs/00-governance/current_status.md: record GAP-030 test-only outcome

- docs/00-governance/decisions.md: record DEC-20260826-06

Build: clean | Tests: 576 passing | Dual-deployed: yes, backup 20260826_010653
This commit is contained in:
2026-08-26 01:07:48 -04:00
parent 49bcd0b43c
commit 9bd2a0f716
5 changed files with 215 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
# NT8 SDK — Sprint Board
**Last Updated:** 2026-08-26 (GAP-025 implemented/deployed; GAP-030 prompted next)
**Last Updated:** 2026-08-26 (GAP-030 implemented/deployed test-only; GAP-022-FOLLOWUP prompted)
**Truth source:** compiler output, test output, deployed-file comparisons, and runtime artifacts override board claims.
## Current gate state
@@ -152,13 +152,15 @@ 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] Connection-State Test Seam** | Sprint 2.7 | ⏳ QUEUED — branch-only during Gate Run #2
- Add an injectable connection-state seam around `NT8StrategyBase`.
- Then implement the three deferred scenarios: news-day reduced sizing, mid-trade disconnect, and pre-entry disconnect.
**[GAP-022-FOLLOWUP] Injectable connection-state seam + 2 of 3 deferred scenario tests** | Sprint 2.7 | 🟡 PROMPTED
- `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.
- Prompt: `TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md`.
**[GAP-030] Historical ORB range hydration on a late strategy enable** | Sprint 2.7 | 🟡 PROMPTED — verify-first
**[GAP-030] Historical ORB range hydration on a late strategy enable** | Sprint 2.7 | ✅ IMPLEMENTED — test-only, deployed 2026-08-26
- Traced on 2026-08-26: `SimpleORBStrategy.OnBar()`'s ORB-building logic is state-blind (no `State.Historical`/`Realtime` awareness at all in `StrategyContext`) and accumulates the range from whatever bars it's given; `NT8StrategyBase.OnBarUpdate()` doesn't currently block `State.Historical` bars from reaching it; and `ProcessStrategyIntent()` already has an explicit `State == State.Historical` guard blocking any real order from a historical-replay bar. **This suggests both halves GAP-030 originally asked for may already exist by construction** — but the task explicitly requires Kilocode to verify (not assume) that NT8 actually delivers same-day historical catch-up bars on a late enable before treating it as settled, and to only implement new logic if that verification finds a real gap; otherwise the task closes the missing test-coverage gap instead.
- Prompt: `TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md`.
- Prompt: `TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md`. Verify-first outcome: no production hydration logic added. Source trace confirmed repo-side behavior works by construction: Core `SimpleORBStrategy` is state-blind and hydrates ORB range from delivered bars, `NT8StrategyBase.OnBarUpdate()` does not block `State.Historical` bars before `_sdkStrategy.OnBar()`, and `ProcessStrategyIntent()` blocks live-account historical orders before risk/submission via `HistoricalReplayCatchup`. Added tests for full-window and partial-window delivered-bar hydration plus adapter source assertions for no executable pre-`OnBar` historical block and preserved historical order guard. Verification: focused GAP-030 tests 4/4, `verify-build.bat` 576/576. Deploy backup `20260826_010653`. External NT8 docs did not prove the late-enable same-day delivery assumption; remaining validation is operator/platform observation.
**[GAP-007] Walk-Forward Validation** | Sprint 2.7 | ⏳ QUEUED — only after a passing Gate Run #2 ruling