[GOV]: cleanup prompted task state

- SPRINT_BOARD.md: stage GAP-025/GAP-030 and correct GAP-062 deploy status

- TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md: add runner lifecycle logging prompt

- TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md: add ORB hydration verify prompt

- TASK_GAP051/052/059/060 prompts: record commit-only deploy instruction

- TASK_GAP054_RUNNER_TRAIL_PROMPT.md: clarify SIM/replay validation path

- docs/00-governance/2026-08-19-run-book.md: reconcile implemented/verified task states

- docs/00-governance/active_work.md: update blocker status and validation requirements

- docs/00-governance/decisions.md: record prompted follow-ups and resolved GAP-062 deploy status

Build: clean | Tests: 569 passing | Deploy: GAP-062 deployed backup 20260826_005308
This commit is contained in:
2026-08-26 00:59:35 -04:00
parent 885e298fb7
commit 34c3767fbf
11 changed files with 408 additions and 32 deletions

View File

@@ -13,14 +13,36 @@ Use this file to record durable project decisions that affect implementation pat
## Decision Log
### 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 — commit-only, pending SIM observation
- **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 intentionally skipped per `TASK_GAP062_TREND_CONFIRM_DIRECTION_PROMPT.md`; operator SIM before/after observation is required before trusting this live.
- **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`.