feat(prune): R2 dry-run prune shell + persist wiring, report-only
Add ReaSamplerSession::pruneDryRun enumerating the resolved current bank folder, feeding the R1 core, and returning a PruneReport (count/bytes/list). New pure bankRelativeForName + buildPruneReport keep spelling and tally testable. Register forever-stable BANK_PRUNE_FOLDER action, report-only. No deletion.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "bank_book.h"
|
||||
#include "bank_model.h"
|
||||
#include "owned_manifest.h"
|
||||
#include "prune_reconcile.h"
|
||||
#include "tail_control.h"
|
||||
#include "view_mode_model.h"
|
||||
|
||||
@@ -179,6 +180,21 @@ public:
|
||||
// no dangling no-effect undo entry is opened on an unsaved project.
|
||||
bool saveToActiveProject();
|
||||
|
||||
// Compute the Phase R prune dry-run for the ACTIVE project (Wave 2 — REPORT ONLY,
|
||||
// deletes nothing). Enumerates the resolved CURRENT bank folder (the SAME M4 project-
|
||||
// relative machinery the index/persist use — never a stale absolute path, so it is
|
||||
// correct across a Save-As relocation), spells every enumerated entry with the index's
|
||||
// own convention (bankRelativeForName — byte-identical to the capture path's spelling),
|
||||
// and feeds the R1 pure core with (present, book().referencedPaths(), owned().paths()).
|
||||
// Returns the orphan count + reclaimable bytes + the (possibly display-truncated) file
|
||||
// list. The decision stays in the pure core — this method only enumerates, resolves,
|
||||
// and stats. READ-ONLY across the whole persist seam: it writes NO ext-state, calls no
|
||||
// save / MarkProjectDirty, and mutates neither the book, the manifest, nor any file.
|
||||
//
|
||||
// Yields an empty report (count 0) when there is no active/saved project or no bank
|
||||
// folder on disk yet — an unsaved or never-captured project has nothing to reclaim.
|
||||
PruneReport pruneDryRun() const;
|
||||
|
||||
// Poll the active project. Detects a project load (active project changed)
|
||||
// and a Save-As (active project's .rpp path changed) and reacts accordingly.
|
||||
// Intended to be driven by REAPER's "timer" register. Idempotent per tick.
|
||||
|
||||
Reference in New Issue
Block a user