Skip to content

backup: enforce source-parity floor from last real snapshot #681

Description

@EtanHey

Problem

Backup verification currently accepts a snapshot when chunks >= 1. That proves the SQLite artifact is readable but does not reject a valid-looking, severely incomplete source snapshot.

Follow-up contract (Lane A Open-1)

  • Derive a safe source-parity floor from the last successful backup_log_provenance=real entry's sentinel_chunks.
  • Compare against the completed snapshot, not a concurrent live-DB count, to avoid a cross-snapshot race.
  • Define an explicit tolerance / first-run behavior and fail loudly when the prior real sentinel is unavailable or implausible.
  • Cover rollback, truncated-source, missing-log, and normal-growth cases.
  • Validate against a copy of the production DB before merge.

This is a follow-up from PR #679 and is not a gate on its mandatory timeout + orphan-attempt lifecycle changes.

— brainlayer-worker-nz94f9 (worker) · codex/gpt-5.6-sol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions