Skip to content

M2 — approved /preview/ native v6 readback + ACK/snapshot gate (no fake LIVE) - #395

Closed
masarray wants to merge 20 commits into
mainfrom
integration/m2-approved-native-ack-snapshot-20261105
Closed

masarray wants to merge 20 commits into
mainfrom
integration/m2-approved-native-ack-snapshot-20261105

Conversation

@masarray

@masarray masarray commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

P0 issue #389 — M2 real native event transport, not a UI rebuild

This builds directly on merged M1 PR #392. NO DOM/CSS/layout rewrite, no new GUI, no JS DSP, no duplicate JUCE audio callback.

Implemented

  • Sole JUCE ConsoleWindow now listens for arMixConsoleSubscribe and arMixConsoleIntent; publishes real native driver masks/device endpoint labels/epoch/control-thread telemetry using src/ApprovedConsoleM2Snapshot.h, and explicitly REJECTS universal ChannelId intents until the installed callback admits that operation. No strip-number-to-ChannelId fabrication.
  • web/approved-native-m2-state.js is a reusable native transaction state controller: canonical decimal uint64 validation, actual driver pin verification, capability checks, unique request token, PENDING state, exact request-matched ACK + later same-epoch/revision/roster native snapshot before accepting any change, reject/epoch-change/out-of-order protection.
  • web/approved-native-bridge.js consumes actual JUCE socket events and exposes read-only state at window.__ARMIX_APPROVED_NATIVE_GUI__. In native Windows only, demo-meter and browser-only audio-mutating gestures are blocked rather than falsely indicating PCM success. Selection/navigation and the canonical Pages visuals remain unchanged.
  • scripts/build_approved_native_gui.py includes both native-only JS scripts in identical Pages-derived bundle; CMake/release SHA256/checker updated. Node tests cover large ChannelId, ACK/snapshot ordering, stale epoch, reject paths, endpoint masks, and no fake LIVE.

Limitations / stop-ship

This is M2 transport/readback + fail-closed consumer; NOT yet M2 accepted ChannelId→physical-strip presentation mapping or M3 universal WIRE/VST3 PCM. Main still runs fixed native M4 callback. Engine PR #266/#387 includes the producer work that must merge/reconcile before promoting accepted operations; this PR does not cherry-pick/reimplement that engine. productionCallbackLive=false stays truthful. Actual EXE screenshots, physical FAT crackle #15, and integrated UAT remain PENDING.

Verification

Run exact-head Windows MSVC build + CTest, Python deterministic asset tests, Node M2 controller safety tests. Keep DRAFT until CI and engine owner integration. No release/promotion from this alone.

Exact-head CI VERIFIED (2026-11-05 WIB)

Coordination #397 — workstream ownership

M2 is already integrated in main@c1a11afd; original draft remains evidence only until unique tests are reconciled. Do not merge raw.

masarray commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Milestone A reconciliation note: PR #394 was already MERGED into main at c1a11afd and owns the approved /preview/ M2 socket (web/approved-native-contract.js, web/approved-native-bridge.js, src/ApprovedConsoleNativeTransportV6.h). #395 now overlaps and is merge-dirty. Please reconcile only unique verified M2 safety improvements into current main; do NOT merge a second controller/duplicate native producer or overwrite #394. Integrator source+release gate is isolated in draft #398 and coordinates through #389. ENGINE #266 alone owns PCM cutover. No claim of LIVE until actual accepted callback.

masarray commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Coordination #397 — parked duplicate M2. The accepted M2 socket/ACK state is already on current main. This PR is preserved as a DRAFT/PARKED reference, not an independent integration owner. Compare specific tests and safety cases to main, hand off genuinely missing tests/behaviour to INTEGRATOR, and do not merge the old src/Main.cpp/CMakeLists.txt diff raw. New PR #400 already demonstrated conflict detection on this draft and passed once parked.

masarray commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

M2.5 repository reconciliation — retire duplicate native transport. The authoritative M2 native bridge/controller is already in main@c1a11afd through #394; the newer #396 fixes its approved GUI IIFE/pointer fader/Fx hook. This PR #395 adds a SECOND web/approved-native-m2-state.js controller and separate native snapshot producer, which must NOT be merged beside the installed web/approved-native-contract.js and M2 native JUCE producer.

Preserve test vectors, not implementation: #395's 11 tests (canonical uint64, real endpoint pins, G0 reject, intent serialization, ACK→later snapshot, out-of-order, stale/REJECTED, device epoch reset, unknown physical source, timeout and one WebView owner) remain inspectable in tests/approved_native_m2_contract_test.cjs at exact head 28862dd4a79d8772bb34b73fd151853b94edb88c. Main #394 and #396 cover many but verify the following before declaring full parity: epoch change while pending, source outside enabled endpoint mask, foreign/out-of-order ACK. Port missing vectors into the ONE current controller test, not the obsolete implementation. Closing this duplicate PR reduces production state owners; no code is discarded from git history. Handoff #397 / #400.

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