Ξ-W2-T1 remediation: print master gain into the bake, derive the window from the dialed sound, reset play mode to Trigger

This commit is contained in:
2026-08-01 17:05:28 -04:00
parent 60308a3655
commit 39c2d1cdb4
31 changed files with 679 additions and 201 deletions
+3 -1
View File
@@ -14,7 +14,9 @@ REAPER/filesystem-facing half only, and it gathers rather than decides.
- **Prune is the single, exclusive file-deletion authority.** No bank op, no
capture op, no Design View op deletes a file; if any path other than prune
deletes a bank file, reject it in review.
deletes a bank file, reject it in review. The ONE carve-out — a shell removing
a file it wrote itself moments earlier that no index ever referenced, wherever
it sits — is stated in full at `prune_fs.cpp`'s header and nowhere else.
- **Dry-run first, always; no silent deletion.** Prune reports before it deletes
(orphan count, reclaimed size, and — for a small set — the files); actual
deletion is a confirmed second step. No periodic/background sweep.
+13 -7
View File
@@ -2,13 +2,19 @@
//
// deleteOrphanFile below (SHFileOperationW on Windows, std::filesystem::remove
// on SWELL platforms) is the ONLY code in the system that deletes USER files —
// the sole deletion authority over the bank folder's bytes (a shell removing a
// transient scratch file it just created, e.g. the drop path's temp
// .vstpreset, is self-cleanup, not authority over user data). Deliberately
// file-local (anonymous namespace): nothing outside this TU can reach it, and
// this concentration must never spread. The safety-critical "which files are
// orphans" decision stays in the pure core (prune_reconcile); this TU only
// enumerates, resolves, stats, and — after the confirm — executes.
// the sole deletion authority over the bank folder's bytes. THE carve-out, and
// its one home: a shell removing a file it wrote itself moments earlier and
// that no index ever referenced is self-cleanup, not authority over user data.
// It covers a transient scratch file outside the bank (the drop path's temp
// .vstpreset) AND a bank-folder write whose index entry was then refused
// (bake_land) — the discriminator is "did this call create it, and did anything
// ever reference it", not where it sits.
//
// deleteOrphanFile is deliberately file-local (anonymous namespace): nothing
// outside this TU can reach it, and this concentration must never spread. The
// safety-critical "which files are orphans" decision stays in the pure core
// (prune_reconcile); this TU only enumerates, resolves, stats, and — after the
// confirm — executes.
//
// Compiled into the reaper_reasampler module. REAPER-facing only through the
// persist_detail helpers and usage_scan; this TU itself calls no REAPER API directly.
+8 -2
View File
@@ -7,8 +7,7 @@
// JSON bridge, GUID minting, bank-folder relocation (see ext_state_io.h).
// * prune_fs.cpp — pruneDryRun/pruneOrphanSet/pruneReclaim: the prune
// scan and THE SINGLE FILE-DELETION AUTHORITY over user files in the bank
// folder. Nothing else in the system deletes bank-folder bytes (a shell's
// self-cleanup of its own transient scratch file is not this authority).
// folder, plus the one self-cleanup carve-out from it, both stated there.
//
// Save: BankModel JSON -> SetProjExtState under namespace "reasampler" (ext
// state lives inside the .rpp, so the index travels with the project for
@@ -64,6 +63,13 @@ public:
model::BankModel& bank() { return book_.activeIndex(); }
const model::BankModel& bank() const { return book_.activeIndex(); }
// The project whose book/view/tail/ledger poll() last loaded — compare-only, never
// dereferenced; nullptr before the first poll. An action that can be fired against a
// project other than the one currently loaded here (the VST bake, which targets its own
// instance's tab) MUST check this before mutating: the book in memory belongs to one
// project, and landing another tab's request would write its capture into this bank.
const void* loadedProject() const { return lastProject_; }
// Design-View model; persists MODEL STATE only (visibility on open is the view shell's job).
ViewModeModel& view() { return view_; }
const ViewModeModel& view() const { return view_; }