gabriel / musehub public
refactor task/phase3-db-walk-dag-async #1 / 1
AI Agent gabriel · 123 days ago · May 9, 2026 · Diff

refactor: replace DB-query BFS with walk_dag_async (issue #40 phase 3)

Migrate all Category B (async DB-query) inline walk sites to walk_dag_async: - _walk_new_commits (musehub_symbol_indexer): two DFS branches (stop_at and bulk) replaced with walk_dag_async + async adjacency closures - _resolve_ancestor_manifest (musehub_proposals): depth-limited while-frontier and while-fid walks replaced with two walk_dag_async calls (max_nodes=200) - _is_ancestor_db (musehub_wire): batched while-frontier BFS replaced with walk_dag_async + scalar_one_or_none adjacency (max_nodes=max_hops)

Add 9 TDD tests (P3-1 through P3-9): 4 structural + 5 behavioural. All 28 unit tests across phases 1-3 green.

sha256:d226e4e736f25f8e3f7182f6ed791be3dbf9eef202bad61d980e449a697194a9 sha
+21 ~3 symbols
sha256:e5a021c99afbbbfcb78189ee70d4e7c36a94edce509afba754d6aa13f1fdb0a4 snapshot
+21
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 24 symbols
+ _TZ variable variable _TZ L96–96
+ _commit function function _commit L103–111
+ _exec_result function function _exec_result L114–120
+ _ts function function _ts L99–100
+ AsyncMock import import AsyncMock L22–22
+ MagicMock import import MagicMock L22–22
+ SimpleNamespace import import SimpleNamespace L21–21
+ annotations import import annotations L17–17
+ datetime import import datetime L19–19
+ inspect import import inspect L20–20
+ patch import import patch L22–22
+ pytest import import pytest L24–24
+ test_p3_1_walk_new_commits_uses_walk_dag_async function function test_p3_1_walk_new_commits_uses_walk_dag_async L31–41
+ test_p3_2_resolve_ancestor_manifest_uses_walk_dag_async function function test_p3_2_resolve_ancestor_manifest_uses_walk_dag_async L48–58
+ test_p3_3_resolve_ancestor_manifest_no_while_fid function function test_p3_3_resolve_ancestor_manifest_no_while_fid L65–72
+ test_p3_4_is_ancestor_db_uses_walk_dag_async function function test_p3_4_is_ancestor_db_uses_walk_dag_async L79–89
+ test_p3_5_walk_new_commits_with_stop_at function async_function test_p3_5_walk_new_commits_with_stop_at L128–150
+ test_p3_6_walk_new_commits_no_stop_at function async_function test_p3_6_walk_new_commits_no_stop_at L158–177
+ test_p3_7_resolve_ancestor_manifest_finds_lca function async_function test_p3_7_resolve_ancestor_manifest_finds_lca L185–223
+ test_p3_8_is_ancestor_db_true function async_function test_p3_8_is_ancestor_db_true L231–250
+ test_p3_9_is_ancestor_db_max_hops_cap function async_function test_p3_9_is_ancestor_db_max_hops_cap L258–280
← Older Oldest on task/phase3-db-walk-dag-async
All commits
Newer → Latest on task/phase3-db-walk-dag-async

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