docs: fix overclaiming OriginKind comment and trim restated test comments
Enum comment claimed package-id lookup that no persisted field supports; reworded to the real distinction. Trimmed CLAUDE.md-duplicated test comments and the header.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
// Standalone tests for reasampler::tracking::OriginLedger — no REAPER, no framework.
|
||||
//
|
||||
// The record family behind file tracking. Covers: the relative-paths-only invariant,
|
||||
// exact-string ownership, dedup, insertion order, the JSON round-trip (incl. golden
|
||||
// byte literals over every persisted enum value), the append-a-kind-without-moving-"v"
|
||||
// rule and its degrade-don't-block twin, the no-backfill rule, the legacy path-only
|
||||
// lift, and the Fresh / Loaded / Unreadable / FutureVersion classification that keeps
|
||||
// never-recorded apart from the two degraded states.
|
||||
// Covers: relative-paths-only, exact-string ownership, dedup, insertion order, the
|
||||
// JSON round-trip (incl. golden bytes over every persisted enum value), the append-a-
|
||||
// kind rules, the no-backfill rule, the legacy path-only lift, and the Fresh / Loaded
|
||||
// / Unreadable / FutureVersion classification.
|
||||
|
||||
#include "../src/core/tracking/origin_ledger.h"
|
||||
|
||||
@@ -187,10 +185,7 @@ static void testSerializeGoldenLiteralPinsEveryPersistedKind() {
|
||||
CHECK(*back == l); // every field, not just the kind, survives the trip
|
||||
}
|
||||
|
||||
// Appending a value to the kind vocabulary must NOT move the document version: the
|
||||
// two rules sit side by side and pull in opposite directions — an unknown kind
|
||||
// degrades, an unknown "v" blocks. Pinned on the emitted bytes rather than on the
|
||||
// internal constant, because the byte is what an older build actually reads.
|
||||
// Pins the emitted "v" byte, not the internal constant — an older build reads bytes.
|
||||
static void testAppendingAKindDoesNotMoveTheDocumentVersion() {
|
||||
OriginLedger l;
|
||||
l.record(rec("bank/import.wav", OriginKind::PackageImport, "S-e"));
|
||||
@@ -202,10 +197,8 @@ static void testAppendingAKindDoesNotMoveTheDocumentVersion() {
|
||||
CHECK(loadLedger("{\"v\":3,\"records\":[]}").status == LedgerStatus::FutureVersion);
|
||||
}
|
||||
|
||||
// The other half of the append rule: a kind this build does NOT know degrades to
|
||||
// Unknown while the ledger still loads and the path stays owned. Losing the kind
|
||||
// detail costs nothing today — no consumer reads it — but an Unreadable here would
|
||||
// block prune entirely on nothing worse than a vocabulary gap.
|
||||
// Pins three unrecognized kind values (future, far-future, negative) all landing on
|
||||
// Unknown with the ledger still Loaded and the path still owned.
|
||||
static void testUnknownKindDegradesWithoutBlockingTheLedger() {
|
||||
const std::string blob =
|
||||
"{\"v\":2,\"records\":["
|
||||
|
||||
Reference in New Issue
Block a user