[GAP-051]: micro upgrade advisory persistence complete
- NT8StrategyBase.cs: persist MicroUpgradeThreshold advisory state per account - NT8StrategyBaseMicroUpgradeTests.cs: add source guards for persistence, corrupt files, and Account-null behavior - SPRINT_BOARD.md and decisions.md: record Option A and verification evidence Build: clean | Tests: 550 passing; Core 461 passing | Dual-deployed: no - skipped per operator instruction
This commit is contained in:
@@ -24,6 +24,15 @@ Use this file to record durable project decisions that affect implementation pat
|
||||
- **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-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)
|
||||
|
||||
Reference in New Issue
Block a user