Skip to content

refactor(native M2): single-owner .smix SAVE/OPEN admission and negative regression matrix - #833

Merged
masarray merged 6 commits into
mainfrom
refactor/nmod-m2-session-admission-20261120
Nov 20, 2026
Merged

masarray merged 6 commits into
mainfrom
refactor/nmod-m2-session-admission-20261120

Conversation

@masarray

@masarray masarray commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

M2 software closure slice: one session SAVE/OPEN admission writer

Based on main@07e5f65fbe69bcfe1c5768bf0528bfed631b2ccd; integrated commit c36fc4dc948f73a931c11c18ce5305dcd0d281a0.

Actual responsibility removed from ConsoleWindow

  • NativeMixerSessionRecovery::planSave now decides fail-closed save eligibility and whether an operation is an unchanged logical autosave, logical-only portable export, or installed-native capture.
  • NativeMixerSessionRecovery::planOpen owns the async-load admission matrix: changed epoch/busy/STREAM rejection, retained-only rejection, M4/ChannelId physical restore vs logical-only open.
  • ConsoleWindow remains composition/OS-adapter: it gathers actual engine/status evidence, manages the file chooser, capture-mute/restore, worker callbacks, hotkey identity activation and one existing browser ACK/readback. No new DSP graph, dispatcher, store, lease or fallback.
  • Removed the duplicated SAVE/OPEN policy branches from src/Main.cpp; converted into explicit decision dispatch without changing saved formats or physical device graph.

Final candidate: actual source-bound contract reconciliation

  • tests/audio_continuity_contract_test.mjs and tests/mixer_io_operator_contract_test.mjs now assert the new Recovery owner rather than stale inline Main.cpp expression locations, retaining STOP/offline failure safety.
  • JUCE device readback uses non-const AudioIODevice::isOpen(); contexts are populated with named fields rather than fragile ordered booleans.
  • Final exact-head fast native/release/Player/FX checks: PASS; Windows MSVC/CTest run #44652531334 running, not yet proven at the time of this update. Earlier failed Windows run #44651837250 never reached C++ compile because the original source-only contract was stale.

Regression added

tests/native_mixer_session_store_test.cpp now exercises both plans' accepted/rejected transitions including busy, read-only, offline logical autosave/export, retained, legacy M4, ChannelId installed, pending recovery, missing physical device, unauthorized/interrupt, shutdown exception, active secondary stream, graph pending, stale epoch.

Parallel merge safety

  • #832 touches Main.cpp at FX editor hunk ~6272; this change is only SAVE/OPEN ~3430–3560, with no bridge/UI edits.
  • #830 touches Main's includes/native accepted capture ~1725–1950; this slice does not modify its capture schema, SourceBinding or current IO contract.
  • #825 modifies LiveAudioEngine/LiveDryRoutingLab/device reader. This PR does not touch those files, CMake, or native PCM.
  • Older draft #731/#708/#635/#661 must be semantically reconciled if revived; do not merge stale source blobs.

Scope & acceptance

This is a software M2 session-policy vertical slice, NOT full M2 milestone closure, not hardware FAT, not installer or release. M2 still has FX/editor lease and broader host lifecycle responsibilities to close. Do not claim green CI before exact-head qualification.

Validation contract

  • Fast native + source-contract checks on exact PR HEAD.
  • Once fast checks pass: exactly one /arsonmix-ci native <SHA> (MSVC/CTest), targeted review + Required Merge Gate, protected squash merge, verify post-merge main.
  • Preserve logical-only readback vs installed graph, .smix binary SHA/HEAD durability, identity/hotkey activation only upon acceptance, DIRECT ASIO output fence, SOURCE ONLY/WIRE/BUS/MAIN, one primary render graph.

Tracks #527.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T04:12:41.659339Z 5c02af1 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5c02af1
Status: ✅  Deploy successful!
Preview URL: https://0b23faf0.arsonmix.pages.dev
Branch Preview URL: https://refactor-nmod-m2-session-adm.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native a60e8f6

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native c36fc4d

