gabriel / musehub public
refactor BREAKING task/phase4-load-commit-walk #1 / 1
AI Agent gabriel · 40 days ago · May 9, 2026 · Diff

refactor: extract _load_commit_walk helper, dedup intel provider BFS (issue #40 phase 4)

Extract shared DB-fetch + walk_dag BFS body from the three intel providers into a single module-level helper _load_commit_walk(session, repo_id, ref, max_walk) -> list[str]. Each provider's compute now calls the helper instead of repeating the 15-line fetch+walk block.

Update P2-1 through P2-3 structural tests to accept either walk_dag or _load_commit_walk in the provider source (Phase 4 moved the walk into the helper, so the method itself no longer contains walk_dag directly).

Add 5 TDD tests (P4-1 through P4-3): 3 structural (one per provider) + 2 behavioural (BFS order and max_walk cap on _load_commit_walk). All 33 unit tests across phases 1-4 green.

sha256:40b051e70befc99fc8e2689162b63ac1aca0bc0129c18553d5530e50e9bd2eec sha
sha256:7428db0bad38daa3e9b1468b60ead0ba1d9e43503e48c9df3ce58f2c4c4f38ba snapshot
← Older Oldest on task/phase4-load-commit-walk
All commits
Newer → Latest on task/phase4-load-commit-walk

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:40b051e70befc99fc8e2689162b63ac1aca0bc0129c18553d5530e50e9bd2eec --body "your comment"