Skip to content

P1B: independent mono/stereo channel formats + sparse physical-port mapping (P1A stack) - #110

Closed
masarray wants to merge 8 commits into
feature/p1-static-multichannel-routing-core-20261028from
feature/p1b-mono-stereo-port-contract-20261028
Closed

masarray wants to merge 8 commits into
feature/p1-static-multichannel-routing-core-20261028from
feature/p1b-mono-stereo-port-contract-20261028

Conversation

@masarray

Copy link
Copy Markdown
Owner

P1B milestone — real code, stacked on verified P1A PR #108

Implements the owner's approved independent mono/stereo strip format without confusing source width, channel processing format, and physical callback index. Extends the already-built P1A MixerRoutingPlan by composition, not a competing audio engine.

Scope

  • engine/core/ChannelRoutingContract.h: compile-only format modes followSource/mono/stereo, sparse physical-port-to-callback mapping, nonadjacent stereo L/R, stereo→mono fold and mono→stereo dual-mono calibrated center. All-or-nothing validation. No audio callback lifecycle changes.
  • tests/channel_routing_contract_test.cpp: physical ports 5/2/7 in custom callback order, channel isolation, input fanout, mono/stereo conversions, invalid/missing/duplicate ports, NaN and transactional plan rollback.
  • Fix both P1A and P1B tests to execute assert() even with -DNDEBUG (Windows Release test gate otherwise silently skips all assertions).
  • Add pure C++ CTest to existing CMake/Windows workflow; no extra CI workflow. Documentation includes detailed GUI SOURCE / MONO-ST / patchbay layout, unsafe device-mask changes and native future gates.

Verified locally

GCC C++20 with optimization, -DNDEBUG, -Wall -Wextra -Werror, AddressSanitizer + UndefinedBehaviorSanitizer: PASS for the new P1B contract. Must still pass exact-head Windows MSVC CTest, native build, and hardware gates.

Critical integration boundaries

Not yet connected to JUCE LiveAudioEngine, hardware or WebView2. CH2–10 are still native preview-only; no live sends/true native mono FX instances yet. This code is not evidence of click-free live operation or a fix for #15 crackles. Do NOT enable GUI SOURCE/MONO/ST controls until real channel DSP, verified physical port mapping, graph epoch publication and ACK exist. Plugin stereo output after mono input is a separate bus negotiation gate. Existing P1A, Orbit, #102 FX drag, #101 CI and public/portable feature parity are unchanged.

Merge sequencing

This PR is stacked on PR #108 (feature/p1-static-multichannel-routing-core-20261028). Merge #108 first after its green exact-head CI and reconciliation with latest main, then retarget this P1B PR to the updated main and check exact-head CI. Do not merge a stacked branch into main without its parent.

Refs #109 #95 #15 #85, implementation guide.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T22:53:31.111726Z c85843d 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: c85843de69

ℹ️ 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 CMakeLists.txt
Comment on lines +53 to +55
add_executable(ARMixChannelRoutingContractTests tests/channel_routing_contract_test.cpp)
target_compile_features(ARMixChannelRoutingContractTests PRIVATE cxx_std_20)
add_test(NAME MonoStereoSparsePhysicalPortRouting COMMAND ARMixChannelRoutingContractTests)

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 Build the new test target in the Windows workflow

On a clean Windows CI run, this registers a test whose executable is never built: .github/workflows/p1-windows.yml:66 explicitly enumerates build targets but omits ARMixChannelRoutingContractTests, then line 68 runs the full CTest suite. The local cmake --build usage confirms that --target means “Build instead of default targets.” Consequently, CTest cannot find the new executable, failing the required Windows gate and preventing the subsequent artifact-packaging step. Add the new target to the workflow's build list.

AGENTS.md reference: AGENTS.md:L26-L26

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

P1B dependency and acceptance sync · 2026-10-28. Main is c0d7c79 (FX bypass de-click #107 and meter #106 merged). This PR targets P1A head 465f5f78..., not main. Maintain its parent/child layering: #108 needs reconciliation and merge first; then retarget/rebase #110 on fresh main while preserving its sparse physical port mapping, mono/stereo conversions, and Release-safe tests. Existing CMake/Windows workflow must KEEP de-click test ARMixFxBypassEnvelopeTests introduced by #107 and must not duplicate the release artifact pipeline. This is still a standalone routing contract — no CH2–10 real FX, device/hardware activation, or GUI SOURCE controls until callback ownership and physical FAT gates are satisfied. #111 depends on this PR.

Copy link
Copy Markdown
Owner Author

P1B independent mono/stereo format and sparse physical port-mapping source/tests were already integrated into main by P1D merge d30cf35dc74991286547765ec9927e356273785b. Original stacked parent #108 and #110 must not be separately merged: newer main has full P1D offline block executor, four native CTests, de-click/Orbit and lean CI. This original review's missing Windows native build target is resolved in latest main's workflow. Additional corrected raw pre-fader API and tests are in PR #118. Closing as superseded, preserving branch history.

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