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:
+13
-10
@@ -24,8 +24,8 @@ type LibraryStageTallies struct {
|
||||
Updated int `json:"updated"`
|
||||
Skipped int `json:"skipped"`
|
||||
Errored int `json:"errored"`
|
||||
// Reconcile results (#2523). Surfaced in the scan record because a track
|
||||
// disappearing from the library is something the operator should be able to
|
||||
// Reconcile results. Surfaced in the scan record because a track
|
||||
// disappearing from the library is something an admin should be able to
|
||||
// see happened, rather than discovering it when a mix comes up short.
|
||||
Missing int `json:"missing"`
|
||||
Restored int `json:"restored"`
|
||||
@@ -38,7 +38,8 @@ func (st Stats) tallies() LibraryStageTallies {
|
||||
}
|
||||
}
|
||||
|
||||
// MBIDBackfillStageTallies wires BackfillMBIDsResult into the scan_runs jsonb column.
|
||||
// MBIDBackfillStageTallies wires BackfillMBIDsResult into the scan_runs jsonb
|
||||
// column.
|
||||
type MBIDBackfillStageTallies struct {
|
||||
Processed int `json:"processed"`
|
||||
Healed int `json:"healed"`
|
||||
@@ -46,7 +47,8 @@ type MBIDBackfillStageTallies struct {
|
||||
Duplicates int `json:"duplicates"`
|
||||
}
|
||||
|
||||
// CoverEnrichStageTallies wires EnrichBatch tallies into the scan_runs jsonb column.
|
||||
// CoverEnrichStageTallies wires EnrichBatch tallies into the scan_runs jsonb
|
||||
// column.
|
||||
type CoverEnrichStageTallies struct {
|
||||
Processed int `json:"processed"`
|
||||
Succeeded int `json:"succeeded"`
|
||||
@@ -64,13 +66,12 @@ type ArtistArtEnrichStageTallies struct {
|
||||
// RunScanConfig assembles the knobs for the orchestrator. BackfillCap is
|
||||
// the album/artist-MBID-backfill batch cap (5000); EnrichCap /
|
||||
// ArtistEnrichCap gate cover/artist-art enrichment (0 = off, <0 =
|
||||
// unbounded — #388 removed the global cover-art cap; remote providers
|
||||
// self-throttle per provider).
|
||||
// unbounded; remote providers pace themselves).
|
||||
type RunScanConfig struct {
|
||||
BackfillCap int
|
||||
EnrichCap int
|
||||
ArtistEnrichCap int // M7 cover-sources: cap for the artist-art enrich stage
|
||||
DataDir string // M7 cover-sources: where to write artist-art files
|
||||
ArtistEnrichCap int // cap for the artist-art enrich stage
|
||||
DataDir string // where to write artist-art files
|
||||
}
|
||||
|
||||
// RunScan is the unified scan-chain orchestrator. Creates a scan_runs row,
|
||||
@@ -235,7 +236,8 @@ func RunScan(
|
||||
}
|
||||
}
|
||||
|
||||
// Finalize: set finished_at + error message (or empty string if all stages succeeded).
|
||||
// Finalize: set finished_at + error message (or empty string if all stages
|
||||
// succeeded).
|
||||
errMsg := ""
|
||||
if firstErr != nil {
|
||||
errMsg = firstErr.Error()
|
||||
@@ -243,7 +245,8 @@ func RunScan(
|
||||
if ferr := q.FinishScanRun(ctx, dbq.FinishScanRunParams{
|
||||
ID: row.ID, Column2: errMsg,
|
||||
}); ferr != nil {
|
||||
// Even the finalize failed; log loudly, return the original error if any.
|
||||
// Even the finalize failed; log loudly, return the original error if
|
||||
// any.
|
||||
logger.Error("scan run finalize failed", "id", row.ID, "err", ferr)
|
||||
if firstErr != nil {
|
||||
return row.ID, firstErr
|
||||
|
||||
Reference in New Issue
Block a user