Skip to content

fix(g-mv26): gate physical MAIN control by accepted native PCM authority - #809

Merged
masarray merged 8 commits into
mainfrom
refactor/g-mv26-main-scalar-authority-fence-20261119
Nov 19, 2026
Merged

masarray merged 8 commits into
mainfrom
refactor/g-mv26-main-scalar-authority-fence-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

G-MV26 — Exact native MAIN scalar authority, no stale-M4 shortcut

Root cause from G-MV25 follow-up audit

The physical MAIN fader/MUTE still uses the existing native routingM4Control host-scalar gateway (intentionally: this is not an invented ChannelId SET_FADER). Its previous GUI eligibility expression used m4Verified() || nativeMasterReady(), however m4Verified() inspects legacy M4 diagnostic fields and can remain true when the actual schema-v6 mixerSession.authority has switched to ChannelId or become unadmitted. Thus a stale legacy flag could authorize a new MAIN gain/mute command even if the current native producer was not admitted. This change fences that at the accepted native read-model.

Implementation

  • Pure stripVM.masterScalarAuthority(snapshot,{m4Verified,graphConnected}): returns CHANNEL_ID, M4, or UNAVAILABLE, checking the current mixerSession authority, matching device epoch, retained/admitted status, valid MAIN controls and safe numeric native host tokens. M4 specifically requires current admitted M4 routing revision and verified route; ChannelId must have accepted PCM and completed UI graph projection, never the legacy M4 shortcut.
  • Bridge now reuses the same predicate for MAIN pointer stream, MUTE, reset-to-unity, and the existing sendM4Control transport preflight. Physical MAIN still uses its original single native event, ACK/readback settlement and one JUCE graph; no new controller, auto-arm, pseudo PCM, DSP, UI/CSS or .smix modification.
  • Contract test covers admitted ChannelId and M4, loss of ChannelId admission with stale-M4 evidence, unadmitted first sound, retained PCM, mismatched route/epoch, invalid MAIN readback and uint64-to-M4-host numeric overflow. Existing MAIN drag fixture remains an integration regression.

Qualification

Source committed on dedicated GUI branch; JavaScript syntax parsed. Need fast UI/native checks, then one exact-head Full Chromium /preview/ milestone and required gate before protected merge. Physical Windows ASIO listening/installer FAT not performed. No N-MOD file overlap.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T03:37:06.612260Z 07722be 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.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui aea0f5b

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 07722be
Status: ✅  Deploy successful!
Preview URL: https://9281b025.arsonmix.pages.dev
Branch Preview URL: https://refactor-g-mv26-main-scalar.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 754d05f

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

Copy link
Copy Markdown

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: 754d05fb52

ℹ️ 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 web/approved-native-bridge.js Resolved

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 07722be

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 07722be427

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

@masarray
masarray merged commit b30a593 into main Nov 19, 2026
29 checks passed

Copy link
Copy Markdown
Owner Author

G-MV26 final owner handoff — merged to main

MERGED: PR #809, squash main@b30a59303ad3aed486a141c96acc42dec00d2caa, from exact reviewed PR head 07722be427bab4203c18f0878bb85e9dffd56bfa.

What changed (4 GUI/test files, no native/DSP/installer changes):

  • web/approved-channel-strip-view-model.js: pure masterScalarAuthority checks exact current schema-v6 session authority (ChannelId/M4), matching device epoch/physical host revision, accepted MAIN readback and admission. Old M4 telemetry cannot authorize MAIN after PCM authority changes.
  • web/approved-native-bridge.js: one preflight reused by physical MAIN fader, MUTE, unity reset and the existing routingM4Control IPC; when unavailable, MAIN actions do not fall through to generic ChannelId mutating intent. The offline logicalView branch explicitly retains existing SET_MUTE / SET_FADER via logicalIntent for .smix, without any physical PCM write or auto-arm.
  • tests/approved_scalar_view_model_contract.test.cjs and tests/live_fader_held_drag.test.cjs: authority/epoch/revision/retained/main-readback and exact uint64-safety plus real WebView negative MAIN command and offline logical-main MUTE/unity dispatch cases.

Exact-head qualification:

  • Fast UI: SUCCESS (job 135318965651); zero test failures including G-MV26 offline .smix and refused MAIN cases.
  • Fast Native: SUCCESS (run 44452306705).
  • Full Chromium /preview/: SUCCESS, all 109 steps and zero failures (run 44452547680).
  • Exact-head Codex review: COMPLETE, zero findings. Earlier P2 offline regression was fixed and its thread resolved.
  • Required CI Merge Gate: SUCCESS on exact head after re-running original publisher job (run 44452306470).
  • Merged main HEAD re-fetched and verified b30a59303ad3aed486a141c96acc42dec00d2caa. Post-merge push CI (UI run 44453976259, native run 44453976194) was IN PROGRESS at this checkpoint; do not misreport as PASS.
  • Not tested: physical ASIO audio path / Windows installer or speaker FAT. A software browser pass is not real-hardware proof.

N-MOD isolation: no src/Main.cpp, CMakeLists.txt or PCM callback edits; preserve native N-MOD parallel work on its own branch. Continue GUI modularization in a fresh PR only after checking latest main, active PRs, operator-impactful coupling, and tests. Next bounded opportunity: audit M4/ChannelId/LOGICAL_ONLY per-action availability for other native host controls before moving any additional bridge orchestration. No new controller, PCM owner or speculative autoplay.

Copy link
Copy Markdown
Owner Author

GUI G-MV closure handoff — stop indefinite incrementing

This PR #809 is already MERGED, so this comment is a coordination handoff for the GUI MVVM implementation thread, not a request to reopen or change the merged PR.

Owner direction and shared exit contract: #527 (comment)

After G-MV26, first audit current main, not outdated pilot ViewModels, and post to #527 a finite map of what still lives in web/approved-native-bridge.js versus pure approved-{device,channel-strip,wire,fx-rack}-view-model.js / approved-native-contract.js. Classify each bridge responsibility as (A) correct adapter/DOM/transport work to KEEP, (B) feature policy/pending-state orchestration to EXTRACT, or (C) legacy/dead path to RETIRE only with tests. Do not use file length as a proxy for failure or force unnecessary framework migration.

Define one coherent GUI consolidation milestone with acceptance gates: exactly one v6 controller/IPC dispatcher; one native source of truth for LIVE; ChannelId/EdgeId/physical device identity and stale-request fencing; M4 only where still supported; OFFLINE .smix MAIN MUTE/reset and all logical edits unaffected; SOURCE ONLY/WIRE/BUS/MAIN/SENDS/Fader/PAN/FX accepted ACK + independent PCM readback; retained NEEDS_REMAP and same-epoch producer changes recover without stale UI leases; full Chromium /preview/ geometry/interaction parity, plus focused Node regressions.

Make small defects part of that bounded milestone unless a safety-critical independent fix truly needs immediate release. Keep GUI-only files separate from Native #799 source. Freeze the final diff; run cheap source tests first and only the required exact-head Chromium/merge gate once the candidate is stable. Do not initiate duplicate builds or merge a red/pending gate. Record which rules were actually removed from the bridge and which adapter functions intentionally remain.

Required next report on #527: main SHA, ownership inventory, explicit residual GUI tasks (or justified DONE), number and nature of duplicate policies eliminated, tests with exact run links, and one finite closure criterion. No automatic G-MV27/G-MV28 just to continue a sequence. GUI closure is not full Native modularization or hardware ASIO FAT.

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