Cut core/model, reclaim, json, util comment bloat ~26% (comments only, zero code change)
This commit is contained in:
@@ -1,31 +1,16 @@
|
||||
#pragma once
|
||||
// owned_manifest — the pure core of the owned-file manifest seam (Phase B, B-cap).
|
||||
// owned_manifest — the set of files the bank system ITSELF created; every file the
|
||||
// capture path writes gets recorded here so prune can tell the system's own orphans
|
||||
// (owned ∩ present − referenced) apart from hand-dropped files. Writes and persists
|
||||
// the manifest only — no prune logic lives here.
|
||||
//
|
||||
// PURE MODULE (CLAUDE.md §load-bearing split): NO REAPER types, NO SWELL, NO
|
||||
// vendor/ includes. Standard library only. Unit-tested outside the DAW — the same
|
||||
// "small pure type + JSON round-trip" pattern as wav_codec / tab_strip.
|
||||
// NOT a mirror of the bank index: removing/moving an index entry does NOT remove
|
||||
// the file's manifest record (the manifest tracks files *created*; prune reconciles
|
||||
// manifest-vs-index later). Only the capture add-path adds to it — no remove verb.
|
||||
//
|
||||
// -- What it is --------------------------------------------------------------
|
||||
//
|
||||
// The set of files the bank system ITSELF created — every file the capture path
|
||||
// writes gets recorded here. Phase R prune consumes it to tell the system's own
|
||||
// orphans (owned ∩ present − referenced) apart from hand-dropped files. B-cap only
|
||||
// WRITES and PERSISTS the manifest; no prune logic lives here (fork R-D, settled
|
||||
// 2026-07-24: "defer the feature, design the seam").
|
||||
//
|
||||
// -- What it is NOT ----------------------------------------------------------
|
||||
//
|
||||
// It is NOT a mirror of the bank index. Removing or moving an index entry does NOT
|
||||
// remove the file's manifest record: the manifest tracks files *created*, and prune
|
||||
// (Phase R) reconciles manifest-vs-index later. The ONLY thing that adds to it is
|
||||
// the capture add-path. There is deliberately no remove verb here.
|
||||
//
|
||||
// -- The relative-paths-only invariant ---------------------------------------
|
||||
//
|
||||
// A manifest path is ALWAYS project-relative (same invariant as Sample.relativePath
|
||||
// and the persisted BankModel). add() rejects an absolute path rather than guess a
|
||||
// relativization — the pure model has no project root, so a "normalization" would be
|
||||
// a guess that could point at the wrong file (mirror of BankModel::add's rejection).
|
||||
// Paths are ALWAYS project-relative (same invariant as Sample.relativePath). add()
|
||||
// rejects an absolute path rather than guess a relativization — the pure model has
|
||||
// no project root, so "normalizing" could point at the wrong file.
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -58,12 +43,12 @@ public:
|
||||
// capture of an identical request does not double-record.
|
||||
ManifestAddResult add(const std::string& relativePath);
|
||||
|
||||
// True iff the exact path string is recorded. Phase R uses this to attribute a
|
||||
// present file to the bank system. Exact string match — path normalization (if any)
|
||||
// is the caller's concern, consistent across add and query.
|
||||
// True iff the exact path string is recorded. Prune uses this to attribute a
|
||||
// present file to the bank system. Exact string match — path normalization (if
|
||||
// any) is the caller's concern, consistent across add and query.
|
||||
bool contains(const std::string& relativePath) const;
|
||||
|
||||
// The owned paths in insertion order. Phase R unions this with the on-disk file
|
||||
// The owned paths in insertion order. Prune unions this with the on-disk file
|
||||
// set; here it is the round-trip + query surface.
|
||||
const std::vector<std::string>& paths() const { return paths_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user