Skip to content

refactor(mv3): one canonical native PCM/M4/offline read-model selector - #777

Merged
masarray merged 6 commits into
mainfrom
refactor/mv3-authoritative-native-readmodel-20261118
Nov 18, 2026
Merged

masarray merged 6 commits into
mainfrom
refactor/mv3-authoritative-native-readmodel-20261118

Conversation

@masarray

Copy link
Copy Markdown
Owner

MV-3: canonical schema-v6 native read-model selection (implementation)

Outcome / HASIL: There is now one pure selectNativeReadModel(next,verifiedM4) selector in the existing web/approved-native-contract.js, consuming the already normalized arMixConsoleSnapshot (schema v6). It selects exactly one of CHANNEL_ID, M4, LOGICAL_ONLY, NEEDS_REMAP, STALE, UNADMITTED or INVALID; preserves canonical uint64-string ChannelId/EdgeId identity, physical output authority and native session epoch. An offline .smix may be displayed only when PCM, M4, physical output and stale revisions cannot overrule it. Offline view explicitly has admitted:false, productLive:false and no telemetry. An installed CHANNEL_ID view is EXACTLY the reconciled native snapshot, not a clone or JS-owned session. A retained graph wins over stale offline metadata but never rearms hardware.

Old responsibility removed: web/approved-native-bridge.js no longer duplicates the 20+ predicates for logical availability, virtual snapshot construction, stale session selection, M4/native authority, or ChannelId admission. It consumes the single selector; existing control dispatch, ACK/readback, pending rollbacks, DOM/layout, UI gesture and one PCM renderer are unchanged. No new transport, store, event bus, status cache, native manager, DSP/FX logic or parallel render authority.

Deterministic tests: tests/milestone_a_single_authority.test.cjs now checks the moved real authority boundary plus independent regression scenarios using the actual schema-v6 normalizer: installed/live and exact uint64 IDs, unadmitted fake CHANNEL_ID, epoch mismatch, invalid snapshot reference, correctly sandboxed editable/read-only offline .smix, revision and physical output rejection, M4 precedence, retained device-loss replay safety and explicit source-path removal. Existing ACK/readback, WIRE/SOF/FX/Gain, negative stale request and native assembled Chromium tests are retained.

Conflicts: PR #776 independently owns FX Rack M4 roster/bypass and touches different regions of bridge/test. This PR does not copy or merge #776. Native IO-1 PR #771 untouched.

STATUS: KODE DIBUAT, DRAFT — NOT MERGED; complete fast native/UI and required gate on exact HEAD, then one Full Chromium native-assembled GUI on final SHA; verify main reconciliation. No C++/graph changes, so no required Windows MSVC/CTest and no hardware FAT. Do not invent physical audio claims.

AMAN DIPAKAI? Existing merged main remains untouched until green CI and merge; no new Windows installer has been built. TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

LANGKAH BERIKUTNYA: solve exact CI failures without weakening tests; reconcile #776 if it merges before this PR, and deliver one merged slice after exact-SHA GUI proof.

@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: 1e1162c
Status: ✅  Deploy successful!
Preview URL: https://5d406df9.arsonmix.pages.dev
Branch Preview URL: https://refactor-mv3-authoritative-n.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui aca543c

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 1e1162c

Copy link
Copy Markdown
Owner Author

Owner checkpoint — MV-3 canonical native read-model (2026-11-18)

HASIL: Merged the independent FX Rack PR #776 from main@f920c5dfe807a27c26b87d386086774458b5f494 into this branch without force-push or overwriting its new fxRackVM.m4Presentation/m4RackSettlement/nativePowerSettlement paths. The MV-3 branch is a normal 2-parent merge reconciliation. Compared with latest main only four MV-3 files differ: web/approved-native-contract.js, web/approved-native-bridge.js, tests/milestone_a_single_authority.test.cjs, tests/approved_native_m2_contract.test.cjs.

The actual feature is one pure schema-v6 readback authority selector, no UI state store: LOGICAL_ONLY (offline .smix, never physically LIVE), M4 (only verified), CHANNEL_ID (only admitted), NEEDS_REMAP (retained silent hardware), STALE / UNADMITTED / INVALID. Bridge's duplicated offline/native authority rules were deleted, native transport and PCM/VST3 graph left untouched. Negative deterministic regression checks cover stale device epoch, mismatched revision, output permission, wrong 64-bit string identity, M4 priority, retained device-loss and ACK-free readback.

STATUS: KODE DIBUAT + KODE DIUJI FAST, OPEN DRAFT / NOT MERGED. Exact reconciled PR HEAD 1e1162c5f653946d7520ef0d0961a612720b98ad. Fast UI #44234572716 PASS including 247/247 relevant Node UI contract tests; Fast Native #44234572689 PASS. Full native-assembled Chromium #44235017840 IN PROGRESS, not PASS at checkpoint. Required Merge Gate quick status SUCCESS for current draft head; Ready-for-Review gate must be rechecked.

AMAN DIPAKAI? Existing merged main stays unchanged. This branch is BELUM a newly installed Windows release, physical multi-vendor ASIO or hardware FAT. No GUI visual, .smix format, DSP/VST3, audio driver, native C++ or output rearm changes.

TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

LANGKAH BERIKUTNYA: only mark Ready and merge after exact-SHA full Chromium PASS, required gate SUCCESS and fresh main/PR reconciliation. Keep independent native IO-1 PR #771 untouched.

@masarray
masarray marked this pull request as ready for review November 18, 2026 04:14
@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-18T04:15:40.253915Z 1e1162c 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.

