Skip to content

refactor(native N-MOD-16): durable-first Player setlist metadata edits - #808

Merged
masarray merged 4 commits into
refactor/native-mv14-player-setlist-archive-20261119from
refactor/nmod16-player-setlist-durable-first-20261119
Nov 19, 2026
Merged

masarray merged 4 commits into
refactor/native-mv14-player-setlist-archive-20261119from
refactor/nmod16-player-setlist-durable-first-20261119

Conversation

@masarray

@masarray masarray commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

N-MOD-16 — durable-first Player setlist transactions (Native control only)

Stacked dependency: N-MOD-14/15 #799, parent exact c19c34d76d2528bd613cf13f11a2cb4551f8fd6e. This draft must not be merged into main before #799 passes its full exact-head Windows MSVC/CTest, Required Merge Gate, and protected merge. No changes to production main made by this branch.

New canonical control-thread edit boundary

  • src/PlayerSetlistEditTransaction.h stages native setlist metadata and active-track edits against the authoritative live list, validates with PlayerSetlistArchive, and uses the one atomic PlayerSetlistRepository durable Save before returning a candidate to the sole ConsoleWindow. Invalid state and failed I/O return without mutating Player/setlist/queue/deck.
  • ConsoleWindow::playerEditSetlist now sends CREATE/SELECT/DELETE/RENAME to the service. Set switching/deleting stops the one deck and activates selection only after Save succeeds. MOVE/REMOVE/UNDO stage song/control pairs and persist first; selection/current/pending indices, queue revisions and undo tokens advance only after the disk accepts the edit.
  • File picker import, bounded asynchronous folder scan reconciliation and single-file relink also use the durable-before-adopt track transaction. Relink never stops the currently playing deck until the replacement path is persisted. Retain the existing stale-row match and snapshot-based folder worker fence; preserve per-song KEY/TEMPO/Cue metadata.
  • File picker now uses std::map<juce::File, index>; folder merge uses std::set<juce::File> for O(log n) path duplicate lookup, retaining platform-sensitive JUCE File equality, first valid file selection and the 2,000-song limit. No new worker, media copying/deletion, browser state machine or realtime PCM callback.
  • Existing JUCE archive/real filesystem CTest now covers durable-first create/select/rename/remove, active in-memory songs merged into candidate, case-insensitive duplicate name, invalid song/control cardinality, blocked parent I/O, immutable old disk bytes/original state, and active-track Save/Open/reject. Native source contract targets the actual service and call sites.

Explicit limits

Remaining legacy KEY/TEMPO/CUE transport edits and other calls to persistPlayerLibrary() may still mutate accepted native control state before the archive write; do not claim all Player persistence is transactional or promote any hardware/installer qualification. Native deck/PCM/FX graph, accepted native ACK/readback, .smix and approved /preview/ GUI remain unchanged.

Evidence and safety

  • Current source HEAD 658cbc2cca0b14eddc61b2f692765702d5059248, four file paths: src/Main.cpp, new transaction header, JUCE CTest, source-contract test.
  • First Codex review found P2 alias/source-contract mismatch: fixed, and Fast Native CI on corrected previous SHA succeeded. Exact previous head review then identified P1 missing standalone C++ test include: fixed on this current SHA; exact-head review and fast contracts requested.
  • Current HEAD native Windows compile / JUCE CTest: NOT RUN. No ASIO physical FAT, portable ZIP, installer or merged main claim. Do not start duplicate Windows CI while parent refactor(native N-MOD-14–18): durable Player transactions, library plans and state projection #799 qualifies. Native Windows exact SHA after parent integration only.

Handoff: HASIL: durable-first Player metadata, song edits and import/relink. STATUS: KODE DIBUAT; Quick CI latest pending; CTest latest NOT RUN; PR is draft. AMAN DIPAKAI: Existing main unaffected; new code BELUM qualified. TINDAKAN USER: TIDAK PERLU APA-APA. NEXT: resolve current review, promote #799 under strict gate, rebase/reconcile this draft to newest main, run one exact-source Windows CTest, protected merge.

Copy link
Copy Markdown
Owner Author

@codex review

Review exact N-MOD-16 source HEAD 89c76e6c2c6f4666e744b2e1c5be90633762e262 stacked on N-MOD-14/15 c19c34d. Check JUCE 8 C++20 syntax, PlayerSetlistEditTransaction::apply create/select/delete/rename against original ConsoleWindow semantics (including deletion index remapping), active live song/control cardinality and atomic disk-commit-before-live/deck-stop. Verify error behavior on read-only/invalid parent, casefold duplicate names, real temp filesystem JUCE test assertions, source contract update, callback and PCM unaffected. Flag functional bugs, not style-only. Full Windows JUCE CTest has NOT RUN on N-MOD-16; parent #799 Windows run ongoing.

@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:25:14.110498Z 658cbc2 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 19, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 658cbc2
Status: ✅  Deploy successful!
Preview URL: https://20cdfb1e.arsonmix.pages.dev
Branch Preview URL: https://refactor-nmod16-player-setli.arsonmix.pages.dev

View logs

@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: 89c76e6c2c

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

@codex review

Review exact revised N-MOD-16 HEAD c054ae3eff538f9f8d71ee8689d823d3e0610d07 (new source contract fixes your P2 alias issue). In addition to CREATE/SELECT/DELETE/RENAME durable-first metadata, this commit now routes MOVE/REMOVE/UNDO, file picker, folder worker scan reconciliation, and single-file relink through commitPlayerTrackEdit / replaceActiveTracks. Look for real JUCE 8 C++20 compile mistakes, stale FileChooser callback state, wrong queue revisions/undo or deck state before/after failed disk save, case-sensitive JUCE File path equality, 2,000-song duplicate admission and source guards. Compare behavior against parent N-MOD-14/15 and ensure no extra PCM/GUI owner. Fast native recheck pending; real MSVC CTest NOT YET RUN for #808. Please report only actual functional problems.

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

ℹ️ 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 tests/player_setlist_archive_test.cpp Resolved

Copy link
Copy Markdown
Owner Author

@codex review

Review EXACT latest head 658cbc2cca0b14eddc61b2f692765702d5059248 after P2 source-contract alias correction and P1 missing standalone C++ test include fix. Both earlier findings were fixed in code; source Fast Native on prior HEAD c054ae3 completed SUCCESS. Check new PlayerSetlistEditTransaction.h and included test for C++20/JUCE 8 actual compile, stale snapshot behavior, blocked disk write, O(log n) import path semantics, queue/undo index commits after storage acceptance, and no extra PCM callback or GUI owner. Please report actionable correctness defects only; Windows MSVC/CTest for this SHA has NOT RUN until stacked base #799 qualifies/merges.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 658cbc2cca

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

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