Skip to content

check: report snapshot items affected by missing packs #122

@m3nu

Description

@m3nu

Follow-up from #121. Today vykar check reports [chunk index] pack <id> missing from storage, but it does not tell the user which snapshot items reference chunks from that missing pack.

Goal:

  • When one or more packs are missing, report the affected snapshot item paths before the user runs repair.
  • Reuse the analysis in check --repair --dry-run so the repair plan shows the concrete item-level impact, not only pack ids.
  • Keep healthy repositories cheap: avoid retaining per-item chunk references for all items unless missing packs were found.

Likely implementation:

  • Build the missing pack set from the pack existence check.
  • Cross-reference missing pack ids to chunk ids via the chunk index.
  • Walk snapshot items and emit an item-level issue for items whose chunk_ref.id maps to a missing pack.
  • Prefer either checking pack existence before the item walk, or doing a second item pass only when missing packs exist.

Acceptance criteria:

  • vykar check still emits the pack-level missing-pack error.
  • It also lists affected snapshot/item paths for chunks that reference missing packs.
  • check --repair --dry-run includes the same item impact information.
  • Tests cover one missing pack referenced by one or more snapshot items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions