docs: record GAP-034/035/036 forensics and DEC-20260814/15 decisions
This commit is contained in:
@@ -157,3 +157,83 @@ Use this file to record durable project decisions that affect implementation pat
|
||||
- **Consequences:** Parameter drift and code drift are distinguishable without relying on a manually maintained git SHA. The Gate Run #2 procedure must archive both `ConfigHash` and `CodeVersion`, and it forbids dual-deploys after the configuration freeze.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `src/NT8.Strategies/Examples/SimpleORBStrategy.cs`, `docs/00-governance/patterns_and_antipatterns.md`, `SPRINT_BOARD.md`, `NEXT_PROMPT.md`.
|
||||
- **Action Required:** Deploy the cleanup source, compile it in NinjaTrader, then record `DEC-GATE2-CONFIG` before starting the gate.
|
||||
|
||||
### DEC-20260810-01
|
||||
- **ID:** DEC-20260810-01
|
||||
- **Date:** 2026-08-10
|
||||
- **Status:** accepted
|
||||
- **Context:** Three settings exports from the same 2026-08-07 session (`settings_Simple_ORB_NT8_20260807_101520.txt`, `_101543.txt`, `_150539.txt`) show `BarsPeriod` values of "15 Minute", "5 Minute", and "13 42069" (HFT Algo Bars) respectively, yet all three carry the identical `ConfigHash` `df5ff56e6db3a332e40568849f2a2fc7a121f0d57cf228b07935278bc58c9c10`. `ComputeConfigHash()` excludes `BarsPeriod` from its input, meaning structurally different bar-type configurations are indistinguishable by hash.
|
||||
- **Decision:** Add `BarsPeriod` (value + unit/type) to the `ComputeConfigHash()` input. Audit all remaining settings-export fields against current hash inputs and include any other field found in the export but absent from the hash. Hash-computation-only change; trading logic must remain byte-for-byte unaffected. Kilocode prompt issued 2026-08-10, execution pending next non-armed window.
|
||||
- **Consequences:** Any gate run or provenance record predating this fix has unverified config-hash provenance and cannot be cited as proof of a frozen configuration on hash-match alone. Once fixed, hash changes are expected whenever `BarsPeriod` changes between exports in the same session.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs` (`ComputeConfigHash()`), `docs/00-governance/decisions.md`
|
||||
- **Action Required:** Deploy fix during a window when the gate strategy is disabled (never mid-armed-session). After deploy, export settings twice in one session with different `BarsPeriod` values and confirm `ConfigHash` differs.
|
||||
|
||||
### DEC-20260810-02
|
||||
- **ID:** DEC-20260810-02
|
||||
- **Date:** 2026-08-10
|
||||
- **Status:** accepted
|
||||
- **Context:** Two broker-confirmed live trades (2026-08-07, 2026-08-10) on `SimSimple ORB` reconciled to the penny against `8-7_to_8-10_executions.csv`. Both were winners; both had the runner leg stopped near breakeven — contributing +1 tick (~$5) on 8/7 and exactly $0 on 8/10 — while the scaler leg produced 100% of net P&L on both days ($227.72 and $262.72 respectively). On 8/10, breakeven triggered at +25 ticks profit, only 3 ticks before the ATR-derived 28-tick target, leaving the runner effectively no room to run before being parked at breakeven and then stopped out by 1 tick of adverse slippage.
|
||||
- **Decision:** No change to runner logic (breakeven trigger placement, `RunnerTrailTicks`) for Gate Run #3. Sample size (n=2) is insufficient to hand-tune a live parameter; any redesign must go through the Optimization Protocol (backtest-validated via NT8 Strategy Analyzer) before deployment, not be patched into a live/armed run.
|
||||
- **Consequences:** Gate Run #3 continues paying commission on a 3rd (runner) contract with $0–5 demonstrated contribution to date. Revisit trigger set explicitly: after 10 gate trades (half the 20-trade minimum), review runner P&L contribution as a pattern; if still flat/negative, proceed to offline backtest redesign of breakeven trigger distance and/or trail mechanism.
|
||||
- **Related Files:** `docs/00-governance/decisions.md`, `NT8_SDK_Optimization_Protocol.docx`, trade records `8-7_to_8-10_executions.csv`, session logs `session_20260807_101543.log`, `session_20260810_070736.log`
|
||||
- **Action Required:** No code action now. At 10th gate trade, pull runner-specific P&L across all trades to date and decide: keep, disable, or queue for Optimization Protocol redesign.
|
||||
|
||||
### DEC-20260815-01
|
||||
- **ID:** DEC-20260815-01
|
||||
- **Date:** 2026-08-15
|
||||
- **Status:** accepted — supersedes DEC-20260810-02
|
||||
- **Context:** DEC-20260810-02 deferred all runner-logic changes to a revisit at 10 gate trades, on the reasoning that n=2 was insufficient to tune a live parameter. That reasoning assumed a valid gate run was accumulating interpretable trades. It was not. Gate Run #2 was voided, Gate Run #3 has not started, and GAP-034 means a zero-trade day cannot currently be attributed to a strategy decision versus a defect. A revisit trigger anchored to gate-trade count therefore cannot fire. Additionally, the deferral's core concern — modifying a parameter on a live armed strategy — does not apply: the strategy is disarmed and this work is pre-gate preparation.
|
||||
- **Decision:** Runner redesign is in scope now, during the disarmed pre-gate window. The mechanism is understood: the breakeven trigger at 20 ticks sits close to the scaler target at 16 ticks and the ATR-derived target (28 ticks observed 2026-08-10), leaving the runner no room to extend before being parked at breakeven. The 10-gate-trade revisit trigger from DEC-20260810-02 is withdrawn. Requirement retained from DEC-20260810-02: any new trigger distance must be backtest-validated via the Optimization Protocol, not hand-picked. Validation must use the 60-trading-day warm-up and Tick Replay requirements of DEC-20260814-03.
|
||||
- **Consequences:** Runner parameters are unfrozen until the Gate Run #3 configuration freeze, at which point the swept value is locked with the rest of the config. Gate Run #3 begins with a runner leg that has a documented empirical basis rather than an inherited default.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `NT8_SDK_Optimization_Protocol.docx`, `docs/00-governance/roadmap.md`
|
||||
- **Action Required:** Execute RUNNER-001 sweep, record the selected trigger distance and its supporting statistics in a superseding entry before `DEC-GATE3-CONFIG`.
|
||||
|
||||
### DEC-20260814-01
|
||||
- **ID:** DEC-20260814-01
|
||||
- **Date:** 2026-08-14
|
||||
- **Status:** accepted
|
||||
- **Context:** Sessions on 2026-08-03, 08-04, and 08-13 produced zero trades on days with clear NQ breakouts, while 08-07 and 08-10 produced broker-confirmed trades. The defect is intermittent. `ProcessStrategyIntent` writes a `SIGNAL:` line to the session file log unconditionally for every realtime intent; no such line appears on the zero-trade days, proving no intent was produced and isolating the fault upstream of the execution pipeline. The four remaining candidate causes (grade filter, `MaxDailyTrades` latch, ORB range not established, RTH guard) all log exclusively via `_logger` to the NT8 Output window and never to disk, so no session log can distinguish them retrospectively.
|
||||
- **Decision:** Treat this as GAP-034 and block Gate Run #3 until root cause is identified. Prerequisite fix is GAP-035: route every signal-rejection reason to `FileLog` alongside `_logger` so a no-trade day is self-documenting. Do not restart the gate clock on the assumption that quiet days are normal Grade-A filtering.
|
||||
- **Consequences:** Gate Run #3 start date slips. All Sprint 3 completion criteria now include GAP-034 closure. Any future zero-trade day becomes diagnosable from disk without requiring the Output window to have been open at the right moment.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `src/NT8.Strategies/Examples/SimpleORBStrategy.cs`, `docs/00-governance/current_status.md`, `docs/00-governance/common_failures.md`
|
||||
- **Action Required:** Execute GAP-035, redeploy during the disarmed window, then run one session with the Output window open as a cross-check that file and Output agree.
|
||||
|
||||
### DEC-20260814-02
|
||||
- **ID:** DEC-20260814-02
|
||||
- **Date:** 2026-08-14
|
||||
- **Status:** accepted
|
||||
- **Context:** `GetRiskMode()` reads `_strategyConfig.Parameters["risk_mode"]` while the SDK writes resolved risk mode to `candidate.Metadata["risk_mode"]`. The key is never present in `Parameters`, so every trade record serializes `risk_mode` as `"Unknown"`. This is the same defect class as GAP-031, which fixed four fields by name and did not audit the `Parameters`/`Metadata` split for other consumers.
|
||||
- **Decision:** Fix as GAP-036 by sourcing from `intent.Metadata` with `Parameters` retained as fallback. Additionally require that any provenance field capable of holding a sentinel value (`"Unknown"`, `0.0`, `"None"`) carry a round-trip test asserting a real value survives serialization.
|
||||
- **Consequences:** All trade records to date have unusable `risk_mode` provenance. Gate evidence citing risk mode must be regenerated after the fix.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `src/NT8.Core/Logging/TradeProvenanceSerializer.cs`, `tests/NT8.Core.Tests/Logging/TradeProvenanceSerializerTests.cs`
|
||||
- **Action Required:** Execute GAP-036 in the 2026-08-15 to 08-17 disarmed window.
|
||||
|
||||
### DEC-20260814-03
|
||||
- **ID:** DEC-20260814-03
|
||||
- **Date:** 2026-08-14
|
||||
- **Status:** accepted
|
||||
- **Context:** A backtest of a day that traded live produces zero trades. In Strategy Analyzer the secondary daily series loads only from the backtest start date, so `BuildDailyBarContext` returns `Count=0` below 2 daily bars and daily-dependent confluence factors score neutral, pushing the composite below the Grade A threshold. The regime gate separately requires 50 daily bars (`CurrentBars[1] >= SmaPeriodLong`) and never arms on short backtests. Neither path raises an error, and the NR7 warm-up advisory deliberately does not block.
|
||||
- **Decision:** This is expected behaviour, not a defect. Backtests intended to reproduce live behaviour must set the Strategy Analyzer start date at least 60 trading days before the target day. When the primary series is non-time-based (HFT Algo Bars, range, tick, volume), Tick Replay must be enabled or bar construction will differ from live regardless of warm-up.
|
||||
- **Consequences:** A zero-trade backtest is not evidence that no signal existed and must not be cited as such. Prior single-day backtest results are void as comparative evidence.
|
||||
- **Related Files:** `src/NT8.Strategies/Examples/SimpleORBNT8.cs`, `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `docs/00-governance/common_failures.md`
|
||||
- **Action Required:** None in code. Fold the 60-day rule and the Tick Replay requirement into the operator runbook and the Optimization Protocol.
|
||||
|
||||
### DEC-20260814-04
|
||||
- **ID:** DEC-20260814-04
|
||||
- **Date:** 2026-08-14; accepted 2026-08-16
|
||||
- **Status:** accepted
|
||||
- **Context:** `SimpleORBNT8.SetDefaults()` sets `EnableShortTrades = false`, commented "Long-only: short trades permanently disabled pending backtest confirmation." Live runs have taken Sell entries via workspace override. Source and runtime therefore disagree, and no gate run is reproducible from a clean checkout. Separately, `StartBehavior = AdoptAccountPosition` is an undocumented change from the last recorded state.
|
||||
- **Decision:** Shorts are in scope for the strategy under validation. `SimpleORBNT8.SetDefaults()` must set `EnableShortTrades = true` so a clean checkout matches live workspace usage. `StartBehavior = AdoptAccountPosition` is retained because it avoids NT8 start-up synchronization submitting or flattening during historical replay bursts before the first live bar.
|
||||
- **Consequences:** Direction defaults are reproducible from source, and the StartBehavior choice is explicitly documented. Workspace overrides should not be required to reproduce short-enabled gate runs.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/SimpleORBNT8.cs`, `src/NT8.Adapters/Strategies/NT8StrategyBase.cs`, `tests/NT8.Core.Tests/Adapters/SimpleORBNT8DefaultsTests.cs`
|
||||
- **Action Required:** None.
|
||||
|
||||
### DEC-20260816-01
|
||||
- **ID:** DEC-20260816-01
|
||||
- **Date:** 2026-08-16
|
||||
- **Status:** accepted
|
||||
- **Context:** `roadmap.md`'s `Last Updated` note carried a rolling "full republish planned 2026-08-16" annotation, and the master document's Section 23.4 heartbeat rule allowed governance docs to go up to 7 days without review on a rolling clock rather than a fixed date. In practice this let a republish drift to whenever convenient; on 2026-08-16 the working tree was also found dirty enough to fail two consecutive Gate 3 freeze/verify attempts (`freeze_20260816_003543`, `freeze_20260816_003653`), with the last substantive `roadmap.md`/`current_status.md` update two days stale relative to same-day decisions (DEC-20260814-04 accepted 2026-08-16; DEC-20260815-01 not yet reflected in either doc).
|
||||
- **Decision:** Replace the rolling 7-day heartbeat allowance with a fixed weekly cadence: `roadmap.md` and `current_status.md` are reviewed and republished every Sunday, before every Monday–Friday gate week, permanently and without exception, whether or not anything material changed. Full process defined in `docs/02-runbooks/weekly_roadmap_cadence.md`. A recurring Sunday scheduled review is configured on the operator's Claude session scheduler to drive this; if repo/device access is unavailable at trigger time, the scheduled review drafts from the Claude Project's operational artifacts and flags what it could not verify against live repo state, rather than skipping the week.
|
||||
- **Consequences:** Every gate week starts with governance docs that are at most a few hours stale, not up to 7 days. The master document's Section 23.4 heartbeat language is superseded by this entry and should read as a pointer to this runbook in the next master document revision (v6.4).
|
||||
- **Related Files:** `docs/00-governance/roadmap.md`, `docs/00-governance/current_status.md`, `docs/02-runbooks/weekly_roadmap_cadence.md`, `docs/00-governance/decisions.md`
|
||||
- **Action Required:** None in code. First scheduled Sunday review configured 2026-08-16 for 2026-08-23 onward.
|
||||
|
||||
Reference in New Issue
Block a user