gabriel / musehub public
refactor BREAKING task/phase2-inMemory-walk-dag #1 / 1
AI Agent gabriel · 128 days ago · May 9, 2026 · Diff

refactor: replace in-memory BFS with walk_dag (issue #40 phase 2)

Migrate all in-memory BFS/DFS walks to muse.core.graph.walk_dag: - CouplingProvider.compute: deque loop → walk_dag list comprehension - EntangleProvider.compute: deque loop → walk_dag list comprehension - VelocityProvider.compute: deque loop → walk_dag list comprehension - run_gc reachability: while-queue → walk_dag set comprehension - _is_fast_forward: while-frontier → walk_dag early-return loop - _is_ancestor_in_bundle: while-frontier → walk_dag with _bundle_adj closure - find_common_ancestor: while-frontier → walk_dag set construction

Add 12 TDD tests (P2-1 through P2-12): 7 structural + 5 behavioural.

sha256:709f9471799e1065a33cd56698eb37b187ade1d172f993efeab5a25ec8d64a02 sha
+19 ~10 symbols
sha256:6da6644ceb822f6d2596eea3037078b16f2f66358dbb5c746cda6174734c73f0 snapshot
+19
symbols added
~10
symbols modified
0
dead code introduced
Semantic Changes 29 symbols
+ _make_commit_input function function _make_commit_input L152–154
+ _make_musehub_commit function function _make_musehub_commit L166–170
+ _make_wire_commit function function _make_wire_commit L157–163
+ SimpleNamespace import import SimpleNamespace L22–22
+ annotations import import annotations L19–19
+ inspect import import inspect L21–21
+ pytest import import pytest L24–24
+ test_p2_10_is_ancestor_in_bundle_true function function test_p2_10_is_ancestor_in_bundle_true L214–226
+ test_p2_11_is_ancestor_in_bundle_false function function test_p2_11_is_ancestor_in_bundle_false L233–244
+ test_p2_12_find_common_ancestor_diamond function function test_p2_12_find_common_ancestor_diamond L251–276
+ test_p2_1_coupling_provider_uses_walk_dag function function test_p2_1_coupling_provider_uses_walk_dag L31–42
+ test_p2_2_entangle_provider_uses_walk_dag function function test_p2_2_entangle_provider_uses_walk_dag L49–59
+ test_p2_3_velocity_provider_uses_walk_dag function function test_p2_3_velocity_provider_uses_walk_dag L66–76
+ test_p2_4_run_gc_uses_walk_dag function function test_p2_4_run_gc_uses_walk_dag L83–94
+ test_p2_5_is_fast_forward_uses_walk_dag function function test_p2_5_is_fast_forward_uses_walk_dag L101–111
+ test_p2_6_is_ancestor_in_bundle_uses_walk_dag function function test_p2_6_is_ancestor_in_bundle_uses_walk_dag L118–128
+ test_p2_7_find_common_ancestor_uses_walk_dag function function test_p2_7_find_common_ancestor_uses_walk_dag L135–145
+ test_p2_8_is_fast_forward_true function function test_p2_8_is_fast_forward_true L177–189
+ test_p2_9_is_fast_forward_false function function test_p2_9_is_fast_forward_false L196–207
~ musehub/services/musehub_gc.py .py 1 symbol modified
~ run_gc
← Older Oldest on task/phase2-inMemory-walk-dag
All commits
Newer → Latest on task/phase2-inMemory-walk-dag

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:709f9471799e1065a33cd56698eb37b187ade1d172f993efeab5a25ec8d64a02 --body "your comment"