Copy link
Copy Markdown
Owner Author

INT-1 N-MOD M2 release-critical handoff: #837
Priority is a durable .smix SAVE/OPEN + recovery vertical slice rather than new native refactor milestones. Re-check HEAD/main/CI; earlier c36fc4d had Fast Native pass but Actual JUCE ImerSip P9.2 Windows GUI check FAILED, and Codex review hit usage limit (not a clean review). Diagnose the actual failing job, fix source or test contract only with evidence, rerun minimal relevant exact-head qualification and obtain required independent review/gate; no review bypass. Coordinate native Main.cpp / shared CMake / session publisher with #825/#830 and G-MV; preserve primary ASIO, no auto-arm, ack/readback, crash-safe rollback. Protected merge only when legitimate checks pass; issue receipt with blocker, test URL, merged SHA.

Use the logical FX editor's optional occupancy, not pointer comparison. Guard SAVE and async OPEN against a conflicting editor or Device Apply. Incorporate exact current main.

Copy link
Copy Markdown
Owner Author

@codex review

Exact candidate 5c02af1846383f4e687419a1c847a48da6fd91db corrects the shared Windows C2678 in ImerSip and full MSVC, and rechecks logical vendor editor and Device Apply ownership at deferred SAVE/OPEN admission. Please review admission, checkpoint durability, and ACK/installed graph behavior on this SHA.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 5c02af1

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 5c02af1846

ℹ️ 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".

Copy link
Copy Markdown
Owner Author

INT-1 G-MV active integration notice (20 Nov): #832 now rebased/reconciled onto main@f509028f7bf18319ef00e1a8767ba9787a37a9d5 at ce673e9b48a71591a5f42e837093efa4946c355b. Its exact-SHA full Chromium + Windows native are in progress; #836 must follow its protected merge. I verified your newer 5c02af1846383f4e687419a1c847a48da6fd91db already fixes the actual Windows logicalVendorEditor_ != nullptr/std::optional C2678 issue (.has_value()), so I did not push or overwrite your active branch. Please preserve #832 native editor requestId echo in src/Main.cpp and the #836 pure FX editor surface if N-MOD #833 updates main; reconcile only overlapping hunks and requalify exact HEAD. This is a source-collision heads-up, not a new approval gate or request to stop independent work.

@masarray
masarray merged commit c04ed7b into main Nov 20, 2026
14 checks passed

Copy link
Copy Markdown
Owner Author

INT-1 N-MOD merge receipt

N-MOD | c04ed7bcdd8b352b8905cb7d3d1fc9d99a9d6d5a | MERGED | Windows CTest 105/105, ImerSip Windows PASS, Required CI Merge Gate PASS | N-MOD source dependency cleared | INT-1 owner to qualify the integrated installer after GUI #832/#836 land | .smix SAVE/OPEN admission and last verified session recovery under one native owner.

Exact qualified head 5c02af1846383f4e687419a1c847a48da6fd91db, tree 1646bea4dbdf85d634d94983e6245a7f67285f86. Protected squash has the same tree. Independent Codex review completed on that head without findings. Windows MSVC / realtime CTest includes P0DynamicMixerSessionDocumentAndCrashSafeRecovery. ImerSip Windows GUI + native CTest includes NativeImmerSIBJucePresetACKStateAndBypass and build of the Windows app. Required CI Merge Gate reported all scoped checks passed.

Restored a valid MSVC build by checking the optional vendor editor lease with .has_value(). Native SAVE/OPEN admission now checks the current Device Apply and editor leases at capture or deferred import. Existing native ACK/readback and control-thread recovery keep the primary PCM/FX render graph and retain the last verified checkpoint during device interruption. The integration preview installer and hardware FAT are tracked by #837 / #450.

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