From cd12b97631e229fb8997c4413f8854557882d6fb Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Wed, 29 Jul 2026 13:51:35 -0400 Subject: [PATCH] Q-W6 review follow-ups: drop stale wav_trim clause, fix stale include comment, idempotent action-table clear, reflow ragged comment, align session.h trailing comments --- CLAUDE.md | 2 +- src/app/main.cpp | 2 +- src/shell/actions/action_registry.cpp | 1 + src/shell/actions/design_view_actions.cpp | 2 +- src/shell/capture/capture_batch.cpp | 2 +- src/shell/capture/capture_orchestrator.cpp | 2 +- src/shell/panel/panel_input.cpp | 12 ++++++------ src/shell/panel/panel_layout.cpp | 2 +- src/shell/panel/panel_render.cpp | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 02c078e..61cc31c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -64,7 +64,7 @@ There is no hot-reload. Copy the built binary into REAPER's `UserPlugins/` folde - `bank_book` — multi-bank registry: an ordered set of banks each wrapping a `BankIndex`. **Pool privileges (un-deletable/un-renamable/un-evacuable, never zero banks) enforced in-model.** Owns create/rename/reorder/delete of named banks, active-bank id, and index-only move/copy/remove of a sample between banks. The JSON round-trip lives in the sibling `bank_book_json` TU (Q-W5 split; serialize/deserialize via a private static `nameKey` seam) — one model, one codec, same public surface. - `owned_manifest` — the set of project-relative files the capture path itself created, persisted under the `"owned_files"` ext-state key, so the prune path can distinguish the bank system's own orphans from hand-dropped files. - `app_version` — REAPER-free version/channel identity: CMake-sourced semver constant, ext-state stamp value, and the full set of channel-derived identity accessors. All channel strings derive from one `REASAMPLER_CHANNEL_IS_BETA` bit; no scattered `#ifdef`s in the shells. -- `wav_codec` — chunk walker + layout parse + float32 build + size-field patch + content hashes; the single pure RIFF/WAV owner. (`wav_trim` is now a transitional forwarding alias onto `wav_codec`, kept only so the Q-W2v TUs it feeds compile untouched; retire it once that wave lands.) +- `wav_codec` — chunk walker + layout parse + float32 build + size-field patch + content hashes; the single pure RIFF/WAV owner (`wav_trim` is retired; `wav_codec` is the sole owner). - `provenance` — capture-recipe fingerprint: build/encode/compare a `rsprov1` fingerprint of scope, range, tail, rate/channels, track GUIDs, and FX-chain identity. **A thin reproducibility fingerprint — NOT a serialized chain to restore.** - `prune_reconcile` — pure prune core: `pruneOrphans(present, referenced, owned)` computes `(owned ∩ present) − referenced`; the safety-critical "which files are orphans" decision, filesystem-free and hard-tested before any I/O exists. Gains `mergeReferenced(bankRefs, liveInstanceHeldPaths)` (pS-usage) — unions live instance holds into the prune referenced-set so the pure orphan computation includes them. - `prune_button` — pure layout/hit-test for the `bank_panel` footer Prune button. diff --git a/src/app/main.cpp b/src/app/main.cpp index 1a5bc47..a721162 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -30,7 +30,7 @@ #include #include "core/capture/render_settings.h" // captureActionTable -#include "core/version/app_version.h" // channelCommandId / appVersion +#include "core/version/app_version.h" // appVersion #include "ingest.h" #include "shell/actions/action_registry.h" // the Q-W6 registration table #include "shell/actions/bank_actions.h" // multi-bank action family (B3; Q-W4 home) diff --git a/src/shell/actions/action_registry.cpp b/src/shell/actions/action_registry.cpp index 2112111..00ece1a 100644 --- a/src/shell/actions/action_registry.cpp +++ b/src/shell/actions/action_registry.cpp @@ -61,6 +61,7 @@ int registerAction(reaper_plugin_info_t* rec, const char* suffix, void registerActionTable(reaper_plugin_info_t* rec, const ActionTableRow* rows, std::size_t count) { + g_table.clear(); // idempotent-by-construction: a re-register never doubles-up rows for (std::size_t i = 0; i < count; ++i) { g_table.push_back(TableEntry{rows[i]}); TableEntry& e = g_table.back(); diff --git a/src/shell/actions/design_view_actions.cpp b/src/shell/actions/design_view_actions.cpp index 91b76e9..a05dfb9 100644 --- a/src/shell/actions/design_view_actions.cpp +++ b/src/shell/actions/design_view_actions.cpp @@ -29,7 +29,7 @@ #include "core/view/lane_keys.h" // view::isOnManualLane — the single managed/manual predicate #include "core/view/view_mode_model.h" -#include "shell/persist/session.h" // ReaSamplerSession (owns view() model) +#include "shell/persist/session.h" // ReaSamplerSession (owns view() model) #include "shell/capture/item_read.h" // shared MediaItem* -> GUID + fixed-lane-name reads (D2 W3-B) #include "shell/capture/track_guid.h" // shared MediaTrack* -> canonical GUID key #include "shell/panel/panel_window.h" // bankPanelInvalidate — footer toggle repaint diff --git a/src/shell/capture/capture_batch.cpp b/src/shell/capture/capture_batch.cpp index fc15bb5..e22e4f9 100644 --- a/src/shell/capture/capture_batch.cpp +++ b/src/shell/capture/capture_batch.cpp @@ -19,7 +19,7 @@ #include "core/capture/batch_capture.h" // planCaptureUnits / BatchOutcome #include "core/model/bank_book.h" // BankBook / Bank #include "core/model/provenance.h" // recipe parse/build, fingerprint -#include "shell/persist/session.h" // ReaSamplerSession +#include "shell/persist/session.h" // ReaSamplerSession #include "shell/capture/capture_orchestrator.h" // captureAndIndexOne / renderOffline #include "shell/capture/provenance_shell.h" // fxChainIdentity* / trackByGuid #include "shell/capture/scope_resolve.h" // ResolvedSource diff --git a/src/shell/capture/capture_orchestrator.cpp b/src/shell/capture/capture_orchestrator.cpp index 486cb6e..030e146 100644 --- a/src/shell/capture/capture_orchestrator.cpp +++ b/src/shell/capture/capture_orchestrator.cpp @@ -17,7 +17,7 @@ #include "core/capture/tail_control.h" // TailSetting #include "core/model/provenance.h" // model::Provenance #include "ingest.h" // ingestAssignActiveInstance -#include "shell/persist/session.h" // ReaSamplerSession +#include "shell/persist/session.h" // ReaSamplerSession #include "shell/capture/insert.h" // runInsert / InsertRequest #include "shell/capture/realtime_lifecycle.h" // the in-flight realtime state diff --git a/src/shell/panel/panel_input.cpp b/src/shell/panel/panel_input.cpp index 7edade5..8a2a1b4 100644 --- a/src/shell/panel/panel_input.cpp +++ b/src/shell/panel/panel_input.cpp @@ -18,7 +18,7 @@ #include "shell/panel/panel_input.h" #include "shell/actions/bank_actions.h" // bankPruneCommandId — the footer Prune dispatch (R3) -#include "shell/persist/session.h" // ReaSamplerSession — view/tail reads + mutation +#include "shell/persist/session.h" // ReaSamplerSession — view/tail reads + mutation #include "core/view/view_mode_model.h" // autoTagNewContent / NewItem / AutoTag (D2 Wave 2) #include "shell/capture/item_read.h" // itemGuid / itemLaneName — shared item-read seam (D2 W3-B) #include "shell/capture/track_guid.h" // guidString — canonical track GUID key (D2 Wave 2) @@ -156,11 +156,11 @@ void enumerateLiveGuids(ReaProject* proj, std::set& allGuids, // membership index. // // INTENTIONAL: membership mutation happens OUTSIDE any Undo block. Auto-tag is a -// background metadata update (like setting a label), not a destructive project edit. -// the persist shell (ext_state_io.cpp) writes it on the next project save alongside the -// bank and view state, the -// same way an action-driven tag is persisted. Wrapping this in an Undo block would flood -// the REAPER undo history with a new entry for every timer tick that sees new content. +// background metadata update (like setting a label), not a destructive project edit. The +// persist shell (ext_state_io.cpp) writes it on the next project save alongside the bank +// and view state, the same way an action-driven tag is persisted. Wrapping this in an Undo +// block would flood the REAPER undo history with a new entry for every timer tick that sees +// new content. // Returns true iff this tick tagged at least one new GUID into a mode — the signal the // caller uses to decide whether to run the lane-minting pass (a track can only newly // become multi-mode when auto-tag just placed content on it). No tag ⇒ nothing to mint. diff --git a/src/shell/panel/panel_layout.cpp b/src/shell/panel/panel_layout.cpp index 0a1eceb..34d9311 100644 --- a/src/shell/panel/panel_layout.cpp +++ b/src/shell/panel/panel_layout.cpp @@ -20,7 +20,7 @@ #include "shell/panel/panel_state.h" #include "shell/panel/panel_layout.h" -#include "shell/persist/session.h" // ReaSamplerSession — mode/view reads +#include "shell/persist/session.h" // ReaSamplerSession — mode/view reads #include "core/view/view_mode_model.h" // ViewModeModel — modes()/activeModeId() // Action-trigger buttons (M11): resolve each button's command id at runtime from the diff --git a/src/shell/panel/panel_render.cpp b/src/shell/panel/panel_render.cpp index 8e19795..e111169 100644 --- a/src/shell/panel/panel_render.cpp +++ b/src/shell/panel/panel_render.cpp @@ -18,7 +18,7 @@ #include "shell/panel/panel_state.h" #include "shell/panel/draw_kit.h" // kit text()/fillSurface/drawButton/drawWaveform (L1) -#include "shell/persist/session.h" // ReaSamplerSession — mode/view/tail reads +#include "shell/persist/session.h" // ReaSamplerSession — mode/view/tail reads #include "core/view/view_mode_model.h" // ViewModeModel / Mode — the footer toggle's model namespace reasampler::panel {