Skip to content

refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection - #799

Open
masarray wants to merge 35 commits into
mainfrom
refactor/native-mv14-player-setlist-archive-20261119
Open

masarray wants to merge 35 commits into
mainfrom
refactor/native-mv14-player-setlist-archive-20261119

Conversation

@masarray

@masarray masarray commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Milestone N-MOD-14–18: one integrated native Player control boundary

Source HEAD: 258ea2bb2da95f23597694b121f9a378106da517, main base: b30a59303ad3aed486a141c96acc42dec00d2caa. Source diff: 11 Native/test paths, zero web/GUI files touched. Consolidates real N-MOD-14/15/16/17/18 code; stacked #808 and #810 are merged into this feature branch, not directly into main.

What now has one owner

  1. PlayerSetlistArchive: v1/v2/v3 migration, safe cue ranges, file/track metadata validation.
  2. PlayerSetlistRepository: one atomic disk adapter; corrupt/blocked I/O fails without overwriting accepted bytes.
  3. PlayerSetlistEditTransaction: durable-first create/select/remove/rename and track commit. Native stops/switches deck only after accepted archive.
  4. PlayerLiveMetadataCommitPolicy: current KEY/TEMPO/Cue native accept → archive save → compensating native rollback on failure; failed rollback stops Player only. NEXT controls do not mutate CURRENT.
  5. NEW N-MOD-18: PlayerLibraryEditPlan now owns independent, testable candidates for file picker import, stale-row-protected folder reconciliation, manual relink, MOVE/REMOVE/UNDO and the 2,000-song constraint. Host only performs bounded chooser/worker and commits accepted candidates; no second PCM/deck or extra file writes.
  6. NEW N-MOD-18: PlayerStateProjection is sole read-only arsonmix.player.v1 projection for playlist, queue, cue/KEY/TEMPO, current/pending, queueRevision and canUndo. ConsoleWindow::emitPlayerState is reduced to building source inputs + dispatching one event. Invalid song/control cardinality cannot produce a false valid snapshot.

Verifiable architecture improvement

  • src/Main.cpp current 8,669 lines vs current-main 8,774 (net 105 fewer across this suite, without cosmetic reformat); more importantly, archive JSON parsing, atomic disk, metadata planning, library mutations and state projection are no longer implemented in ConsoleWindow.
  • JUCE standalone archive regression extended with real temporary files, duplicate/stale/concurrent import, file existence/extension, per-track settings preservation, move/remove/undo, manual relink errors, partial projection, wrong cardinality and actual repository write failure.
  • Source Fast Native PASS on exact combined HEAD: run 44456989878. Exact-head Windows run 44457213878 IN PROGRESS. Required Merge Gate must be success before protected squash; previous N14–16 exact source passed 103/103 at its former SHA and is NOT qualification of current HEAD. No hardware ASIO FAT or installer claim.

Progress % transparency

Epic #527 currently has M1 checked, M2–M6 not checked: 1/6 = 16.7% formal fully closed milestones. This is NOT an aggregate source-code completion percentage or directly comparable to G-MV milestone numbers. M2 Player control is materially advanced but Device/FX/Session extraction remains; M3 graph/lab retirement, M4 FX extension, M5 native adapter / GUI-related boundaries, M6 docs/fitness remain to be accepted. Do not mark M2 completed on the basis of Player alone.

Owner report: HASIL = larger real Native boundary and testable Player use cases, not more tiny planning PRs; STATUS = code committed, Fast Native PASS, Windows running, protected main merge NOT YET; AMAN DIPAKAI? production main unchanged, pending Windows/merge; TINDAKAN OWNER = TIDAK PERLU MELAKUKAN APA-APA; NEXT = review/Windows/gate, protected merge, then address Device/FX/Session + graph/host ownership in the next substantive subsystem milestone. Preserve one PCM graph, native ACK/readback, ASIO primary and approved /preview/.


