Skip to content

refactor(gui G-MV28): unify verified M4 FX rack/slot transactions and stale ACK fencing - #814

Merged
masarray merged 4 commits into
mainfrom
refactor/g-mv28-m4-fx-authority-transaction-20261119
Nov 19, 2026
Merged

masarray merged 4 commits into
mainfrom
refactor/g-mv28-m4-fx-authority-transaction-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

G-MV28 — one verified M4 FX Rack/slot power authority and transaction adapter

Problem sourced from live main after merged G-MV27 #811: requestM4RackPower previously dispatched a physical routingFxRackBypass solely when mixerSession.authority === "M4" and two safe-looking session revision counters existed, without checking verified M4 producer/readback, retained/disconnected state, installed device identity, or that the legacy M4 producer revision was actually the same. Slot bypass checked m4Verified and was dispatched by a different bridge branch. Rack ACK matching was also duplicated in the bridge. A stale session or same-epoch remap could therefore produce a wrong-owner native rack command.

Implemented:

  • fxRackVM.m4PowerPlan pure selector now owns the single M4 rack and insert power admission: exact accepted snapshot, admitted === false, not retained/offline, M4 authority, same native device epoch, same accepted session/legacy route revision, active/accepted physical M4 producer, verified 0–9 native lane, exact 0–7 FX slot and instance ID, boolean bypass state, per-control pending lease and strictly JS-safe host IPC tokens (never round uint64).
  • Replaced both requestNativeFxPower and requestM4RackPower with one requestM4FxPower adapter. It only packages the VM-produced action/payload into the unchanged native routingFxBypass / routingFxRackBypass actions, retains separate rack/slot pending maps and existing respective 5s/8s bounded timeout, ACK and independently installed readback. No second dispatcher/controller.
  • m4RackAckResult handles exact ACK matching in the pure ViewModel; m4RackSettlement now requires the full accepted native snapshot, rejecting changed authority, retained graph, missing actual M4 producer, mismatched legacy revision or epoch rather than trusting only a session fragment.
  • Comprehensive pure decision test matrix and end-to-end existing real bridge harness covering first M4 rack and slot power, suppressed double click, same-epoch driver/pin remap, stale ACK/timer and retained new lease.
  • No change to ChannelId/native FX plugin host, logical .smix edits, FX preset state, DSP/PCM/VST3, CSS/DOM, approved /preview/, global FX A/B, WIRE/SOF and N-MOD native PRs refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection #799/refactor(native N-MOD-19): isolate DIRECT recovery coordinator and fault evidence #813.

Checks required before merge: Fast UI + Fast Native on exact PR head, Codex review with all findings resolved, one exact-SHA Full Chromium /preview/ all steps, required fail-closed merge gate. No Windows installer or ASIO hardware FAT requested for this pure GUI/bridge change; physical audio qualification remains separate. Never merge pending/failing statuses or replay N-MOD work.

Based on main@3fc172da943352ba2f4952279f53fa9ea3b7f228. Pure policy smoke and JS syntax passed before PR.

@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-19T04:48:15.013283Z c862ea5 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.

@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: c862ea5
Status: ✅  Deploy successful!
Preview URL: https://4a5cdbf4.arsonmix.pages.dev
Branch Preview URL: https://refactor-g-mv28-m4-fx-author.arsonmix.pages.dev

View logs

@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: f29f4740a8

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

@codex review

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui c862ea5

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: c862ea5c24

ℹ️ 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 2515316 into main Nov 19, 2026
29 checks passed

Copy link
Copy Markdown
Owner Author

G-MV28 final handoff — MERGED MAIN on 2026-11-19

Verified GitHub state: PR #814 merged/closed from exact reviewed head c862ea5c24d65988ff8cece9ec458f165b664964; current main squash commit 25153167d45a3b36d176fdeb1f3fce7a8983127e. No rebasing or stacking on N-MOD #799/#813.

Hasil untuk pengguna: M4 FX Rack header and per-insert bypass now use a SINGLE verified native-authority decision and request adapter. A stale/retained/disconnected M4 session, legacy-vs-installed route mismatch, unsafe host epoch/revision token, missing FX lease or concurrent pending action cannot send an unrelated physical FX power command. Rack ACK and independent readback both fence exact producer epoch/revision. Slot bypass and full-rack bypass remain separate atomic operations and preserve each plugin's deliberately stored bypass flag.

Actual ownership removed: obsolete requestNativeFxPower and requestM4RackPower bridge decisions removed; fxRackVM.m4PowerPlan owns both gates; requestM4FxPower emits ONLY already-validated existing native action/payload, with original per-rack and per-slot bounded pending maps; m4RackAckResult and full-snapshot m4RackSettlement own acceptance proofs. No added JS accepted mixer, native dispatcher, PCM renderer or global EventBus.

Changed files (3):

  • web/approved-fx-rack-view-model.js — pure M4 rack/slot plans and exact ACK/readback fence.
  • web/approved-native-bridge.js — one adapter, retired two branches and handwritten rack ACK.
  • tests/approved_native_m2_contract.test.cjs — complete pure authority matrix + real M4 bridge harness with same-epoch driver/pin remaps, stale ACK/timers, first/duplicate gate and restored next device. The first CI found an old test regex expecting removed function names; updated that legacy assertion to verify the NEW single adapter, and reran full CI on the final source.

Exact-SHA evidence:

  • Fast UI #44460447815: SUCCESS. Its source regression logs include both new G-MV28 tests with zero failures.
  • Fast Native #44460445685: SUCCESS, including G-MV28 source/contract tests.
  • Full Chromium #44460672780: SUCCESS 109/109, including Stage C exact original/compiled CSS parity and FX Rack/WIRE/mixer operator workflows; exact c862ea5c24d65988ff8cece9ec458f165b664964.
  • Codex review for c862ea5c24d65988ff8cece9ec458f165b664964: COMPLETED, 0 findings, 0 unresolved threads; an earlier pre-fix P2 stale-test assertion thread was explicitly answered and resolved.
  • Required ArSonMix / Required CI Merge Gate: SUCCESS for final head after re-running only exact-head status publisher job #135345637431 following successful Chromium. No bypass of branch protection.
  • Post-merge main-push UI #44461908621 and native #44461908627 were IN PROGRESS at this reporting checkpoint; do not label them passed until complete.
  • Windows installer / actual vendor ASIO physical listening FAT: NOT RUN for this GUI-only milestone. No new downloadable build or release is claimed.

Scope/safety: Approved /preview/ DOM/CSS/PNG unchanged, logical .smix owner unchanged, ChannelId native FX and global A/B unchanged. One JUCE PCM graph/render owner; no auto speaker arm and no driver hotplug trial. Issue #778 visual parity flakiness remains a separate CI-only concern (this PR's exact-head parity passed).

Owner-facing completion: STATUS MERGED MAIN, CODE TESTED; AMAN DIPAKAI = YA as protected source GUI baseline; physical Windows ASIO/hardware behavior BELUM TERUJI on this commit. TINDAKAN USER = TIDAK PERLU MELAKUKAN APA-APA. NEXT G-MV29 should audit actual remaining duplicated physical WIRE/FX/Device authority, extracting only responsibilities that can be deleted from bridge, and preserve all approved GUI and PCM invariants.

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