@masarray
masarray merged commit 3307c4b into main Nov 18, 2026
42 checks passed

Copy link
Copy Markdown
Owner Author

OWNER DELIVERY — MV-3 Modular MVVM: satu native read-model authority • 18 Nov 2026

HASIL: Existing single arMixConsoleSnapshot / schema-v6 native reconciler now exposes one pure selectNativeReadModel() in web/approved-native-contract.js, choosing installed CHANNEL_ID, independently verified M4, safely editable LOGICAL_ONLY .smix (never physically LIVE), retained/silent NEEDS_REMAP, or fail-closed STALE/UNADMITTED/INVALID. Native approved-native-bridge.js no longer repeats offline/ChannelId/M4 authority classification. This is one projection of the same native accepted graph, not a new JS store; installed views return the original normalized snapshot, zero extra graph/DSP/VST3 render owners, exact decimal-string 64-bit ids and no unexpected output arm. Source GUI geometry and input/WIRE/FX controls are unchanged.

STATUS: MERGED MAIN. PR #777 squash commit 3307c4bbb141f2a045ae42a83d7f3b6cd477657a, verified live main HEAD. Final feature HEAD 1e1162c5f653946d7520ef0d0961a612720b98ad integrated independently merged FX Rack #776 from main@f920c5dfe807a27c26b87d386086774458b5f494 via non-force merge commit, preserving all fxRackVM.m4Presentation/m4RackSettlement/nativePowerSettlement source. GitHub main diff before merge: only four files (contract, bridge, two tests).

AMAN DIPAKAI? YA for the merged, fully-tested source-level GUI/readback refactor. BELUM an installed/released Windows binary or tested physical 2-vendor ASIO setup; no new installer, Windows MSVC/CTest, or hardware FAT performed, because there were no C++/PCM changes.

TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA.

BUKTI: Final combined exact-head Fast UI #44234572716 PASS (247 relevant UI Node contract tests, 0 failed), Fast Native #44234572689 PASS, Full Chromium #44235017840 PASS 109/109 workflow steps, Ready-state Fast UI #44235896543 PASS, Fast Native #44235896545 PASS, Required Merge Gate #44235897687 SUCCESS. Initial outdated path-match contract on old head failed but was repaired to assert exactly the same real policy in moved file; test coverage was NOT removed. New tests cover wrong epoch, unadmitted LIVE, retained quiet device, offline revision/permission mismatch, M4 priority and canonical ChannelId/EdgeId. Postmerge CI on main separately running, do not claim postmerge PASS until verified.

LANGKAH BERIKUTNYA: Continue one new meaningful modularization slice (native logical/session use-case separation only where real duplicate policy remains), preserving one accepted PCM/VST3 graph and /preview/; independent multi-device IO-1 #771 and FX editor #731 remain separate and require their own evidence.

Copy link
Copy Markdown
Owner Author

Post-merge verification follow-up — main 3307c4bb (2026-11-18)

PR #777 is MERGED; exact-head PR fast UI/native and full Chromium 44235017840 passed. A separate main-push Chromium run 44236089782 has FAILED, specifically step Verify Stage C shipped CSS versus original-source computed and screenshot parity: strict PNG screenshot hashes differed at 1366×768 / default, after computed-style equality. This is not yet proven to be a product CSS regression or a harmless timing/PNG-byte flake. No visual baseline was modified, no test was disabled, and no success is claimed for this main-push UI lane. Main Windows MSVC/CTest run 44236089857 was still in progress at last check; physical ASIO FAT NOT RUN. The responsible follow-up is a controlled same-source render diagnosis (capture pixel-level diff/stabilize timing without relaxing exact visual comparison), before treating post-merge GUI qualification as fully green.

Evidence: https://github.com/masarray/arsonmix/actions/runs/44236089782 ; https://github.com/masarray/arsonmix/actions/runs/44235017840 .

Copy link
Copy Markdown
Owner Author

Post-merge quality verification (same exact commit, 2026-11-18)

Main SHA 3307c4bbb141f2a045ae42a83d7f3b6cd477657a, verified. Pre-merge feature SHA 1e1162c5f653946d7520ef0d0961a612720b98ad has identical Git tree adbe35762b3040644f2bf7bfbfdb77d001ea8f6b, proven via both Git commit tree records.

POSTMERGE UI RUN 44236089782: attempt 1 FAIL at Stage C compiled CSS vs source screenshot pixel parity, default 1366×768; computed style comparison succeeded, PNG hashes did not match. One targeted retry of only the failed Full Chromium job on same exact main SHA (no code, CSS, baseline, YAML or threshold changes) then completed SUCCESS 109/109 steps, including Stage C. This indicates a nondeterministic comparison, not a merge-time source delta; exact cause remains unproven. Permanent follow-up Issue #778 tracks root cause, failed-image diff capture and deterministic visual settle, with strict negative CSS mismatch failure preserved. The initial failure is retained in Actions history; it was not suppressed or converted to success.

Fast UI and Fast Native postmerge: PASS. Required Merge Gate postmerge: SUCCESS 44237415383. Windows MSVC/CTest 44236089857 IN PROGRESS as of last check, automatically run; C++ unchanged; do not count it as passed yet. No installer or physical ASIO FAT was delivered.

HASIL/STATUS: MV-3 remains MERGED MAIN; canonical schema-v6 read-model and merged FX Rack #776 preserved. AMAN DIPAKAI: source refactor tested; physical installation/new release not qualified. TINDAKAN ANDA: TIDAK PERLU MELAKUKAN APA-APA. Next: keep Issue #778 separate from MVVM; continue one native application/service boundary slice once the next main and concurrent work have been audited.

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