Follow-up from #731 review.
Metadata events under meta/ are deliberately never garbage-collected (scanGCCandidates skips them), which is correct for purge tombstones — they must outlive the artifacts they suppress — but means the ledger grows without bound with every rename/star/pin across the fleet's lifetime. Replay also rescans and re-validates every metadata artifact on every sync (readMetadataArtifacts), deduping only via the metadata_applied_events table, so replay cost is O(all events ever) per run. A write-only import watermark was removed in #731 follow-up commits; a real read-side skip or periodic ledger snapshot/compaction (preserving tombstones) is the durable fix.
Relevant code: internal/artifact/replay.go, internal/artifact/gc.go.
Follow-up from #731 review.
Metadata events under
meta/are deliberately never garbage-collected (scanGCCandidatesskips them), which is correct for purge tombstones — they must outlive the artifacts they suppress — but means the ledger grows without bound with every rename/star/pin across the fleet's lifetime. Replay also rescans and re-validates every metadata artifact on every sync (readMetadataArtifacts), deduping only via themetadata_applied_eventstable, so replay cost is O(all events ever) per run. A write-only import watermark was removed in #731 follow-up commits; a real read-side skip or periodic ledger snapshot/compaction (preserving tombstones) is the durable fix.Relevant code:
internal/artifact/replay.go,internal/artifact/gc.go.