Build 932: V12_001/V12_002 Rename + Offline IPC Fix#4
Conversation
SIMA.cs: Remove Math.Max(0,...) clamp from DeltaExpectedPositionLocked. Clamp was a latent bug — for Short positions (stored as negative), partial fleet cancel produced 0 instead of the correct residual value. Symmetry.cs: Direction-aware delta in SymmetryGuardCascadeFollowerCleanup. Was always using -TotalContracts; Short cancels now correctly use +TotalContracts to move expectedPositions back toward zero from the negative side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ER snapshot, Symmetry lock P1-FIX: OnPositionUpdate H-14 guard against spurious broker flat zeroing expectedPositions while follower entries are still pending (prevents REAPER ghost repair loop). REAPER-SNAPSHOT: Thread-safe activePositions snapshot under stateLock on background audit thread (eliminates torn-read risk on 17-account fleet). SYM-LOCK: Atomic dict commit for stop/target orders under stateLock before acct.Submit() (prevents REAPER from seeing naked positions during bracket construction). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
• Symmetry.cs: 5-case switch → GetTargetOrdersDictionary() (DRY) • REAPER.cs: inline terminal check → IsOrderTerminal() • Callbacks.cs: cache ExpKey result (3→1 call sites) • Comment cleanup: verbose rationale → concise annotations All 3 files (Build 931 touch-points only). Zero logic changes. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Rename UI Panel to V12_001 (from V12StandardPanel_V12_001_Dev) - Rename Strategy to V12_002 (project-wide identity change) - Move StartIpcServer() to State.DataLoaded for offline connectivity (Panel can now connect even when market is closed / no data feed) - Update deploy-sync.ps1 to include V12_001.cs - Purge legacy UniversalOR naming references
|
@codex code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5067cfd24c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // V12.2 HEADLESS SAFETY: Start core services even if ChartControl is null (for background execution) | ||
| // [Build 932]: Start IPC in DataLoaded so Control Surface connects even if market is closed/offline. | ||
| StartIpcServer(); |
There was a problem hiding this comment.
Gate IPC startup to realtime state
Starting the IPC listener in State.DataLoaded allows remote clients to connect and trigger ProcessIpcCommands() before the strategy reaches realtime, and that command processor has no State.Realtime guard (so trade/flatten commands can mutate order and expected-position state during historical initialization). This regression only appears after this move from State.Realtime, and it can leave the strategy in an inconsistent state by the time live trading starts.
Useful? React with 👍 / 👎.
| @{ src = "V12_002.cs"; dst = Join-Path $NtStrategyDir "V12_002.cs" }, | ||
| @{ src = "V12_002.Entries.cs"; dst = Join-Path $NtStrategyDir "V12_002.Entries.cs" }, | ||
| @{ src = "V12_002.Entries.FFMA.cs"; dst = Join-Path $NtStrategyDir "V12_002.Entries.FFMA.cs" }, |
There was a problem hiding this comment.
Clean up legacy file links during rename migration
The mapping now only deploys V12_002*/V12_001 files, but the script has no migration step to remove previously deployed UniversalORStrategyV12_002_Dev* and V12StandardPanel_V12_001_Dev files, so existing NT8 environments keep stale legacy scripts side-by-side with the renamed ones. In setups that already ran older builds, this causes parallel old/new strategy code to remain compiled and can lead to running outdated logic unintentionally.
Useful? React with 👍 / 👎.
…ne-fix Build 932: V12_001/V12_002 Rename + Offline IPC Fix
Summary
V12_001(fromV12StandardPanel_V12_001_Dev)V12_002— project-wide identity now consistentStartIpcServer()toState.DataLoadedso Control Surface connects even when market is closed or no data feeddeploy-sync.ps1to includeV12_001.csUniversalORnaming referencesFiles Changed
src/V12_001.cs— New UI Panel (renamed from archive)src/V12_002.cs— Offline IPC fixdeploy-sync.ps1— Added V12_001 mappingTest