Skip to content

Fix cold WIRE admission and native VST3 picker/editor with prepared graph PDC - #418

Merged
masarray merged 234 commits into
mainfrom
integration/daw-direct-hardware-input-20261105
Nov 7, 2026
Merged

masarray merged 234 commits into
mainfrom
integration/daw-direct-hardware-input-20261105

Conversation

@masarray

@masarray masarray commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

2026-11-07 architecture checkpoint — mixer state must survive Audio I/O and restart

Source audit: beginManualAudioSetup() disables the native RoutingLab, finishManualAudioSetup() recreates an unpatched 10CH/4AUX graph; opening the native JUCE Audio Setup path also triggers that reset. This is why the mixer contents disappear, independent of UI. Existing P4 NativeShowV2 does not serialize the full modern ChannelId+GROUP/FX_RETURN+WIRE document, so wiring a naive autosave to it would silently lose work.

Accepted design (not yet implemented): Device-independent Mixer Session & crash-safe resume ADR: separate durable stable-ID mixer document from ephemeral JUCE device binding, keep existing FX/WIRE state over device change, verified port remap with explicit output disarm, atomic native graph rebind, autosave of accepted revisions with last-known-good transaction journal, named snapshots and safe startup recovery, plugin-state capture thread gates and complete dynamical graph schema. No automatic output arming. Milestones P1–P4 still pending.

Release blocker P0: Windows FAT 42318730495 compiled successfully and 58/58 CTest passed, but ZIP packaging failed on a byte mismatch for assets/favicon.ico because the packager/independent final verifier called PATH Python rather than CMake's selected Python (available in approved-gui-python.txt). Commit d171b245 uses one verified resolver in both scripts, leaving SHA and fail-closed gates intact; fast UI/native PASS. Exact-SHA FAT requalification requested. The latest approved icon source is wired into CMake/JUCE/WebView, but actual distributable EXE/ZIP icon is not certified until FAT + independent PE/icon check.


2026-11-07 reconciled ASIO4ALL field fix — latest qualification

Field evidence: WASAPI works physically. After ASIO4ALL WDM configuration switched to VB-Cable capture + Realtek playback, ArSonMix showed Current device is not open; refresh. This is a real closed-device APPLY lifecycle defect, not evidence that ASIO4ALL can synchronize independent hardware clocks.

  • Commit 4f7f3cb4 restores explicit same-ASIO-device APPLY recovery, forces ASIO4ALL device re-instantiation on operator APPLY, rejects changed physical pin names until independently reselected, and leaves MAIN MUTED. The ordinary working WASAPI device-apply path is not forced to reopen.
  • Commit d4db6e7c merges the latest main icon/Pages/CSS V28 work without discarding native WIRE, VST3, EQ and FX changes. ASIO and packaging changes remain on the same integrated branch.
  • Tests 28871d96 (deferred SVG graph paint) and 9de9756c (strict new favicon byte parity) update obsolete test timing and asset inventory assumptions, not the application audio or GUI.
  • Packaging c73ffb6e binds native /preview/ GUI verification to CMake's exact selected Windows Python interpreter; byte-for-byte gate remains enforced and now reports differing file hashes.
  • Current software HEAD: 9de9756c8303a081918bc9fd23195186e1e68128. Full Chromium and exact-application Windows FAT validation are being qualified separately; no claim of physical ASIO4ALL acceptance.

