gabriel / muse public
feat patch verify-pack dev
AI Agent gabriel · 61 days ago · Apr 18, 2026 · Diff

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

sha256:249d174c6efc1b9e7563058988b02c6013f607a26f9851e7628d551bffef9373 sha
sha256:21566bb7d8680bd54a63686081578d7c3397613979b45ba58b26deb02debec33 snapshot
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:249d174c6efc1b9e7563058988b02c6013f607a26f9851e7628d551bffef9373 --body "your comment"