Consolidated N-MOD-14/15/16 (exact integration HEAD)

  • Native archive v1/v2/v3 + Cue codec (N-MOD-14), atomic Player JSON repository (N-MOD-15), and durable-first setlist editing/import/relink (N-MOD-16) are now one 8-file native integration at 529b2986d3cf5a31b03e1d2b73f50a301d61d1de.
  • Earlier exact Windows CI #44447570622 qualified 103/103 CTests for N-MOD-14/15 at c19c34d. N-MOD-16 exact code-review 658cbc2 completed with no findings; GitHub Fast Native on combined HEAD run #44452169292 completed SUCCESS.
  • Reconciled latest main@354646bc47471050a4d777e42603774c52489b9d, behind=0, no lost G-MV contract edits, no PCM/FX callback/GUI fork. Owner-triggered one combined Windows MSVC/CTest via /arsonmix-ci native 529b2986d3cf5a31b03e1d2b73f50a301d61d1de; exact-head checks and protected Required Merge Gate must PASS before protected merge.
  • Remaining KEY/TEMPO/CUE, AutoNext/fade metadata actions are still legacy mutate-before-save and are scoped to a follow-up; do not claim all Player actions transactional. No installer, ASIO FAT, or physical audio test.

Native MV-14 — Player Setlist Archive use case (source implementation)

Operator-visible outcome

The native Player's v1/v2/v3 player-library.json migration and serialization no longer live inline inside ConsoleWindow. A pure, control-thread-only PlayerSetlistArchive owns the schema; ConsoleWindow still owns disk access, active setlist activation, and the one actual native Player/deck/PCM. No UI redesign, media copying/deletion, playback/callback/FX graph change or .smix format change.

Changes

  • src/PlayerSetlistArchive.h: pure parser/serializer and explicit PlayerSavedSet / PlayerTrackSettings data types. Maintains legacy migrations, 32-set cap, 2000-song cap, absolute supported file paths, deduplication, key/tempo/cue validation, active index, auto-next and crossfade rules. Rejects broken in-memory song/control cardinality or invalid active/fade before staging JSON instead of risking a partial/crashing write.
  • src/Main.cpp: remove duplicate archive rules; retain juce::TemporaryFile atomic write and existing player lifecycle, stop/switch behavior, and source truth.
  • tests/player_setlist_archive_test.cpp + CMakeLists.txt: real JUCE CTest for v1/v2/v3, invalid versions, relative/duplicate/unsupported paths, casefold name collision, cue fencing, v3 round-trip and invalid save rejection. Same existing native Windows target dependency, no new CI lane.
  • Original src/Main.cpp reduced by about 90 lines. This is a bounded native service with no JS/CSS GUI edits.

Parallel-thread safety / sequencing

Base exact main@0ce20b58434cb7b26caa0b45a1a7f19b12fd56ec (GUI MV-17 merged). PR #792 is the independent native hotkey workstream under test; it edits Main.cpp and CMakeLists.txt at different spans and must be merged/reconciled ahead of final MV-14 promotion. Do not overwrite PR #792, reset UI MV-17 or force-merge a stale branch.

Qualification

Source committed, not yet Windows compiled or merged. Fast native/UI contracts must pass. After #792 finishes, reconcile latest main, run exact-HEAD Windows MSVC/CTest once; no hardware ASIO FAT or installer for a control-only archive extraction. See maintainability epic #527.

Owner handoff: HASIL: independent Player setlist archive service; STATUS: KODE DIBUAT, KODE DIUJI via CI pending; AMAN DIPAKAI: existing main unchanged, new artifact BELUM; TINDAKAN USER: TIDAK PERLU APA-APA; NEXT: complete #792, integrate main, exact-SHA CTest, review and protected merge.

