Skip to content

refactor(g-mv23): skip verified SOURCE duplicates after timeout/readback - #805

Merged
masarray merged 2 commits into
mainfrom
refactor/g-mv23-source-verified-noop-and-timeout-recovery-20261119
Nov 19, 2026
Merged

masarray merged 2 commits into
mainfrom
refactor/g-mv23-source-verified-noop-and-timeout-recovery-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

G-MV23 — Verified SOURCE idempotence and efficient queue recovery

Root issue: WebView's shared ChannelId/M4 SOURCE queue previously sent every valid queued edit, even when an earlier SOURCE transaction had actually installed that very same physical input. During rapid operator changes, an ACK/readback race or timeout can leave a follow-up draft equal to accepted PCM. The bridge would then issue a redundant native routing command. Canceling at selection time is unsafe: an initially rejected command must leave the latest operator choice retryable from a fresh revision.

Changes

  • One pure installedSourceMatches comparator shared by strict ChannelId/M4 SOURCE ACK + independent PCM readback and queue no-op detection. Physical pin/format rules no longer drift.
  • New sourceQueueAlreadyInstalled checks the installed PCM source, exact hardware fingerprint/epoch and current ChannelId graph or fully verified M4 producer. Never rely on GUI label, pending ACK, stale hardware, NEEDS_REMAP, or unadmitted M4 first sound.
  • Shared sourceQueueHead yields SKIP_INSTALLED for a redundant queued edit. Existing bridge deletes it and moves on without creating another requestId or sending a native command.
  • When the previous request rejected or timed out without installing the requested SOURCE, the latest selection still yields SEND with a FRESH native graph/M4 revision.
  • Regression coverage: 64-bit ChannelId, ACK/readback race, timeout, SOURCE NONE/MONO/STEREO, physical hardware swap, M4 first sound, mismatch/rejection and single native dispatch.

Only the existing Channel Strip ViewModel, approved WebView bridge, and Node contract test change. No second controller, DSP/PCM owner, driver, VST3, .smix persistence, UI redesign, output auto-arm or N-MOD touch. Keep the ONE approved /preview/.

Fast UI/native, exact-SHA Full Chromium and fail-closed Required Merge Gate before merge. Installer and physical ASIO FAT are separate and not 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-19T00:45:33.667367Z 11d713c 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 11d713c

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11d713c
Status: ✅  Deploy successful!
Preview URL: https://ab1f8444.arsonmix.pages.dev
Branch Preview URL: https://refactor-g-mv23-source-verif.arsonmix.pages.dev

View logs

@masarray
masarray merged commit 2f86114 into main Nov 19, 2026
29 checks passed

Copy link
Copy Markdown
Owner Author

G-MV23 — Final owner handoff (19 Nov 2026 WIB)

1. Hasil nyata untuk operator: Antrean SOURCE/INPUT yang terakhir dipilih tidak lagi mengeluarkan native routing command bila pilihan tersebut SUDAH TERBUKTI terpasang melalui readback PCM yang diterima. Ini menghindari pengiriman SOURCE kedua akibat ACK/readback balapan atau timeout 8 detik. Bila permintaan sebelumnya ditolak dan SOURCE belum terpasang, pilihan terbaru tetap diproses menggunakan graph/M4 revision dari readback terbaru; tidak menghapus retry yang sah. ChannelId dan M4 mempertahankan validasi epoch, canonical hardware fingerprint, pin format, serta jalur M4 first-sound.

2. Status: MERGED MAIN. PR #805 squash merge commit 2f86114a123df7054e74db7a62a52db74ca26846, verified source HEAD 11d713c67e8c45ef4dbaf76481b3f97f2663b2e2. Berubah 3 file: web/approved-channel-strip-view-model.js, web/approved-native-bridge.js, tests/approved_native_m2_contract.test.cjs. ViewModel kini memiliki satu pure installedSourceMatches yang dipakai oleh settlement ACK+readback dan no-op detection, serta sourceQueueAlreadyInstalled; bridge tetap satu owner native emit/queue/ACK/timers, tidak ada renderer kedua.

3. Aman dipakai? YA untuk source GUI hasil merge yang lulus pemeriksaan sebelum merge. BUKAN klaim installer Windows baru siap diuji, hardware ASIO FAT sudah lulus, atau multi-ASIO capture tersedia. Tidak mengubah DSP, driver, VST3, .smix, tampilan /preview/, output ARM.

4. Owner action: TIDAK PERLU MELAKUKAN APA-APA untuk milestone code ini.

5. Bukti exact SHA:

6. Next G-MV: audit SOURCE queue fairness and reconnect UI expiration; consolidate duplicated retained-graph transient cleanup with one pure ViewModel decision while preserving valid .smix, single native PCM graph and first-sound M4 promotion. Do not refactor N-MOD native scope or duplicate routing transport.

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