Repository navigation
M2 — authoritative native v6 snapshot/intent/ACK seam for the single approved /preview/ mixer - #394
Conversation
…itted ChannelId graph; reject unsupported intents
…e transport into one console window
…dge in approved Pages asset bundle
…sical edits before demo mutation
…hot projection and truthful G0 device status
…me revision, live capability gate
…ed approved GUI bridge
…ed approved GUI bridge
…s without creating workflows
…t Windows+UI workflows
…l module that emits them
…nly hook belongs in bundle stage
…in exact approved public checkpoint
…only control hooks
…only control hooks
…eadback before LIVE admission
…rols, disable G0 physical gestures
…CK effect before GUI commit
… from product LIVE
… separate product FAT from graph
…sets on Windows CI
…erify accepted route readback
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 896aa6f1a8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!native?.admitted || !Array.isArray(native.graph.edges) || | ||
| typeof make !== "function" || typeof render !== "function" || | ||
| typeof ArSonWireGraph === "undefined") return false; |
There was a problem hiding this comment.
Expose the approved GUI state through an explicit adapter API
When an admitted native snapshot arrives, projection always fails because make and render are private to the IIFE in site/preview-v2/index.html; the separately loaded bridge cannot access them. The generated HTML only inserts event hooks and script tags, without exposing that closure. Consequently, valid snapshots produce NATIVE READBACK INVALID and acceptedGraphConnected never becomes true. The same scope problem makes findTrack, faderGesture, and displayMeterDbfs unavailable to the bridge. Expose a narrow API from inside the GUI closure, or initialize the adapter there, and test the assembled HTML with a valid native snapshot. This prevents the native-state stitching required by AGENTS.md.
AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
| document.addEventListener("click",event=>{ | ||
| const target=event.target.closest?.( | ||
| "#preview,#addTrack,#addBus,#addFx,#reset,#saveScene,#recallScene,#sceneSafe,#group,#ungroup,#copy,#paste,#clearCue,#pluginsButton,#pluginScan,#pluginImport,#pluginAddPath"); | ||
| if(!target)return; | ||
| event.preventDefault();event.stopImmediatePropagation(); |
There was a problem hiding this comment.
Apply native mutation guards to keyboard shortcuts too
In the native application, the click-only guard leaves the existing keyboard mutation paths active. The window keydown handler in site/preview-v2/index.html calls copyChannels(), pasteChannels(), and groupSelected() directly for Ctrl/Cmd+C, V, and G. Copying one strip and pasting onto another therefore changes displayed FX, gain, pan, mute, and solo without any native intent, ACK, or snapshot, even while G0 reports that edits are blocked. Guard these underlying operations or intercept their keyboard paths as well; otherwise the interface can display settings that the engine never accepted, contrary to AGENTS.md's native-state requirement.
AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
M2: actual code, not another GUI or a second DSP
Continuation of merged M1 #392 and P0 #389. Existing approved Pages
/preview/DOM/CSS/buttons retained, only five nonvisual physical-operation hooks added tosite/preview-v2/index.htmlfor native mode.Native producer (installed M4, no fabricated ChannelId)
src/ApprovedConsoleNativeTransportV6.hreads actual current JUCE device, active input/output masks and callback pin ordinals on message thread, serializes v6device.epochas canonical decimal string; advertisesproductionCallbackLive:false,callbackOwnsChannelIds:false, zero supported universal graph ops until ENGINE #266 real callback graph is installed.src/Main.cppnow handlesarMixConsoleSubscribe/arMixConsoleIntent, sends realarMixConsoleSnapshot, and explicit REJECTEDarMixConsoleAckfor every unsupported/stale operation. No ordinal-only PCM alias, no additional callback.Native JS consumer and UI binding
web/approved-native-contract.js: strict canonical uint64 IDs viaBigInt, G0/accepted snapshot schema validation, epoch/revision freshness, unique request/session ID, supportedOp gating, PENDING → matching ACK → later same graph+roster revision snapshot before projection; rejects stale/unsupported, bounds timeout, never optimistic audio claims.web/approved-native-bridge.jswires the four real event names into the existing approved GUI, prepares stable view-local IDs (never downcasts native ID), projects only authentic accepted channels/edges and sends mappedSET_FADER/SET_PAN/SET_MUTE/SET_SOLO/APPLY_WIRE_TRANSACTIONintents when advertised. Native mode blocks demo meter and unadmitted local mutation; public Pages demo unchanged.Test coverage and optimization
New pure replay suite
tests/approved_native_m2_contract.test.cjscovers >2^53 IDs, accepted readback, stale/rejected ACK, timeouts, invalid pins and no extra GUI. It runs in existing Windows + Chromium workflows; no extra workflow.Explicit stop-ship
Current main engine does not yet admit production ChannelId callback (ENGINE #266 still draft): G0 truth only. Do not mark native PCM, VST3, routing or hardware qualified from M2 transport tests. M3 engine producer must take over accepted
graph.channels/edges/supportedOps; avoid copying its parallel GUI. M4 FAT #270 / #15 remains required. Keep draft until native build/CTest and no demo regression PASS.Commit:
f82b556399a800b0923c6e22dfba3fae60d0afb7