Skip to content

refactor(mv8): Device Setup selected-pin identity through ACK and readback - #785

Open
masarray wants to merge 2 commits into
mainfrom
refactor/mv8-device-apply-pin-identity-20261118
Open

masarray wants to merge 2 commits into
mainfrom
refactor/mv8-device-apply-pin-identity-20261118

Conversation

@masarray

Copy link
Copy Markdown
Owner

MV-8 — Physical Device Setup identity, one existing pure ViewModel

Base: main@7e2e2796259862ab25c16ae4237a39d7f5f6c1e2 (includes merged WIRE PR #784). This PR is deliberately disjoint from #784: no edits to web/approved-native-bridge.js, web/approved-wire-view-model.js, or tests/approved_native_m2_contract.test.cjs.

Real reliability problem

On the same active hardware, the operator can explicitly choose input/output pin masks. Existing setupBegin sent those masks to JUCE but forgot them in the pending transaction; setupAck and setupReadback only compared what the driver reported to itself. This could announce an accepted Apply even if the actual physical pins differed from the operator's choice. At the same time, newly selected devices intentionally send empty pin arrays to let JUCE choose defaults; never treat these as an explicit request to disconnect every pin.

Implemented

  • web/approved-device-view-model.js: one pure validPinMask and samePinMask policy used in draft eligibility, two-pin MAIN action, accepted driver ACK and independently installed schema-v6 readback. Rejects duplicates, fractions, out-of-range, phantom pins; compares canonical sets rather than callback array order. Captures requestedPins for same-endpoint explicit pin Apply; for changed devices leaves it null so driver defaults work. A mismatched accepted ACK yields RECOVERY_REQUIRED and keeps device setup open; does NOT claim rollback or LIVE.
  • tests/approved_device_pin_identity_contract.test.cjs: separate deterministic 7-test suite for same-mask reordering, explicit input/output mismatch, malformed masks, driver defaults on new device/output-only, timeout/late ACK and one native transport.
  • .github/workflows/ui-smoke.yml: run the new independent test in BOTH fast and full Chromium lanes; add exact trigger path.

Invariants: ONE approved /preview/ renderer, ONE JUCE native ChannelId/EdgeId/VST3 PCM owner, existing arMixAction and native Apply coordinator. No C++/JUCE/DSP/ASIO/VST3/.smix changes, no new state store/controller, no GUI HTML/CSS/PNG/layout changes. Real hardware remains the only authority for pin availability and open status.

STATUS: KODE DIBUAT / DRAFT. Fast UI/native and exact-head Chromium proof pending. Windows installer, live ASIO device FAT, and dual-interface hardware qualification NOT RUN. Tindakan Anda: TIDAK PERLU MELAKUKAN APA-APA.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 81f756c

@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: 81f756c
Status: ✅  Deploy successful!
Preview URL: https://9dbf3d7f.arsonmix.pages.dev
Branch Preview URL: https://refactor-mv8-device-apply-pi.arsonmix.pages.dev

View logs

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

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-18T07:22:48.382792Z 81f756c 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.

This branch has not been deployed

No deployments
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