feat(mwp2): Phase 1 — extract _walk_commit_delta_dag, remove if-True guard
MWP2_04: Promote the dead legacy walk (lines 159-184) to a top-level _walk_commit_delta_dag(session, starts, have_set) helper. Removes the 'if True:' dead-code guard from _walk_commit_delta; the fast-path body is now the direct function body (un-indented one level). The helper: - Walks MusehubCommit.parent_ids via walk_dag_async (authoritative DAG) - Bounded by max_nodes=100_000 with a WARNING log if the cap is hit - Kahn's topo-sort: returns parents-first so every commit precedes its children (BFS order is children-first; the sort is required for correct sequential client apply) - Returns _CommitDeltaMap of MusehubCommit rows (no extra bulk fetch)
MWP2_05 GREEN: _walk_commit_delta_dag returns complete closure {C1,C2,C3} with snapshot_id and parent_ids correctly populated from musehub_commits.
MWP2_06 GREEN: Kahn's sort produces parents-first dict order — idx[C1] < idx[C2] < idx[C3] in a linear C1<-C2<-C3 chain.
MWP2_01, MWP2_02 still RED — fallback is not yet wired into _walk_commit_delta (Phase 2 detection + dispatch).
musehub#107 / muse#58
Semantic Changes
6 symbols
0 comments
muse hub commit comment sha256:d984bd63c5abb64309fc91547bb884fe8a7e08820bae6f2b13957cee07584221 --body "your comment"
No comments yet. Be the first to start the discussion.