Skip to content

fix(g-mv25): immediate native authority recovery despite pending v6 GUI ACK - #807

Merged
masarray merged 2 commits into
mainfrom
refactor/g-mv25-controller-authority-snapshot-fence-20261119
Nov 19, 2026
Merged

masarray merged 2 commits into
mainfrom
refactor/g-mv25-controller-authority-snapshot-fence-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

G-MV25 — Fix the v6 native controller's same-epoch producer switch fence

Verified root cause

createController.onSnapshot() previously cancelled a pending GUI intent on device epoch change, retained NEEDS_REMAP, or physical pin/format change, but not when an admitted ChannelId native PCM producer became M4/UNADMITTED at the same device epoch and hardware fingerprint. With a pending un-ACKed edit, the shared controller's optimistic-protection gate suppressed the newly accepted native snapshot and the bridge could not execute its existing authority-change cleanup. With an ACKed edit, an unadmitted new snapshot returned false instead of immediately publishing the replacement source. In both cases the operator GUI could remain on the old read-model until another snapshot or timeout.

Implementation

  • Add one authorityChanged comparison in the existing schema-v6 controller, covering changes of the authoritative session marker or actual admitted/non-admitted PCM ownership. Clear the old pending v6 lease before the existing !pending.ack display freeze and call the unchanged onAccepted pipeline. This lets G-MV24's existing DeviceVM lifecycle fence drop all old SOURCE/FX/WIRE/output leases in the very same callback.
  • Preserve monotonic device epoch and graph/roster revisions: a lower same-epoch graph stays fail-closed (no unsafe re-admission), retain native-authoritative hardware fingerprint, no automatic replay of old fader/WIRE/source or MONITOR arming.
  • Regression test both no-ACK and already ACKed transaction, same-epoch/physical M4 takeover, correlated stale ACK ignored, output remains muted, fresh readback re-admits ChannelId, new edits use fresh revision, no second native controller or PCM renderer.

Only web/approved-native-contract.js and existing Node source-contract test changed. No native JUCE, driver, DSP, .smix, UI layout or N-MOD branch modification. Fast UI/native and one exact-SHA Full Chromium /preview/ must pass with Required Merge Gate before squash merging. No Windows physical ASIO FAT claimed.

@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-19T02:53:46.822070Z c66fcb9 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 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: c66fcb9946

ℹ️ 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-contract.js Resolved
@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: 3ee388a
Status: ✅  Deploy successful!
Preview URL: https://61f081bf.arsonmix.pages.dev
Branch Preview URL: https://refactor-g-mv25-controller-a.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 3ee388a

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

Copy link
Copy Markdown
Owner Author

G-MV25 — Indonesian owner handoff / 19 November 2026

(1) Operator outcome. Native GUI now immediately recognizes an authoritative PCM producer transition such as admitted ChannelId → M4/UNADMITTED at unchanged device epoch and canonical hardware pin/format fingerprint. Previously, a pending un-ACKed v6 fader/WIRE/FX intent could suppress the replacement accepted callback entirely. A previously ACKed control would reject an unadmitted snapshot rather than repaint that replacement promptly. The existing one-controller onSnapshot now expires the old control lease BEFORE the ACK-only projection freeze, hands the native snapshot to the same bridge onAccepted() callback, and G-MV24 lifecycle cleanup handles SOURCE/FX/WIRE/output GUI requests exactly once.

(2) Status: MERGED MAIN. PR #807 squash SHA 354646bc47471050a4d777e42603774c52489b9d, independently checked as main HEAD. Qualified source HEAD 3ee388a49190a7f014c59eceab95eaf99a4b6136. Exactly two files changed: web/approved-native-contract.js and tests/approved_native_m2_contract.test.cjs. There is still ONE native schema-v6 ACK/readback controller and ONE original JUCE PCM renderer, no parallel producer/UI.

(3) Safety: Pure same-device authority transitions now report STALE_NATIVE_AUTHORITY; unchanged physical and NEEDS_REMAP/epoch remaps continue to report STALE_DEVICE (preserves older error contracts). Late ACKs from retired owner cannot confirm PCM or automatically replay queued routing; recovered ChannelId requires a new accepted PCM readback before fresh intents. Original monotonic graph/roster revision and epoch guards remain fail-closed even on authority changes; lower same-epoch revisions are not accepted. MONITOR stays muted in regression recovery, no automatic arm, no hardware reconfiguration. No native DSP/VST3/driver/.smix/styles changed.

(4) Owner action: NOTHING REQUIRED for merged code milestone. No new installer or ASIO hardware field FAT was performed. GUI/contract QA is not a claim of physical speaker playback qualification.

(5) Exact-SHA evidence:

(6) Next recommendation: G-MV26 should address any measurable same-epoch device/authority recovery revision ambiguity at the native producer contract boundary with monotonic generation/epoch evidence, rather than relaxing current anti-replay revision guards. Prioritize staged repro/tests, keep N-MOD Player and IO1 separate; never accept lower-revision old PCM without authenticated/monotonic producer generation.

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