Hardware revalidation: ASIO4ALL WDM VB-Cable capture + Realtek playback; verify actual ASIO input/output channel names and masks after Apply; manually remap and arm safe output; report device rate/buffer and Copy Audio Report. No automatic unmute/unknown output failover. Independent device clock drift and hardware crackle (#15) remain unqualified.


Original P2 handoff (historical candidate, superseded below)

The approved Windows mixer now routes its first WIRE and original-channel VST3 picker through the actual PCM owner. This candidate continues the existing channel-to-channel/source-only/live-send-gain work; it preserves the approved /preview/ skin and one JUCE callback. Draft hardware-test candidate, not a stable release.

User failures and repairs

  • First WIRE before SOURCE admission finished was rejected instead of retained. One explicit CONNECT/ROUTE_ONLY is now held until independently accepted native identities are ready. No OUT-dropdown priming, automatic output arm or optimistic cable. A new CONNECT rejected solely for stale native revision can rebase once after a genuinely newer snapshot; changed device/endpoint identities, retarget/remove and feedback rejection never retry.
  • Original CH1–10 picker used M4 until an unrelated structural flag became true, even though ChannelId already owned PCM. Insertion now follows native authority for INPUT/GROUP/FX_RETURN/MAIN. The occupied external CH1 ownership guard remains.
  • Legacy compatibility insertion reused the old source template revision. It stamps validated current tokens; stale APPLY fails before vendor preparation. Native admission also now uses the routing epoch consistently, rather than an unrelated device-start counter.
  • The editor button queried M4's instance array. It now acquires the actual ChannelId/revision/slot/opaque-token lease in the existing JUCE editor window.
  • Catalog refresh could erase a native rack using inactive M4 FX readback. The compatibility painter can no longer overwrite active native authority.
  • Native VST3 admission previously rejected every nonzero-latency plugin. Prepared DAG compensation now aligns internal fan-in, receiver hardware capture and MAIN/MONITOR; wet, individual bypass and rack bypass retain the same declared latency. Delay storage is CONTROL-prepared and budgeted; rendering has no heap/lock/extra callback.

The screenshots positively identify stale publication and blanket-latency rejection. They do not contain the first-WIRE toast; cold readiness and revision-race scenarios are therefore explicit regressions, not a claim that every possible user-rig error was observed here.

Candidate and validation

  • Exact candidate HEAD: 2b1ef483ae53626babe9a29b574ad4f41edf371b.
  • Observed main: ac85039a6e1dc2dce13394b9b290531e1e46b647; main/stable not promoted.
  • Exact-HEAD fast native/UI GitHub checks: PASS. Local Windows-workflow JavaScript contracts: 285/285 PASS.
  • Native approved bundle provenance: 3/3 PASS. Existing actual decoder/channel-to-channel/source-only PCM, accepted session and projection regressions: PASS locally.
  • New portable PDC regression: actual impulses through serial/parallel PRE/POST paths, receiver hardware fan-in, MAIN/MONITOR, variable block sizes, zero render allocations and budget-failure rollback: PASS locally.
  • Real JUCE FX regression adds actual sample-delay processor, wet/individual/rack bypass alignment and latency-change fallback. Header/syntax preflight PASS; full Windows runtime result below is authoritative.
  • Full Chromium/Firefox GUI qualification: exact-HEAD run, PASS. New compiled native DOM test covers G0 first mouse drag without OUT, one verified stale rebase, original-channel picker with structural=false/unrelated M4 revision, catalog refresh and editor identity at 1366x768, 1680x900 and 1920x1080. Its backend is emulated for UI isolation; PCM evidence is separate.
  • Windows MSVC/CTest and independently audited ZIP: exact-HEAD run, PASS: 57/57 CTest, including native latency-aligned fan-in/hardware PCM and real JUCE FX bypass timing; packaging and independent artifact audit PASS.
  • Physical ASIO/WASAPI interface, vendor VST3 listening, device reopen and long-session crackle/latency soak: PENDING.

Download exact-HEAD Windows FAT ZIP. Candidate source: 2b1ef483ae53626babe9a29b574ad4f41edf371b. The earlier 16fe8c42 ZIP does not contain these fixes.

Downloaded independently and verified: ZIP CRC PASS, actual AMD64 PE executable, embedded source commit and executable hash all match.

  • ZIP: 5012176 bytes; SHA-256 707b49372cd6865ca6422d1b68e71ef0193956a2eecaf7649914071d86d07483.
  • GUI executable: 10973184 bytes; SHA-256 3495b45c4541a2197df8f12cf744c32fc78e79715cd13b933e608a05b14d71a6.
  • GitHub artifact retention through 2026-11-20. This is not physical-ASIO qualification or a stable release.

Limits and ownership

Delay is bounded by the graph scratch budget and 131072 samples per path. Plugin delay changing after preparation falls back to latency-aligned dry, exposes latencyChanged, and requires reload; automatic live latency reconfiguration is not claimed. Legacy external CH1 retains its existing restrictions. This does not merge the separately blocked #423 EQ prototype, introduce another DSP renderer, bypass ownership checks or equate software tests with physical FAT.

Detailed audit and regression map · live send gain · channel/source-only PCM recovery.

Focused physical FAT

  1. Fresh launch; select verified input/output and CH03 IN stereo 1+2. Drag CH03 OUT -> CH04 IN immediately, before touching any OUT dropdown. Repeat after device reopen; accepted wire and CH04 meter must follow without a priming operation.
  2. On an original channel, Add FX -> choose the same ArSonEQ/other VST3 that previously failed. The picker must add one real rack row; click that name to open its actual vendor editor. Repeat after scan/catalog refresh and after the first WIRE. Existing source, fader and monitor authorization must remain intact.
  3. Compare direct/parallel receiver paths with a fixed-latency plugin, then individual/rack bypass. Verify aligned timing, real processing, no duplicate dry path, source-only metering and reconnect. Software tests do not replace this listening/measurement step.

On failure, capture More -> Copy Audio Report with exact ZIP/source SHA and the exact toast. Keep the PR draft/open and main/stable untouched until physical FAT acceptance.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-07T13:41:58.905232Z 28b1adb 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0eb2d7123

ℹ️ 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".

Comment thread web/approved-native-bridge.js Outdated
Comment on lines +226 to +228
if(typeof window.__arMixOpenAudioIO==="function")
window.__arMixOpenAudioIO("device");
else status("AUDIO I/O is unavailable; use the main Audio I/O control.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore a reachable device setup in the approved native GUI

In the Windows native build, clicking More → Audio Setup now always takes the unavailable fallback instead of opening device settings. Repository-wide search finds the __arMixOpenAudioIO implementation in web/mixer-io.js, but CMakeLists.txt and scripts/build_approved_native_gui.py bundle the approved Pages GUI plus its native bridge/contract, not that legacy controller. Consequently, this removes the working audioSetup native action without installing its replacement, preventing users from selecting or changing their ASIO/WASAPI device through this control. Keep the native action reachable until a device pane is actually wired into the approved bundle; AGENTS.md explicitly requires preserving device selection.

AGENTS.md reference: AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

@masarray
masarray force-pushed the integration/daw-direct-hardware-input-20261105 branch from c900930 to 886ea57 Compare November 5, 2026 08:02
…d supported rate/buffer inside custom native setup
… instead of overwriting with stale active status
…y safety and lost-ACK recovery

Keep one /preview/ UI and existing per-channel hardware IN route. Show actual virtual playback endpoint, hide legacy Patch/Arm behind unified UX, retain explicit advanced JUCE recovery. Correlate output mute request IDs and recover missing input ACK without touching RT DSP. Add contract gate.

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Product-integration audit for #412 (2026-11-05): #420 was closed as redundant; #418 is now the single source of truth. Two important native regression cases to verify before merge (not assumptions of PASS):

  1. integration/ApprovedNativeRuntimeSnapshot.h projects 10 M4 source rows only when ALL rows are NONE/MONO/STEREO. The production LiveDryRoutingLab also supports BUS sources. Once one strip becomes a BUS, the whole legacyM4.channels array clears, and refreshRealM4Inputs paints the input roster as None even on other physically patched channels. Preserve verified BUS as a read-only Internal BUS selector value instead of dropping all other input readback. Validate GUI CH01/CH05 with an existing BUS channel.
  2. Verify structural source change NONE→MONO, MONO→STEREO, and MONO→NONE while MAIN monitoring is active. Current per-strip consumeField always emits routingSourceSwitch directly without an explicit operator-visible wizard; same-format pin changes are atomic, but structural publishRevisedTopology recompiles the graph. It must safely transition without unintended physical output, stale ACK, dropouts or requiring user to manually MUTE/PATCH/ARM. Add focused native regression and retain one internal safety transaction.

Please also keep commit-level Windows JUCE/CTest + real /preview/ Chromium proof as merge gates. Hardware 0FX listening test remains pending. No duplicate audio implementation requested.

…review/ DAW First Sound PR

Reuse the existing native build, packaging and verification. Upload one clearly marked nonrelease candidate without opening another workflow or changing RT DSP.
…on-admitted auto-monitor

Keep the approved /preview/ one-click source routing, but do not unmute unless real ChannelId PCM control authority is admitted. Native liveOutputArmFault rejects an identifiable VB-Cable capture/output self-loop, independently of JS. Add regression contracts. No RT callback changes.
…ved mixer

Expose verified 10-strip native M4 control/PCM readback when ChannelId graph not admitted; accept bounded epoch/revision-gated fader/mute/pan/solo and master actions with correlated ACK. Add true MAIN/NONE output routing to existing M4 compile owner. Support IN=None as verified native source-clear, avoiding misleading demo-only choices. All work stays off RT callback.
…eadback

Bind stable hardware ordinals through UI reorder, render M4 controls only when changed, cache real PCM meter fills, ACK fader/mute/pan/solo and MAIN, route OUT to installed M4 native graph rather than public demo, keep explicit MONITOR button and selective first-route listen. Limit options to supported route and driver outputs. No DSP callbacks or JS audio.
… ChannelId and back

Never regenerate view IDs on native admission if the established physical input strips are already present; preserve accepted OUT readback and fail closed on duplicate/missing hardware channel IDs.
…nly when sends disconnected

Preserve fail-closed native audio routing. The prior fixture wrongly expected decode to accept a disconnected CH1 while it still sends PRE/POST PCM into two BUS channels.

masarray commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner Author

P0 First Sound integration checkpoint — exact HEAD 548a071260b36bcac4bfa291d94709fc956bb596

This is P0-only in #418; P1 #422 stays DRAFT/PAUSED. The canonical user GUI is /preview/, embedded through the approved native bundle. No second mixer/DSP callback or manual START/PATCH/ARM wizard is introduced.

Causal fixes pushed

  • ff3efb2: preserve all ten authoritative M4 physical source readbacks when a different channel carries a real internal BUS source (read-only label, never a fabricated hardware pin).
  • c1a5071: direct NONE ↔ MONO ↔ STEREO and channel OUT structural edits now use one guarded control-thread transition: internal physical-monitor mute, native topology commit, ChannelId readmission, and safe monitor resume only for the same verified device/route. Same-format physical pin moves retain the existing live 64-sample atomic path. Active STREAM forbids structural edits (fail closed). Rejected M4 publisher publication restores the previous admitted ChannelId PCM authority; rejected native source mirrors now return a real error instead of false success.
  • 548a071: on structural edit of an admitted ChannelId renderer, migrate the accepted roster's actual live fader, pan, mute and solo for all ten source channels into the newly prepared M4 graph. Otherwise a prior native gesture could silently revert to stale fallback control values. Clear the native-control-dirty fallback embargo only after the new M4 graph is successfully accepted; preserve it on rejected publication. Added compiled policy assertions in the existing native dry-route test.

Qualification — keep evidence separate

Exact-head CI: https://github.com/masarray/arsonmix/actions/runs/42022960907 (COMPLETED / SUCCESS, including Windows x64 native build, CTest, approved /preview/ Chromium, production GUI ZIP and independent package validator). Exact-run Windows FAT candidate uploaded: artifact 13412927544, ArSonMix-P0-DAW-First-Sound-UNQUALIFIED-Windows-x64, 4,921,050-byte ZIP, expires 2026-11-19. Independent ZIP CRC check passed; packaged x64 Windows GUI PE subsystem=2; embedded EXE SHA-256 matches manifest (c47103d94a91d199569b154156fadbc3d827260ab7401cef02d9aa576da62d1c). The BUILD_PROVENANCE.json.sourceCommit is 867413c, GitHub Actions' synthetic test-merge commit with parents main@591444d342492120b5e848d9a0dbea0d33f15efc and this PR HEAD 548a071260b36bcac4bfa291d94709fc956bb596. It is NOT a mismatch or an independent unrelated build; do not compare the synthetic merge SHA literally to the PR head SHA.

Not yet physically verified: ASIO first sound on real capture/output interface, every CH01–CH10 patch, MONO ↔ STEREO while MAIN on, unchanged live controls after topology swap, sparse pins, hotplug fail-closed, monitor/PANIC MUTE, 44.1/48 kHz 0FX 30-minute soak and measured audible latency. Do not mark #412 complete or merge/promote stable without field evidence. CI passing alone is not a physical First Sound PASS.

…VST3 insertion

Expose verified PCM faders on original ten channels while ChannelId owns the same JUCE callback; reject dynamic BUS structural conflicts. Add catalog-keyed native insert transaction to existing M4 prepared graph with safe mute, rollback and true fxInstances readback. No DSP processor in JS, no alternate audio engine or callback.
…rve focus and picker

Expose the approved /preview/ FX picker, direct fader visuals and native catalog through its existing lexical model. Stop whole-mixer redraw on native 12 Hz scalar readback, preserve active hardware selectors and pointer capture, throttle native realtime fader control events. Structural graph updates still replace the accepted projection only when identities/FX topology actually change.
…l native FX picker/catalog

Every original-10/master physical control streams to one JUCE native parameter path while dragging, but final change flushes exact value. Queue independent channel source choices instead of rejecting every selector during a pending ACK. Close AUDIO I/O only after verified active device ACK and show compact toast. Wire approved Plugin Manager/F8/FX picker to real JUCE catalog, native scan/chooser and independently acknowledged routed FX insertion.

masarray commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui aa3709a

masarray commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 9efa9a2

masarray commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 93b85fc

@masarray
masarray marked this pull request as ready for review November 7, 2026 13:40
@masarray
masarray merged commit 857b362 into main Nov 7, 2026
7 checks passed

masarray commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Reconciled milestone — 7 Nov 2026 (post-merge, authoritative)

This supersedes earlier Draft/checkpoint notes in this PR description. Verified against the live repository, Actions and public Pages after merge:

This comment is the cross-thread status anchor. No code changes or new engines were introduced by this reconciliation.

This was referenced Nov 7, 2026
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