Skip to content

Build 932: V12_001/V12_002 Rename + Offline IPC Fix#4

Merged
mkalhitti-cloud merged 6 commits into
mainfrom
build/932-rename-ipc-offline-fix
Mar 1, 2026
Merged

Build 932: V12_001/V12_002 Rename + Offline IPC Fix#4
mkalhitti-cloud merged 6 commits into
mainfrom
build/932-rename-ipc-offline-fix

Conversation

@mkalhitti-cloud
Copy link
Copy Markdown
Owner

Summary

  • Renamed UI Panel to V12_001 (from V12StandardPanel_V12_001_Dev)
  • Strategy is already V12_002 — project-wide identity now consistent
  • Moved StartIpcServer() to State.DataLoaded so Control Surface connects even when market is closed or no data feed
  • Updated deploy-sync.ps1 to include V12_001.cs
  • Purged all legacy UniversalOR naming references

Files Changed

  • src/V12_001.cs — New UI Panel (renamed from archive)
  • src/V12_002.cs — Offline IPC fix
  • deploy-sync.ps1 — Added V12_001 mapping

Test

  • Compiled successfully in NinjaTrader

mkalhitti-cloud and others added 6 commits February 28, 2026 17:08
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
@mkalhitti-cloud
Copy link
Copy Markdown
Owner Author

@codex code review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/V12_002.cs
Comment on lines +776 to +778
// 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();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread deploy-sync.ps1
Comment on lines +19 to +21
@{ 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" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mkalhitti-cloud mkalhitti-cloud merged commit 50e2229 into main Mar 1, 2026
@mkalhitti-cloud mkalhitti-cloud deleted the build/932-rename-ipc-offline-fix branch March 4, 2026 19:43
mkalhitti-cloud added a commit that referenced this pull request May 20, 2026
…ne-fix

Build 932: V12_001/V12_002 Rename + Offline IPC Fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant