Skip to content

refactor(mv19): admit native device identity before mutating GUI hardware state - #800

Merged
masarray merged 3 commits into
mainfrom
refactor/mv19-admit-device-before-ui-projection-20261119
Nov 18, 2026
Merged

masarray merged 3 commits into
mainfrom
refactor/mv19-admit-device-before-ui-projection-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

MV-19 — Fail-closed hardware-scoped GUI projection

Operator-facing reliability: An inconsistent native read-model or malformed device identity cannot repaint the accepted Audio I/O controls, physical input labels, output status or clear a pending FX edit. Only an admitted candidate goes through the existing device-change/authority fence, then Device Setup reconciliation, physical panel and EXTERNAL OUT presentation.

Code

  • web/approved-native-bridge.js: evaluate M4 eligibility from the incoming normalized native snapshot, not from the previously painted global hardware. Defer transient WIRE visual flush, deviceVM.setupReadback, finishDeviceApplyUi, updateHardwarePanel until after selectNativeReadModel and nativeLifecycleLease both succeed and the MV-18 lifecycle fence runs. Keep external-output presentation after cleanup.
  • tests/approved_device_pin_identity_contract.test.cjs: enforce read-model/lease/lifecycle ordering and independent candidate M4 evidence.
  • tests/approved_native_m2_contract.test.cjs: extend actual VM/WebView M4 reconnect integration: inject a schema-valid but rejected read-model candidate through a guarded controller callback; assert no accepted hardware label/pin choice mutation and no premature release of a pending FX request, then verify a valid same-epoch vendor switch still clears the old lease; late ACK and timer remain fenced.

No new source of truth, retry loop, native transport, device driver, CSS, /preview/ variant, JUCE, VST3 PCM, .smix or MAIN auto-arm.

Base: main 7c142caacfe359c0c25ddfb376c780c977e9ec4d
Initial review HEAD: 1cadad31224275793305526dc9c28a9cd1e32484
Qualification: fast UI/native checks and exact-HEAD Chromium UI milestone to be reviewed before merge; physical ASIO FAT NOT RUN. See maintainability epic #527.

Owner handoff: HASIL: bounded fail-closed GUI readback admission; STATUS: KODE DIBUAT, CI BELUM DIKONFIRMASI; AMAN DIPAKAI: current merged main remains unchanged; TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA; NEXT: resolve fast CI, exact-SHA full Chromium, protected merge if qualified.

@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-18T21:48:54.741311Z 1cadad3 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.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 1cadad3

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1cadad3
Status: ✅  Deploy successful!
Preview URL: https://1c56d877.arsonmix.pages.dev
Branch Preview URL: https://refactor-mv19-admit-device-b.arsonmix.pages.dev

View logs

@masarray
masarray merged commit b6dfd41 into main Nov 18, 2026
38 of 39 checks passed

Copy link
Copy Markdown
Owner Author

MV-19 — Owner-facing completion (2026-11-19 WIB)

HASIL: Fail-closed GUI device admission. A rejected/inconsistent native read-model cannot mutate Device Setup, physical input/output presentation, nor retire a valid pending M4 FX edit. M4 eligibility is evaluated against the candidate accepted snapshot; approved /preview/ and single JUCE PCM/VST3 graph are unchanged.

STATUS NYATA: MERGED MAIN as squash commit b6dfd41393618e81f6518f53545926a6f8c90876 (PR branch exact qualified HEAD 1cadad31224275793305526dc9c28a9cd1e32484).

BUKTI exact PR HEAD:

AMAN DIPAKAI: GUI source change merged and qualified by code/Chromium CI; this is not a new Windows installer or physically ASIO-qualified release. Main push workflows were still running at this handoff; no claim of post-merge PASS until completed. HARDWARE FAT: NOT RUN.

TINDAKAN ANDA: Tidak perlu melakukan apa-apa.

LANGKAH BERIKUTNYA: Audit next MVVM GUI lifecycle-boundary improvement with real regression evidence; preserve single approved /preview/, native ACK/readback, epoch/ChannelId/EdgeId lease, .smix and PCM renderer. Keep native C++ modularization separate.

CI observation: A manually dispatched workflow_dispatch UI run without pull_requests association did not automatically refresh ArSonMix / Required CI Merge Gate; rerunning only the existing pull_request_target status-publisher job after Full Chromium succeeded legitimately re-evaluated all exact-head runs and set gate SUCCESS. No false status or check bypass.

Copy link
Copy Markdown
Owner Author

G-MV GUI MVVM — post-merge handoff for the ongoing GUI workstream

Please carry the shared Native + GUI architecture audit into the next GUI milestone. #800 MV-19 is already MERGED at the time of this comment; do not reopen/redo its change or treat this as a request to alter the merged PR.

What is now fixed by #800: one read-model and physical device identity must be admitted before any hardware-scoped Device Setup/pin label/EXTERNAL OUT/FX lease UI mutation. Preserve fail-closed behavior across malformed/rejected candidate snapshots, same-epoch device swaps, ChannelId versus verified M4 authority and stale/later ACK. Native accepted PCM remains the only UI truth.

Next meaningful GUI modularization: audit web/approved-native-bridge.js (~4,078 lines at previous main checkpoint) by responsibility and coupling, not LOC alone. Extract remaining cohesive feature-specific presentation/transaction policy into the existing pure Device/Channel Strip/WIRE/FX ViewModels only when it removes old bridge ownership, keeps one native controller/queue/readback and reduces the files touched for a representative new command. No second JS accepted session, UI renderer, global event bus, direct DSP, duplicate native subscription, or redesign of approved /preview/.

Required regression: behavioral Node/Chromium testing for admitted vs rejected readback ordering, independent native ACK + installed graph readback, stale device epoch and reused vendor identity, FX/EXTERNAL OUT lease cleanup, SOURCE ONLY/WIRE/BUS/MAIN, fader/PAN and exact VST3 instance identity; keep visual/bundle parity of native WebView2 /preview/. Report exact SHA, CI status on that SHA and physical ASIO FAT separately.

Cross-thread boundary: #792 and #799 are independent native C++ workstreams currently open. GUI changes must not touch or overwrite their Main.cpp/CMake hotkey/Player work; coordinate through epic #527. Label future GUI stages G-MV to distinguish them from Native N-MOD (do not rename historical PRs).

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