Skip to content

P4 stage 4: browse and recall native DRY Shows with current-device ACK + muted graph publication - #141

Closed
masarray wants to merge 2 commits into
mainfrom
feature/p4-native-dry-show-recall-20261029
Closed

masarray wants to merge 2 commits into
mainfrom
feature/p4-native-dry-show-recall-20261029

Conversation

@masarray

Copy link
Copy Markdown
Owner

Native browse + real DRY Show recall — follows #137, #138 and #139

This is an actual user-directed native BROWSE SHOWS / RECALL SELECTED DRY vertical slice. It reads the portable Studio/Shows via an owned IO worker, verifies the entire current generation and stored binary hashes with existing NativeShowStore::load, and prepares a fresh native Routing LAB transaction for the current device. No WebView localStorage scenes or fabricated VST3 state.

  • Bounded directory metadata listing (max 256 scanned, 64 shown), sorted by modified time; source file paths never sent to the browser.
  • Worker captures expected current epoch/revision before I/O and checks them again when the saved snapshot is delivered.
  • NativeDryShowRecall::prepare is no-side-effect / fail-closed: validate current MUTE/DIRECT mode, active acknowledged 10CH/4AUX route, valid sparse physical ports, master support and zero VST3 in both stored and active session. Converts valid Show V3 to exact native command (CH MONO/STEREO/NONE/BUS, hard zero fader, PAN/MUTE/SOLO, CH/AUX PRE/POST sends, 4 returns).
  • Native LiveAudioEngine::applyDryRoutingLab owns the only graph publication and CAS. On failure old graph remains. On success apply exact master linear/mute/mono on control thread; hardware output remains MUTED, no auto hardware activation or unmute.
  • Prevent UNMUTE while Show worker or USB backup IO is running; STOP/hotplug during read fails closed; GUI shows explicit ACK and rehydrates from accepted native route.
  • Native CTest extends existing test binary to validate direct on-disk captured Show -> recall preflight and reject missing ports, unmuted output, stale route, plugin FX and unsupported master, with output untouched on failure. No new redundant CI test target.
  • No change to processBlock, RT publisher, existing FX rack, Orbit or main GUI CSS. Review docs/P4_NATIVE_DRY_SHOW_RECALL_STAGE4_20261029.md for safety and remaining hardware FAT.

Exact base main: 446eb534795a1b7ce01939971646f7ec9e2e8fc0. Exact PR head: ffde7900707804c8f7fe8b431cef2d6afcc6beae.

Boundaries: DRY-only, no vendor VST3 capture/restore, no cross-PC physical device identity claim, no auto-unmute, #15 zero-FX physical crackle still open. This is a native LAB recall milestone, not production-scene certification.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T01:07:38.419737Z ffde790 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.

@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: ffde790070

ℹ️ 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 src/Main.cpp
safe->engine_.setMasterGainLinear(
static_cast<float>(result.loaded.masterGain));
safe->engine_.setMasterMuted(result.loaded.masterMute);
safe->engine_.setMasterMono(result.loaded.masterMono);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject mono Shows until the LAB render path supports master mono

When a saved Show has masterMono=true, recall succeeds and calls this setter, but the active Routing LAB never reads masterMono_: LiveAudioEngine returns from its LAB branch before the legacy mono processing, and LiveDryRoutingLab::process accepts only master gain and mute. Consequently, unmuting a recalled mono Show still produces stereo output. Either implement master mono in the LAB render path or reject these snapshots during preflight instead of acknowledging an incomplete recall.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1267acc68214: Routing LAB now passes native masterMono_ into its RT render path and runs a fixed 64-sample, allocation-free mono blend, primed to exact L/R mono while hardware output is MUTED. Existing prepared-mixer native CTest now exercises muted priming, live stereo↔mono transition, bit-identical full-mono output and zero allocations. Exact-head Windows CI pending; no approval/merge claim until it passes.

