Skip to content

refactor(mv7b): fail-closed WIRE recovery and deferred SEND gain ViewModel - #784

Merged
masarray merged 2 commits into
mainfrom
refactor/mv7-wire-lifecycle-gain-20261118
Nov 18, 2026
Merged

masarray merged 2 commits into
mainfrom
refactor/mv7-wire-lifecycle-gain-20261118

Conversation

@masarray

Copy link
Copy Markdown
Owner

MV-7 — WIRE transaction lifecycle and deferred SEND gain safety

Outcome / HASIL: This implementation takes two remaining authoritative-PCM-dependent WIRE decisions out of the 4k-line web/approved-native-bridge.js and places them in the existing pure web/approved-wire-view-model.js, with zero new controllers, stores, event buses or PCM/DSP owners.

  • gainDispatchPlan: verifies admitted exact graph identity, canonical decimal-string ChannelId/EdgeId, a unique installed PARALLEL SEND, finite bounded gain and already-applied/no-op levels. A stale or duplicate EdgeId fails closed and the bridge restores accepted display rather than issuing a speculative command.
  • nativeRecoveryPlan: identifies PENDING / ACCEPTED / IDLE / FLUSH_STARTUP_RETRY / REBASE_CONNECTION / ROLLBACK. A failed CONNECT may be rebased once only on identical native device epoch after the existing admission gate. REMOVE, RETARGET, timeout, device swap, unsupported request and stale graph are not automatically replayed.
  • The original protocol.createController alone retains command dispatch, ACK correlation, installed native readback, timeout and publisher authority; the bridge retains UI side effects and timers. No synthetic WIRE state is authoritative.
  • Extended the existing deterministic Node native/UI contract with positive/negative tests for exact >2^53 identities, duplicated EdgeId, bad gains, stale device epoch, retry budget, and unchanged bridge controller ownership.

Files: web/approved-wire-view-model.js, web/approved-native-bridge.js, tests/approved_native_m2_contract.test.cjs.

Safety: JS-only existing /preview/ source; no changes to JUCE C++, ASIO, VST3, DSP, PCM, CSS/HTML/PNG, .smix schema, or independent dual-ASIO IO-1 draft #771. Preserve PRIMARY OUT vs PARALLEL SEND, SOURCE ONLY, no auto hardware ARM, and the approved GUI.

Validation: local source syntax / pure selector preflight PASS. Fast native/UI contracts, a full native-assembled Chromium run and Required Merge Gate at the exact HEAD must be verified prior to merge. Windows hardware FAT / installer NOT RUN.

Status / STATUS: KODE DIBUAT, DRAFT PR, CI PENDING. Aman dipakai? BELUM sebagai rilis/installer. Tindakan Anda: TIDAK PERLU MELAKUKAN APA-APA. Next: resolve genuine CI failures on this head, then reconcile to main and merge only with required checks; continue higher-level FX & native application ownership separately.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 9a5cac0

@masarray
masarray marked this pull request as ready for review November 18, 2026 06:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T07:05:07.224017Z 46c2c5b Draft marked ready
ℹ️ 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 18, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 46c2c5b
Status: ✅  Deploy successful!
Preview URL: https://eb387907.arsonmix.pages.dev
Branch Preview URL: https://refactor-mv7-wire-lifecycle.arsonmix.pages.dev

View logs

@masarray masarray changed the title refactor(mv7): fail-closed WIRE recovery and deferred SEND gain ViewModel refactor(mv7b): fail-closed WIRE recovery and deferred SEND gain ViewModel Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Cross-thread reconciliation (MV-7A SOURCE vs MV-7B WIRE)

Source audit on the exact main@1e5df9a confirms #783 also edits web/approved-native-bridge.js and tests/approved_native_m2_contract.test.cjs, but its hunks are SOURCE dispatch/readback (~1049, ~2668, ~2979) and earlier tests, whereas this PR owns WIRE gain/recovery (~369, ~2887) and appended WIRE tests. Both changes are logically compatible. Preserve both; after the first merge, reconcile the other branch against current main and require exact-head tests rather than copying an old full bridge or overwriting concurrent changes. No second native controller, no extra PCM graph, no hardware auto-arm.

Fast UI and Fast native checks for 9a5cac0 PASS. Deliberate full Chromium /preview/ run #44253787703 is active; do not claim merge readiness until its result and the required SHA status are successful.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 46c2c5b

Copy link
Copy Markdown
Owner Author

@codex review

Please review the exact reconciled MV-7B HEAD 46c2c5b5135348dd17d0bc8b97c874a849c325ab against the newly merged MV-7A SOURCE baseline af21ba4963a26e5af65c851bcfda4c87b74e46d6: check WIRE retry/rollback, exact EdgeId gain preflight, native controller ownership and possible interaction with SOURCE ACK/readback. No CSS/native PCM changes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 46c2c5b513

ℹ️ 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 marked this pull request as draft November 18, 2026 07:03
@masarray
masarray marked this pull request as ready for review November 18, 2026 07:03
@masarray
masarray merged commit 7e2e279 into main Nov 18, 2026
44 of 57 checks passed

Copy link
Copy Markdown
Owner Author

OWNER DELIVERY — ArSonMix MV-7B WIRE (18 Nov 2026)

HASIL: Existing pure approved-wire-view-model.js now owns deferred SEND gain preflight (gainDispatchPlan) and status-driven native WIRE retry/rollback projection (nativeRecoveryPlan). A stale or duplicate EdgeId, non-finite gain or changed graph/device fails closed; only one new CONNECT may be safely rebased to the same device epoch. The bridge retains the one existing protocol.createController, command dispatcher, ACK, timeout and installed PCM readback. No new JS mixer state authority, PCM renderer or changes to the approved /preview/ design.

STATUS: MERGED MAIN — KODE DIUJI. PR #784 / original feature commit 9a5cac0, reconciled integration HEAD 46c2c5b5135348dd17d0bc8b97c874a849c325ab after MV-7A SOURCE PR #783 merged, squash main@7e2e2796259862ab25c16ae4237a39d7f5f6c1e2. Source and native-assembled GUI contract remain aligned.

BUKTI: Exact merged-candidate Fast Native PASS, Fast UI PASS (260/260 native GUI contracts; zero failures), Full Chromium native /preview/ PASS (109 completed steps, run #44254702313); Required Merge Gate = SUCCESS before squash; Codex review completed with no findings. Exact post-merge push Windows/Chromium CI separately in progress when noted. Hardware ASIO FAT: NOT RUN; new Windows installer: NOT CREATED.

AMAN DIPAKAI? YA as a tested JavaScript source refactor on main; BELUM as a new installer or physical hardware qualification. TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

NEXT: Continue bounded MV-8 FX Rack transaction/pending lifecycle and the original native modular-monolith M2–M6; do not create a second native status owner or replay already-merged M1–M6. Preserve #783 SOURCE exact readback settlement, one ChannelId/EdgeId graph, SOURCE ONLY, PRE/POST, SOF, FX VST3 and physical output authorization.

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