Skip to content

refactor(native N-MOD-17): compensate live Player settings and durable preferences - #810

Merged
masarray merged 1 commit into
refactor/native-mv14-player-setlist-archive-20261119from
refactor/nmod17-player-metadata-control-20261119
Nov 19, 2026
Merged

masarray merged 1 commit into
refactor/native-mv14-player-setlist-archive-20261119from
refactor/nmod17-player-metadata-control-20261119

Conversation

@masarray

Copy link
Copy Markdown
Owner

N-MOD-17 — Native Player metadata acceptance + compensating durability

Parent: N-MOD-14/15/16 #799 at 529b2986d3cf5a31b03e1d2b73f50a301d61d1de. This draft contains ONLY N-MOD-17's four file changes and must not independently merge to main before the parent is qualified.

Behavior and ownership

  • Add engine/player/PlayerLiveMetadataCommitPolicy.h: a deterministic control-thread native accept → durable save → restore prior native values on save failure policy. NEXT edits use durable Save alone, with no native or PCM mutation; CURRENT KEY/TEMPO and Cue preserve the existing synchronous native-first operator response. If both archive Save and native rollback fail, the one ConsoleWindow/Player control owner stops its deck safely, clears pending transition, and emits an actionable error rather than leave unsaved playing metadata silently.
  • KEY/TEMPO and Cue modifications no longer mutate playerTrackSettings_ before confirmed Save. Cue policy still quantizes/validates before touching native, and accepted Cue loop invalidation occurs only after the accepted Save.
  • Auto Next and crossfade preferences use durable-before-adopt commitPlayerPreferences. Rejected writes preserve Auto Next, fade, Loop A/B and AutoAdvance state. Existing commitPlayerTrackEdit and all preference operations share one commitPlayerMetadata disk boundary.
  • Delete historical saveActivePlayerSet and persistPlayerLibrary in Main, removing duplicated mutable-save logic. No new deck, PCM callback, AudioDeviceManager, runtime graph, GUI, transport or .smix schema. Audio processing remains the single JUCE owner.

Regression/evidence

  • Existing standalone JUCE Player archive CTest now exercises real disk preferences write/reload and blocked parent failure, and pure injected native/durable sequencing: NEXT-only save, native rejection without write, accepted live commit, storage failure with successful native rollback, and failure of native rollback. UI source guard verifies the extraction/ordering and absence of the legacy mutable save methods.
  • Source commit 2eba5e72b39382ad8762ea1bd0d5b010167ec5da; code committed on separate dependent branch. Fast Native, Windows JUCE/MSVC CTest and exact-head code review are NOT YET CONFIRMED on this commit. Do not report hardware FAT/installer or main merge. Parent refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection #799 remains under exact-SHA Windows verification and protected merge.

Scope boundary: compensation cannot make disk and an external live engine physically atomic. If native restoration fails the caller stops the Player deck to fail closed. Actual ASIO hardware validation remains pending. This change is not a second PCM owner.

Operator handoff: HASIL: safer live KEY/TEMPO/Cue acceptance plus durable preferences and one common Player storage boundary; STATUS KODE DIBUAT on draft; AMAN DIPAKAI? BELUM for the new code (main untouched); TINDAKAN OWNER: TIDAK PERLU; NEXT: fast tests/review, parent protected merge, reconcile this PR to current main, one exact-SHA Windows CTest, then protected merge.

Copy link
Copy Markdown
Owner Author

@codex review

Review exact HEAD 2eba5e72b39382ad8762ea1bd0d5b010167ec5da of draft N-MOD-17, stacked on current combined #799 529b2986d3cf5a31b03e1d2b73f50a301d61d1de. Focus on real JUCE 8 C++20 syntax, event handler logic for CURRENT vs NEXT KEY/TEMPO and Cue, operator responsiveness, native-first acceptance→atomic Save→native restoration after Save failure; if rollback fails, stop only the Player deck and clear pending transitions, no extra PCM owner. Check durable-before-adopt Auto Next/fade including loop/crossfade constraints, removal of legacy persistPlayerLibrary and saveActivePlayerSet, and source guard assertions. Standalone archive CTest was extended with real I/O and injected compensation ordering. Native Windows CTest for this SHA NOT RUN; parent full exact-SHA Windows currently in progress. Report only correctness or safety defects.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 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-19T03:46:44.487073Z 2eba5e7 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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2eba5e7
Status: ✅  Deploy successful!
Preview URL: https://fd2b89d5.arsonmix.pages.dev
Branch Preview URL: https://refactor-nmod17-player-metad.arsonmix.pages.dev

View logs

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 2eba5e72b3

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

N-MOD-17 exact source check — 2026-11-19

Draft PR #810 HEAD 2eba5e72b39382ad8762ea1bd0d5b010167ec5da has Fast Native SUCCESS (run 44453546172), Player Show source contracts SUCCESS, release contract quick lane SUCCESS, and Codex exact-SHA code review COMPLETE with zero findings. This is a source/code-review checkpoint, NOT a JUCE/MSVC compiled or hardware qualification. Changed exactly 4 files.

The coherent N-MOD-17 boundary:

  • Current KEY/TEMPO/Cue: native acceptance, stage a validated full archive candidate using the existing N-MOD-16 repository, and if disk Save fails attempt restoring the prior accepted native values. If native rollback itself fails, stop the one Player deck safely and clear transient pending transition/loop, without affecting the main mixer/PCM owner.
  • NEXT KEY/TEMPO: persist only; must not alter current deck.
  • Auto Next/crossfade: durable-first before mutating preferences and loop/gate control.
  • Removed the two old saveActivePlayerSet() and persistPlayerLibrary() mutator paths from ConsoleWindow; all persistent Player edits share commitPlayerMetadata.
  • Existing standalone JUCE test now checks real disk/reload and blocked filesystem for preferences, plus six injected native/durable/rollback ordering cases. The approved GUI and FX/PCM graph are untouched.

Integration dependency: parent #799 now groups N-MOD-14/15/16 on HEAD 529b2986d3cf5a31b03e1d2b73f50a301d61d1de. Its earlier N14/15 exact Windows CTest 103/103 SUCCESS; the combined exact-SHA Windows run 44452348150 remains in progress and Required Merge Gate PENDING. PR #808 N16 was merged into #799's branch, not separately into main. Wait for protected #799 completion, then reconcile #810 against latest main and run exactly one Windows CTest at its final SHA. GitHub auto-merge is disabled on this repo; no bypass/forced main integration.

Operator report: HASIL = transactional Player control milestone implemented; STATUS = KODE DIBUAT + FAST DIUJI, NOT Windows-qualified/merged; AMAN DIPAKAI = main unaffected, code new BELUM; TINDAKAN USER = TIDAK PERLU; no installer, ASIO physical FAT or release claim.

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