docs: library comments say what the scanner and resolver do, not how they came to be (#6277)
release / govulncheck (push) Successful in 20s
release / web (push) Successful in 1m20s
release / go (push) Successful in 1m37s
release / integration (push) Successful in 5m15s
release / android (push) Successful in 5m26s
release / Build signed APK (releases and dev) (push) Successful in 5m45s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 20s
release / web (push) Successful in 1m20s
release / go (push) Successful in 1m37s
release / integration (push) Successful in 5m15s
release / android (push) Successful in 5m26s
release / Build signed APK (releases and dev) (push) Successful in 5m45s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
Rewrites the internal/library comment blocks to rule 32. Task, milestone, decision and rule ids are gone; the incidents behind them are restated as the constraint they left (why a file is deleted before its row, why the missing mark is a mark, why duplicates block on duration). Counts and album names from one library are dropped from production comments; test comments keep the names their fixtures use. The tagReadVersion log keeps each version's before and after, without the measurements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ type fakeReconciler struct {
|
||||
listErr error
|
||||
markErr error
|
||||
clearErr error
|
||||
// Change rows the reconcile pass asked the delta sync to emit (#2704).
|
||||
// Change rows the reconcile pass asked the delta sync to emit.
|
||||
loggedChanges []dbq.InsertLibraryChangesParams
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@ func TestReconcileMissing_DoesNotRemarkAlreadyMissingRows(t *testing.T) {
|
||||
}
|
||||
|
||||
// The guard that matters most. A half-attached mount makes the walk succeed
|
||||
// while seeing only part of the library — evidence indistinguishable from a mass
|
||||
// deletion, so reconcile must refuse rather than guess.
|
||||
// while seeing only part of the library — evidence indistinguishable from a
|
||||
// mass deletion, so reconcile must refuse rather than guess.
|
||||
func TestReconcileMissing_RefusesWhenTooMuchWouldBeMarked(t *testing.T) {
|
||||
root := populatedRoot(t)
|
||||
s := testScanner(t, root)
|
||||
@@ -288,8 +288,8 @@ func TestReconcileMissing_RefusesWhenRootEmpty(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Several roots, one detached. Marking must not proceed on partial evidence just
|
||||
// because the other roots looked fine.
|
||||
// Several roots, one detached. Marking must not proceed on partial evidence
|
||||
// just because the other roots looked fine.
|
||||
func TestReconcileMissing_RefusesWhenAnyRootMissing(t *testing.T) {
|
||||
good := populatedRoot(t)
|
||||
s := testScanner(t, good, filepath.Join(t.TempDir(), "detached"))
|
||||
@@ -336,8 +336,8 @@ func TestVerifyRootsPresent_NoRootsConfigured(t *testing.T) {
|
||||
|
||||
// Without a change row the mark is invisible to every client:
|
||||
// /api/library/sync is a change-log feed, so a plain UPDATE never reaches
|
||||
// anyone. This was the gap that made #2704's wire field inert — the flag
|
||||
// existed and nothing ever told a client to re-read the track.
|
||||
// anyone, and the wire field would exist with nothing ever telling a client to
|
||||
// re-read the track.
|
||||
func TestReconcileMissing_MarkingEmitsSyncChanges(t *testing.T) {
|
||||
s := testScanner(t, populatedRoot(t))
|
||||
|
||||
@@ -366,8 +366,8 @@ func TestReconcileMissing_MarkingEmitsSyncChanges(t *testing.T) {
|
||||
t.Errorf("entity_type = %q, want track", got.EntityType)
|
||||
}
|
||||
// Upsert, not delete: the track still exists and keeps its history. A
|
||||
// delete would tell clients to drop the row, which is the behaviour
|
||||
// #2704 deliberately rejected.
|
||||
// delete would tell clients to drop the row, and a missing file is
|
||||
// expected to come back.
|
||||
if got.Op != "upsert" {
|
||||
t.Errorf("op = %q, want upsert — the row survives, only its state changed", got.Op)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user