Skip to content

M2a: isolate native device Apply owner, verified pin preflight and rollback - #534

Merged
masarray merged 4 commits into
mainfrom
refactor/m2-device-apply-boundary-20261111
Nov 10, 2026
Merged

masarray merged 4 commits into
mainfrom
refactor/m2-device-apply-boundary-20261111

Conversation

@masarray

@masarray masarray commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

M2a — functional maintainability milestone (follows merged M1 #530)

Tracks #527 and preserves P0 hardware source truth #412.

Base: main@68e74ee332c3258900c2bbce2a8da635a3d0b62c
Implementation: 65e46f34d367aa9d5303bd8ccfab6ebcc4302b99

Actual source changes

  • New src/NativeDeviceApplyCoordinator.h: one message-thread Apply/restart reentrancy lease; native typed request validation; JUCE-reported backend/input/output names; exact sparse physical input/output pin masks; hardware Apply readback and verified rollback policy; existing direct JUCE open routine extracted from Main.cpp. Does NOT own a second AudioDeviceManager, mixer/session document, graph, callback or renderer.
  • src/Main.cpp: owns only high-level transaction orchestration and messaging, uses the shared guard in explicit Apply and ASIO restart; delegates parsing/physical masks, open, and accepted/rollback verification to coordinator. No changes to actual ChannelId audio render, DSP, .smix, startup policy or native GUI. Existing diagnostics/ACK strings maintained.
  • Pin safety hardening: validate 64-bit index before narrowing to 32-bit; rejects oversize/aliased physical jacks (e.g. forged 2^33+1), duplicates, negative, out-of-range and output with fewer than two verified playback pins.
  • tests/native_device_apply_coordinator_test.cpp: new deterministic JUCE no-hardware CTest exercises re-entrant Apply lease, valid/invalid backend and 0-IN selection, mask validation, accepted device readback, safe ASIO pin-name rollback and closed-device rejection.
  • CMakeLists.txt: dedicated native test target; architecture map updated to mark M2a ownership boundary.

Execution / validation

  • New test and source not yet compiled at PR creation. Await path-scoped fast PR tests; investigate any actual failure before exact-SHA Windows milestone.
  • If relevant fast checks PASS, trigger one /arsonmix-ci native <exact PR HEAD> using documented owner-authorized dispatcher (no fat ZIP needed for pure device-boundary refactoring); inspect full MSVC/CTest result.
  • Physical ASIO FAT including actual pin rearrangement, output and mic continuity remains PENDING. Do not claim device longevity certified by mock/native tests.

Concurrency / follow-on

Qualification checkpoint — current exact SHA

  • Fast native: PASS, run
  • Fast UI: PASS, run
  • Harmony native DSP fast: PASS, run
  • One exact-SHA native Windows MSVC/CTest: IN PROGRESS, run. This is NOT an unconditional PASS and must be checked before merge. Full hardware/ASIO listening FAT remains PENDING.
  • Historical source-text assertions referencing moved device readback functions were updated to assert the same invariant in NativeDeviceApplyCoordinator.h; they were not removed.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T20:33:20.995090Z
We couldn’t complete this review. Comment @codex review to try again.
65e46f3 PR opened
ℹ️ 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 10, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 02b7c2d
Status: ✅  Deploy successful!
Preview URL: https://f0f698bb.arsonmix.pages.dev
Branch Preview URL: https://refactor-m2-device-apply-bou.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 02b7c2d

@masarray
masarray merged commit 4eb541a into main Nov 10, 2026
11 checks passed
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.

[P1][ARCHITECTURE] Long-term maintainability: consolidate mixer/FX host ownership and reduce high-coupling modules

1 participant