Current exact source validation — 2026-11-19

  • HEAD: a565269698ee2f82b3d2d8d6bb961b9c68eac566 (second commit corrects an old source-only contract that hardcoded PlayerTrackSettings to Main.cpp; it now checks its canonical service and alias).
  • Fast native source-contracts PASS on exact HEAD, catalog/authorization contracts PASS, and Codex code review COMPLETE with no findings.
  • Windows JUCE/CMake compile plus complete CTest is NOT YET RUN at exact HEAD. Required merge status PENDING, no hardware FAT / installer.
  • Native refactor(native N-MOD-13): isolate hotkey command use case #792 qualified and merged into main before this PR final reconcile; preserve its changes, rerun one exact-SHA native milestone (no redundant FAT) and only then merge if protected checks allow.

Native MV-14 hardening — exact commit 8820b49

  • Save preflight rejects names that cannot survive the v3 parser (blank, overlength, noncanonical, case-insensitive collisions), unsupported or nonabsolute/duplicate media paths, invalid key/tempo and nonfinite/out-of-range cue IN/OUT. This avoids Save→Open silently dropping or normalizing data while leaving native playback untouched.
  • Duplicate-file detection uses an ordered std::set with O(n log n) comparisons per setlist, including case-folded paths on Windows, instead of O(n²) scanning at the 2,000-song cap.
  • Real JUCE archive test covers each rejection and retains valid v1/v2/v3 round-trip. Fast native source contracts PASS on this SHA. Windows MSVC/CTest and strict required merge gate NOT YET QUALIFIED; do not merge until refactor(native N-MOD-13): isolate hotkey command use case #792 is promoted and this PR reconciled against latest main.

MV-14 follow-up regression hardening — 72b7680

  • Four Codex P2 issues now addressed in source: delete→recreate automatic name collision; JUCE-platform path equality; full 2,000-song Remove→Import→Undo overflow; 10ms-rounded cue OUT violating persisted v3 range. Resolved threads have implementation replies; the final current-head review is still being checked.
  • engine/player/PlayerCueEditPolicy.h is a JUCE-free, control-only cue planner: quantize/validate the candidate before any deck state or stored setlist mutation. ConsoleWindow only assigns cue metadata after engine_.setPlayerCueRange(...) returns success. Archive parser/serializer reuse its exact saveable cue admission. Invalid OUT at 1.059s with IN=1.00 is rejected without corrupting any unrelated Save.
  • PlayerSetlistArchive::canUndoRemove gates both the actual native undo command and canUndoRemove player state when song capacity or control cardinality fail. C++ test explicitly serializes a 2,000-song archive, removes, imports, checks undo gate and verifies 2,001 reject.
  • Exact-HEAD fast native source CI PASS. Native JUCE/MSVC and CTest are NOT yet qualified at this HEAD; no installer/hardware FAT claim. Merge Native refactor(native N-MOD-13): isolate hotkey command use case #792 first, reconcile GUI main + MV-14 source without overwriting owner changes, run exact-HEAD required checks, then protected merge.

Final reviewed cue sentinel hardening — 5c05d45

  • Fifth P2 fixed: a Mark OUT request that rounds to zero must be rejected, not converted into the OUT=0 media-end sentinel. Existing OUT remains unchanged. Only explicit Cue Clear (or Mark IN invalidating OUT) clears it.
  • Exact HEAD Fast Native/source contract PASS. Independent JUCE-free pure cue-policy C++20 compile + assertions with GCC 14 -Wall -Wextra -Werror -pedantic PASS.
  • Codex exact-HEAD 5c05d459 review COMPLETE, zero findings; prior five P2 review threads are resolved.
  • Not merged. Windows native JUCE/CTest + exact required gate remains pending; must first merge preceding MV-13 refactor(native N-MOD-13): isolate hotkey command use case #792, then reconcile and qualify this head on newest main (including GUI MV-19). No ASIO hardware FAT or installer claim.

N-MOD-14 archive read-path optimization — exact HEAD 705ccc5

