Skip to content

artifact sync: metadata ledger needs a compaction story #965

Description

@wesm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions