feat(verify-pack): Phase 1 — promised object awareness + --strict flag
Fixes the false-positive failure storm on partial-clone repos.
Root cause: verify-pack treated any object absent from the bundle AND absent from the local store as a failure. In a partial-clone repo, historical objects are legitimately absent locally but promised by a promisor remote — muse verify already handles this correctly via the PRESENT/PROMISED/MISSING tristate; verify-pack did not.
Changes: - Import ObjectState, load_promisor_remotes, object_state from muse.core.object_availability (same module used by muse verify) - Load promisor remotes once at run() startup when root is available - Snapshot manifest check now uses the three-state model: PRESENT → pass (exists and hash-verified locally) PROMISED → increment promised_count, skip (unless --strict) MISSING → failure (no known recovery path) - Add promised_objects: int to _VerifyPackResult TypedDict and JSON output - Add --strict flag: treats PROMISED as MISSING (full self-containment) - Update module docstring with object availability model section - 17 new tests in TestPromisedObjects covering all three states, --strict mode, mixed present/promised/in-bundle scenarios, quiet mode
Live result on muse repo (partial clone with 3 promisor remotes): Before: 68,539 failures (all false positives) After: 0 failures, 68,539 promised_objects, all_ok=true
0 comments
muse hub commit comment sha256:249d174c6efc1b9e7563058988b02c6013f607a26f9851e7628d551bffef9373 --body "your comment"
No comments yet. Be the first to start the discussion.