N-MOD-14 integration after N-MOD-13 merge — 46ee0b4

  • Base main: c882766355b67daf4aa1b3df517cf45111847ea8 contains MERGED N-MOD-13 PR refactor(native N-MOD-13): isolate hotkey command use case #792, Windows MSVC/CTest + full Chromium + required merge gate PASS. No longer blocked on refactor(native N-MOD-13): isolate hotkey command use case #792.
  • Applied the 7 exact-matching Player hunks and 1 CMake test hunk to the current main source; manually combined include seam preserving existing NativeHotkeyCommandPlan.h. Six changed files versus base: src/Main.cpp, CMakeLists.txt, pure Player Cue/archive headers and two focused regression tests. No GUI DOM/CSS/bridge files changed.
  • New head 46ee0b4825d708fc9aee38c14a2a22cfa67085c5 Fast Native/source CI and release catalog shape check PASS. Exact-head Codex review COMPLETED — zero findings. Owner-authorized exact-SHA Windows MSVC/CTest requested with /arsonmix-ci native 46ee0b4825d708fc9aee38c14a2a22cfa67085c5. Full Chromium not required for this PR by path-scoped gate (no UI renderer or Python UI test changes). N-MOD-14 NOT MERGED, pending Windows/required gate; no hardware ASIO FAT or installer.

N-MOD-14 full CTest proof and latest G-MV convergence — 2026-11-19

  • Parent exact-head 46ee0b4825d708fc9aee38c14a2a22cfa67085c5 Windows MSVC + CTest SUCCESS run 44414100633, 103/103 native CTests passed; named test ArSonPlayerV1V2V3SetlistArchiveMigrationAndPersistence PASSED. Verified from actual Windows job logs, not inferred from source checks.
  • G-MV advanced main from c8827663 to 520d50d932b863765a56ad25b8a15c95213e7a3d: 5 web/device ViewModel, bridge and JS test files; N-MOD-14 edits only 6 Player/CMake/contract files, zero overlap. Reconciled with merge-parent d78985ebe24cad4ebd2e33cc609958361d1d12da; all 6 Player files are byte-identical to the already Windows-qualified parent. Branch compare ahead, behind=0.
  • New exact d78985e: Fast Native and release source/catalog guard PASS, Codex review COMPLETED zero findings. Required exact-SHA Windows CTest run 44426554857 IN PROGRESS (strict protected gate); NOT MERGED until new Windows run and required commit status become SUCCESS.
  • Draft downstream N-MOD-15 #802 tracks parent d78985e and modifies 4 isolated Player repository/filesystem regression paths. No PCM, ASIO driver, installer or UI redesign claim.

Latest approved N-MOD-14 integration head — 2026-11-19

  • Current code HEAD 95f40e77f4d462812663e974f728bc519f6071a3, latest main@4f720c719d64d50d55bd1e4b243b7cdf87c008a2 and behind=0. Three G-MV channel-strip ViewModel/native bridge/contract files changed on latest main, zero overlap with N-MOD-14 six Player/CMake/CTest files. Merge-parent commit preserves byte-identical native files previously Windows-qualified on d78985e.
  • Fast Native PASS and source/catalog guard PASS at this SHA. Codex exact-SHA review COMPLETED with zero findings, no request changes. Prior Windows MSVC/CTest SUCCESS (103/103) at d78985e, but current exact-head Windows run #44431134972 IN PROGRESS as last checked; protected commit gate is PENDING. No merge until the current Windows job and status succeed.
  • Downstream draft N-MOD-15 #802 reconciled atop this head, exact 475ca9b98ef94b786cdfae100837e5f9c6f31dec, Fast Native + source guard PASS and Codex zero findings; own Windows CTest not yet run.

N-MOD-14 + N-MOD-15 consolidated qualification (2026-11-19)

Important: Instead of serializing two long Windows builds while concurrent G-MV keeps advancing main, this PR now includes both independently reviewed native milestones and will be qualified by one exact-source full JUCE Windows MSVC/CTest run. Downstream draft #802 will be closed as incorporated, not merged separately, only after this PR successfully lands.

Exact combined HEAD 94672b2f901d346ee96e8d88f59dcfc60e587ad8 atop current main@2f86114a123df7054e74db7a62a52db74ca26846 (behind=0). Seven touched source/test paths only: CMakeLists.txt, engine/player/PlayerCueEditPolicy.h, src/Main.cpp, src/PlayerSetlistArchive.h, src/PlayerSetlistRepository.h, tests/native_caption_wire_geometry_contract.test.cjs, tests/player_setlist_archive_test.cpp. Source blobs are unchanged from separately code-reviewed milestones; latest G-MV ViewModel, bridge and contracts preserved intact, zero overlapping files.

  • N-MOD-14: pure v1/v2/v3 setlist archive codec; cue policy plans validation/quantization before engine ACK; deterministic set naming, canonical 2,000-track roundtrip, undo capacity check and O(n log n) path duplicate validation.
  • N-MOD-15: ConsoleWindow no longer performs Player JSON read/parse or JUCE TemporaryFile staged write. Control-only PlayerSetlistRepository owns durable load/validate/atomic Save. Isolated JUCE CTest now uses real temporary filesystem: missing/invalid/corrupt archive, accepted Save->Open, no-clobber on invalid state/I/O failure, recovery, 2,000-track persistence. No new deck, callback, audio graph, thread or PCM owner; native ACK/accepted readback and existing error messages retained.
  • Past evidence: refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection #799 predecessor 95f40e77 Windows full Native CI SUCCESS, 103/103 CTests on earlier predecessor d78985e; N-MOD-15 draft 475ca9b9 independently Fast Native PASS + Codex zero findings. Neither prior CI certifies the new combined SHA, which must pass its own Windows CTest and protected Required Merge Gate before merge.

Pending exact-head qualification: Fast Native, source guard, Codex exact-head review and one Windows MSVC/CTest for 94672b2f901d346ee96e8d88f59dcfc60e587ad8. No physical ASIO FAT or installer qualification claimed.

…m ConsoleWindow

Keep one Player deck and native disk writer. Isolate schema validation/migration/serialization in a control-only service, reject inconsistent song/control state before persistence, add JUCE CTest for legacy migration and safe round-trip.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-19T04:17:56.435946Z 258ea2b Manual request
ℹ️ 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 258ea2b
Status: ✅  Deploy successful!
Preview URL: https://be5b6a8b.arsonmix.pages.dev
Branch Preview URL: https://refactor-native-mv14-player.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

@codex review

Review exact Native MV-14 HEAD a565269698ee2f82b3d2d8d6bb961b9c68eac566 against main@0ce20b58434cb7b26caa0b45a1a7f19b12fd56ec. Verify JUCE C++ compilation, PlayerSavedSet/PlayerTrackSettings alias compatibility, v1/v2/v3 import parity and error behavior, autoNext/crossfade, cue fences, setlist and song caps, no disk deletion, atomic TemporaryFile persistence, no invalid array indexing, and that native CTest actually compiles and runs. Pay attention to differences from the inlined original codec; this is a maintainability extraction, not a migration format change. The parallel hotkey native PR #792 and GUI MV-17 must remain intact.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: a565269698

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

Preflight canonical set names, duplicate audio paths, supported media type and native cue/key/tempo ranges before staging JSON, with deterministic JUCE archive regression cases.

Copy link
Copy Markdown
Owner Author

@codex review

Please review Native MV-14 exact source HEAD 8247cf615925e1626276ad6d3d9d5cbc22983af8, especially the new fail-closed PlayerSetlistArchive::serialize guards and C++ test correctness on JUCE/MSVC. Verify that all valid setlists still round-trip and no ConsoleWindow playback/device/PCM ownership changed. The parallel Native hotkey PR #792 stays separate, and Windows CTest remains mandatory before merge.

@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: 8247cf6159

ℹ️ 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/PlayerSetlistArchive.h Resolved

Copy link
Copy Markdown
Owner Author

@codex review

Review exact current MV-14 HEAD 8820b49f2607f6bee3de88fed300ca242aa813dd after replacing quadratic setlist duplicate-path scans with an ordered canonical-path set. Verify cross-platform JUCE path semantics, Windows case-folding, deterministic Save→Open parity, all invalid-cue/name/path cases and that control-thread-only archive work never touches PCM or GUI state. Fast native source CI already passed; real MSVC/CTest remains a separate required qualification.

@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: 8820b49f26

ℹ️ 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/PlayerSetlistArchive.h Resolved
Use pure PlayerSetlistArchive naming policy to prevent native console creating duplicate setlist names that are correctly rejected by archive persistence. Cover create/delete/create and case-insensitive rename with JUCE CTest.
Use std::set<juce::File> to retain O(n log n) deduplication while matching the JUCE parser's platform-specific case comparison; add platform-dynamic case-variant Save/Open regression.

Copy link
Copy Markdown
Owner Author

@codex review

Review exact current Native MV-14 HEAD 718742d22715e21d80337f22758eb45c19c991ea including fixes for both findings: unique setlist name generation on Create/Delete/Create; O(n log n) duplicate path validation via JUCE std::set<juce::File> matching parseSongs and macOS/Windows case comparison; plus a fast source contract protecting the caller. Verify JUCE compile, archive round-trip, and user-visible persistence. No GUI MVVM, device, DSP or realtime PCM changes. Previous review suggested two P2 bugs; do not mark these fixed until verifying source.

Copy link
Copy Markdown
Owner Author

Native MV-14 exact-head handoff — 2026-11-19 (Asia/Jakarta)

Source: 718742d22715e21d80337f22758eb45c19c991ea; base main@7c142caacfe359c0c25ddfb376c780c977e9ec4d was created earlier on 0ce20b5 and must be reconciled after Native MV-13 #792 merges. Not merged / Windows unqualified.

Delivered: Separate pure PlayerSetlistArchive v1-v3 codec; ConsoleWindow retains one Player/PCM state, disk staging and transport; C++ CTest source covers v1/v2/v3, canonical Save→Open and corrupt/duplicate paths/keys/cues, with a source-contract pin on the new native naming policy. Save preflight rejects unroundtrippable setlist names or songs and uses O(n log n) std::set<juce::File> aligned with JUCE 8's platform-specific equality.

Review issues addressed:

  • P2 #4621308346: auto-name collision after delete+create; use PlayerSetlistArchive::nextGeneratedName and exercise create/delete/recreate.
  • P2 #4621336563: macOS case-variant file identity; use JUCE File comparator, not Windows-only lower-case string.
    Both review threads have code-specific replies and are resolved. Latest exact-head review was re-requested; code review result still to verify.

Evidence: fast native Linux source checks PASS for 718742d; Windows JUCE/MSVC + full CTest NOT RUN at this SHA. Do not infer hardware FAT / installer qualification.

Integration order: #792 required native Windows + Chromium exact-source gate PASS -> merge #792 -> replay this archive extraction without overwriting hotkey or parallel GUI, qualify exact new #799 SHA with Windows CTest (and any gate-selected UI) -> merge only when branch protection permits. No extra PCM renderer or second device dispatcher.

@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: 718742d227

ℹ️ 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/PlayerSetlistArchive.h Resolved
Fence playerUndoRemove against 2000-song cap and control cardinality before mutation; keep UI canUndoRemove consistent with native admission. Add boundary and remove-import-undo regression to JUCE archive contract.

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact current Native MV-14 HEAD cfceb869ef0dbb1ab798092f01baa48095d23ecc and all three P2 fixes. Check create/delete/create unique names, JUCE-platform duplicate path equality with O(n log n) set, and the new 2,000-song Undo Remove admission policy (both action and GUI canUndoRemove readback). Confirm v1/v2/v3 Player archive roundtrip and CMake JUCE test compile; do not infer Windows/ASIO qualification from fast source checks. This Native PR must reconcile with #792 before merging.

Copy link
Copy Markdown
Owner Author

N-MOD native Player archive — dependency and merge-safety handoff

Read the shared cross-thread architecture audit. This PR is a valid bounded C++ use-case extraction, but its merge dependency must be tracked from live GitHub state, not stale prose.

Live checkpoint at posting: #799 OPEN, HEAD cfceb869ef0dbb1ab798092f01baa48095d23ecc, and #792 OPEN, HEAD 333b398e405559d27933f57569571371bc03aad8. GUI MV-19 #800 MERGED; main observed at b6dfd41393618e81f6518f53545926a6f8c90876. Earlier wording stating '#792 merged' is inaccurate at this checkpoint; amend the PR handoff as appropriate. Both #792 and #799 touch src/Main.cpp and CMakeLists.txt.

Required sequence: settle #792 exact-head Windows MSVC/CTest + protected status and its merge first, unless a newer source-grounded dependency plan is documented. Reconcile #799 with the resulting latest main and merged GUI #800; preserve all hotkey code and existing controls. Verify tests on the new integrated exact commit (no claiming prior-HEAD results qualify it), including JUCE PlayerSetlistArchive compile, v1/v2/v3 import, canonical Save→Open, duplicate paths and setlist names, cue/tempo/key/auto-next/crossfade validation, atomic file persistence and existing Player runtime behavior.

Boundary: PlayerSetlistArchive only owns pure archive policy. Keep one Player/PCM/ASIO owner, no UI or DSP rewrite; don't create a second session store. No source-only/auto merge; no hardware FAT success claim. If merge order changes, first document the conflict and resolution, then requalify.

Follow-up: prioritize demonstrable reduction in ConsoleWindow cross-domain responsibilities after these two PRs, not unlimited micro-extractions; report old owner removed, remaining hot paths, tests and rollback. Historical Native M1–M6 are partial foundations to reuse, not reproduce. Naming guidance: N-MOD vs GUI G-MV.

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

ℹ️ 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/PlayerSetlistArchive.h Resolved
…archive mutation

Extract pure PlayerCueEditPolicy for canonical 10ms cue edits and v3 archive admission. Accept deck cue ACK before updating stored song metadata; rejected rounded OUT leaves valid metadata and unrelated Save intact. Add C++ and native-source regressions.
@masarray masarray changed the title refactor(native N-MOD-14/15): Player archive, Cue policies and atomic repository refactor(native N-MOD-14/15/16): durable-first Player setlist transactions Nov 19, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 529b298

Copy link
Copy Markdown
Owner Author

@codex review

Review exact combined integration HEAD 529b2986d3cf5a31b03e1d2b73f50a301d61d1de for N-MOD-14/15/16 versus latest main@354646bc. Verify two-parent merge ancestry/reconciliation retains G-MV GUI contract changes from current main and exact expected eight native/test paths; validate JUCE 8 C++20 isolated ARMixPlayerSetlistArchiveTests, PlayerSetlistEditTransaction durability before deck stop and queue/undo/readback, archived v1-v3 compatibility, valid file import path uniqueness. N-MOD-14/15 previously 103/103 Windows CTests; N-MOD-16 fast native and exact source review individually passed. Combined exact Windows CTest and strict Required Merge Gate are pending—do not claim qualified or installer. Identify correctness/security issues only.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 529b2986d3

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

@masarray masarray changed the title refactor(native N-MOD-14/15/16): durable-first Player setlist transactions refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection Nov 19, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact integration HEAD 258ea2bb2da95f23597694b121f9a378106da517, merging N-MOD-14–18 on latest main b30a59303ad3aed486a141c96acc42dec00d2caa. This is now a substantive Native Player control extraction: new PlayerLibraryEditPlan (append/scan reconcile/manual relink/MOVE/REMOVE/UNDO, bounded 2,000 items, stale row safety, per-song controls), and PlayerStateProjection (canonical arsonmix.player.v1 read-only JSON, queue revision, optional sets/tracks). Native retained/durable-first PlayerSetlistEditTransaction and PlayerLiveMetadataCommitPolicy remain. Check JUCE 8 C++20 standalone archive test includes, Main.cpp host call sites, source contract assertions, physical file fixtures, package build, metadata pairing, rollback and no second PCM/DSP owner. Verify native V1/V2/V3 readback parity and no GUI/G-MV overwrite. Fast-native check on exact head pending and full Windows native qualification NOT YET RUN for this head. Please report actionable issues before protected merge.

Copy link
Copy Markdown
Owner Author

Native N-MOD integration handoff — stabilize current candidate before more features

Owner direction and shared exit contract: #527 (comment)

This PR #799 is the active N-MOD14–17 integrated Player candidate. Unlike GUI #809, it remains not merged; at latest check its head had advanced beyond the earlier 14–16 Windows-qualified revisions. Do not represent earlier 103/103 CTests or previous Codex review as qualification of the new exact head. Do not add N-MOD18/19 or unrelated Main refactors to this moving branch while required Windows/merge checks are outstanding.

Immediate task: freeze #799 scope, verify the changed-file inventory and ancestry versus latest main (including merged G-MV26), check that all accepted GUI blobs are preserved, inspect the latest code-review findings, run the minimum fast contract checks, and obtain one matching exact-head Windows MSVC/full CTest plus Required Merge Gate. Merge only when the protected gate is conclusively green; if failing, fix the actual defect and requalify the new SHA. No forced merge, no second PCM owner, no unproven physical ASIO FAT, no installer claim.

Next, after #799 lands: publish to #527 a responsibility-based Native exit plan, not consecutive tiny Player PRs. Start with a source-grounded ConsoleWindow method/owner inventory across Player, Device Apply, Session/.smix, Routing/FX and hotkeys. For each area identify remaining read/write and lifecycle authority, and extract one cohesive use-case boundary that actually eliminates old business rules from Main rather than merely adding wrappers. Document deliberate Main composition/OS/WebView lifetimes that must stay; never use raw LOC alone as the goal.

Prioritize bounded functional slices with measurable reduction of coupling, pure deterministic policy tests, one native owner, correct ACK/installed readback, durability/rollback, and full Player v1-v3 migration/2,000-track save-reload/error cases. Keep JUCE realtime PCM/VST3 graph unchanged unless a separately evidenced milestone justifies it; do not retire M4/Lab compatibility without direct ChannelId PCM equivalence tests. Native and GUI lanes must not both edit the same bridge/Main contract independently.

Required next report on #527: exact #799 HEAD and required-gate state, whether N-MOD14–17 truly merged or still candidate, the remaining Main responsibilities by domain, a compact finite set of 2–3 coherent follow-up ownership milestones with specific exit tests, and physical ASIO FAT explicitly PENDING. No new PR simply to increase the N-MOD milestone number.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 258ea2b

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 258ea2bb2d

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

Copy link
Copy Markdown
Owner Author

Cross-workstream boundary — keep native modularization moving; IO runs in parallel

See canonical #812. Multi-device IO-0 #770 is merged; IO-1 secondary capture-only adapter #771 exists in a separate draft, and its exact-old-head native Windows tests passed. IO-1 is not installed in the app; physical vendor A/B proof pending.

Please continue the N-MOD Player/setlist vertical slice without waiting for IO-2. Keep ownership of src/Main.cpp, CMakeLists.txt and Player library/services during your current integration. Don't add a second JUCE PCM/VST3 renderer, callback-driven JS notifications, IO-2 control routing or speculative multi-device UX in this native Player PR.

Handoff for IO owner: the IO-1 branch must preserve all merged/newer CMakeLists.txt targets and native Main changes from N-MOD. For IO-2 the first safe parallel work is a separate pure device-qualified SourceBinding/virtual-input map + C++ tests, no Main/GUI edits. Only the eventual one-owner integration connects B capture lease to the primary render graph and native requestId/epoch/revision readback.

If a real shared-file change is unavoidable, record exact main/PR heads + target functions and give an explicit comment in #812 before modifying shared files; integrate once, don't cherry-pick or overwrite whole stale files. Keep normal exact-SHA MSVC/CTest and protected gate, no extra CI workflow. No automatic dependency of N-MOD completion on all multi-device work.

This branch has not been deployed

No deployments
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