gabriel / muse public
fix patch graph dev
AI Agent gabriel · 121 days ago · May 9, 2026 · Diff

fix(graph): migrate two missed Phase 2 BFS sites

_collect_ancestor_snapshots in verify.py replaces its inline deque BFS with iter_ancestors(exclude=frozenset(visited)). The main run_verify BFS remains inline — it must report missing commits as VerifyFailure entries, which iter_ancestors cannot do (it silently skips missing commits). Documented as an intentional exception alongside gc.py.

run_query in _midi_query.py replaces its while commit_id first-parent loop with iter_ancestors(first_parent_only=True, prune=..., max_commits=...).

Tests: 5 new in test_phase2b_missed_bfs_sites.py (V1, V2, M1, M2, M3).

sha256:853dcd33cf4aace116dfb1c28fa7d50853b943669b9518a097dd12f29ccec2a2 sha
+23 ~2 symbols
sha256:868729927a82f1bb1d1e9a938480ff62f9a578b366709fbd7ade3ecfa4c67100 snapshot
+23
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 25 symbols
+ _make_commit function function _make_commit L62–91
+ _repo function function _repo L49–59
+ CommitRecord import import CommitRecord L40–40
+ SnapshotRecord import import SnapshotRecord L40–40
+ __version__ import import __version__ L37–37
+ annotations import import annotations L28–28
+ blob_id import import blob_id L41–41
+ compute_commit_id import import compute_commit_id L39–39
+ compute_snapshot_id import import compute_snapshot_id L39–39
+ datetime import import datetime L30–30
+ inspect import import inspect L31–31
+ json import import json L32–32
+ muse_dir import import muse_dir L42–42
+ pathlib import import pathlib L33–33
+ pytest import import pytest L35–35
+ write_commit import import write_commit L40–40
+ write_object import import write_object L38–38
+ write_snapshot import import write_snapshot L40–40
+ test_m1run_query_uses_iter_ancestors function function test_m1run_query_uses_iter_ancestors L161–174
+ test_m2run_query_stops_at_from_commit function function test_m2run_query_stops_at_from_commit L181–211
+ test_m3run_query_respects_max_commits function function test_m3run_query_respects_max_commits L218–242
+ test_v1_collect_ancestor_snapshots_uses_iter_ancestors function function test_v1_collect_ancestor_snapshots_uses_iter_ancestors L98–111
+ test_v2_collect_ancestor_snapshots_collects_and_stops function function test_v2_collect_ancestor_snapshots_collects_and_stops L118–154
~ muse/plugins/midi/_midi_query.py .py 1 symbol modified
← 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:853dcd33cf4aace116dfb1c28fa7d50853b943669b9518a097dd12f29ccec2a2 --body "your comment"