[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:
@@ -13,6 +13,17 @@ Use this file to record durable project decisions that affect implementation pat
|
||||
|
||||
## Decision Log
|
||||
|
||||
### DEC-20260826-07
|
||||
- **ID:** DEC-20260826-07
|
||||
- **Date:** 2026-08-26
|
||||
- **Status:** implemented and deployed by operator request
|
||||
- **Context:** GAP-022's original scenario coverage was partial because `MID_TRADE_DISCONNECT` and `PRE_ENTRY_DISCONNECT` could not be tested honestly while `NT8StrategyBase` owned connection state as a private NinjaScript-only `_connectionLost` field. Source review confirmed the existing guard blocked disconnected bars early in `OnBarUpdate`, but there was no second check immediately before order submission, leaving a narrow timing gap if connection state changed after a signal was generated.
|
||||
- **Decision:** Implement Option A from `TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md`: extract connection state into a plain, testable `ConnectionStateMonitor`, wire `NT8StrategyBase.OnConnectionStatusUpdate()` and the existing early guard through it, and add a pre-submit `ConnectionLost` check in `ProcessStrategyIntent()` before risk/sizing/order submission. Do not implement `NEWS_DAY_REDUCED_SIZE`; it remains a separate, larger design task requiring calendar and sizing-policy APIs.
|
||||
- **Proof:** Added tests showing disconnect/reconnect changes entry permission, a mid-trade disconnect blocks new entries without flattening the existing position, a pre-entry disconnect blocks a generated signal before submit with the standard `ConnectionLost` reason/detail, and the connected pre-entry path remains allowed. `ScenarioTests.cs` now leaves only the `NEWS_DAY_REDUCED_SIZE` TODO.
|
||||
- **Verification:** `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --filter "FullyQualifiedName~ScenarioTests" --verbosity minimal` passed 9/9. `verify-build.bat` passed 580/580. `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal` passed 490/490. Deploy completed with backup `20260826_011650`; `NinjaTrader.Custom.dll` was already absent.
|
||||
- **Related Files:** `TASK_GAP022_FOLLOWUP_CONNECTION_SEAM_PROMPT.md`, `src/NT8.Adapters/NinjaTrader/ConnectionStateMonitor.cs`, `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `tests/NT8.Core.Tests/Scenarios/ScenarioTests.cs`, `SPRINT_BOARD.md`, `docs/00-governance/current_status.md`.
|
||||
- **Action Required:** Manual NinjaScript compile after deploy. Future news-day reduced-sizing work should be prompted separately after a calendar/sizing-policy design exists.
|
||||
|
||||
### DEC-20260826-06
|
||||
- **ID:** DEC-20260826-06
|
||||
- **Date:** 2026-08-26
|
||||
|
||||
Reference in New Issue
Block a user