Comment thread web/monitor.js
document.getElementById("arRouteFeedback").textContent=ack?.ok
? "NATIVE SHOW RECALL ACK · verified routing published · OUTPUT STAYS MUTED"
: "RECALL REJECTED · "+String(ack?.error||"Unknown native error");
if(ack?.ok){hydrateAcceptedRoute();drawRoutes();}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Synchronize the master controls after successful Show recall

When the recalled Show changes master gain or mute, this success handler refreshes only the routing editor, leaving the main MASTER fader and MUTE button at their previous values. Periodic status does not repair them: web/bridge.js::syncNativeMixerControls returns after synchronizing channels whenever the LAB is active and ready, skipping its master synchronization code. Since recall requires that exact LAB state, the displayed master controls remain inconsistent with the newly applied audio settings, and subsequent clicks operate on stale toggle state. Synchronize the recalled master values through the native adapter as well.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1267acc68214: factored native SSOT syncNativeMasterControls() and invoke it for both the 10CH Routing LAB and legacy CH1 paths, so the early LAB return cannot skip master fader, MUTE or MONO. Chromium UI smoke now simulates an active Lab status changing all three MASTER controls and asserts the actual DOM matches. Exact-head Chromium CI is green.

Copy link
Copy Markdown
Owner Author

HOLD FOR PRODUCTION ROUTING RECONCILIATION (#143; explicit product-owner direction, 2026-10-29)

Latest main is 81c892f39996689c63b5704dcc060a9c42f0339d after merged GUI splash #140 and measured native master LUFS/dBTP #142. This PR head 1267acc682146c01d091defc10e1933845ae17af passed its old-base CI (Windows #40799637002; Chromium #40799637034), but diverged 2 behind main and still wires operator-facing Routing LAB BROWSE/RECALL/STOP controls. Do NOT merge as-is based solely on mergeable=true.

The owner has rejected LAB as a product mode; #143 makes one always-live unified 10CH+4AUX+MASTER native routing engine and Waves-LV1-inspired patch grid the canonical direction. Preserve/reuse valuable PR #141 internals: SHA-verified off-RT Show listing/readback, fail-closed epoch/physical port preflight, exact master gain/mono, SSOT master GUI sync, tests. But integrate into single production routing/Shows workflow only after re-diffing newest Main.cpp, LiveAudioEngine.h, web/bridge.js, web/monitor.js, CMake/tests against merged #140/#142. Delete the need for operator START/STOP LAB, do not rename the old dual-mode engine and call it done. No claims of full vendor VST3/Orbit scene recall. #15 real hardware crackle remains open.

Product contract and ordered implementation/acceptance gates: #143.

Copy link
Copy Markdown
Owner Author

2026-10-29 modern P4 Stage-4 selective port is staged as real 12-file GitHub commit 3902e0d764106337f4185f953f3094d0f597d60c on branch feat/p4-native-dry-show-browse-recall-modern-20261029. It retains current main R2 10×4 AUX matrix, shared picker, B2 FX ownership and B3 fail-silent logic; it adds true SHA-verified worker BROWSE + current-epoch/revision DRY-only RECALL, native mono master, CTest/Chromium. Source-integration checks and WebView JS parse PASS, Windows/Chromium CI has not been run for this branch. The old PR #141 should NOT be merged wholesale (stale 446eb5 base). Do not mark new feature delivered until rebased on final #160 always-on production session, exact-head CI succeeds and a fresh focused PR is merged. VST-equipped Shows and physical FAT #15 still unqualified.

Copy link
Copy Markdown
Owner Author

Superseded by merged modern P4 #163 (source main 5667eec), integrated on top of merged R0B B3 #160 and R2 AUX matrix #159; same-head Windows MSVC/CTest/package 40905958127 and Chromium 40905958087 SUCCESS. Do NOT merge this old branch: it predates B3, carries an obsolete LAB and would overwrite newer GUI/routing. Full VST-equipped Show recall still separate; physical FAT #15 still OPEN.

@masarray masarray closed this Oct 29, 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