gabriel / musehub public
test mwp2 task/mwp-2-walk-fallback #6 / 6
AI Agent gabriel · 25 days ago · Jun 29, 2026 · Diff

test(mwp2): Phase 0 RED — reproduction tests for _walk_commit_delta BFS dead-end (RC-2)

MWP2_01 RED: interior graph row missing for C3 in a C1←C2←C3←C4 chain. Graph has C1(gen=0), C2(gen=1), C4(gen=3) — C3 absent. BFS from C4 follows parent pointer to C3, finds no graph entry (empty parents default), stops. C2 and C1 never reachable. Result: {C4, C3}.

MWP2_02 RED: want tip C3 has no graph row in a C1←C2←C3 chain. max_want_gen=0 (C3 absent → query returns None → default 0). Range scan gen=(-1,0] returns only C1. BFS from C3 finds no parents. Result: {C3} only.

MWP2_03 GREEN: fully consistent graph (C1=0, C2=1, C3=2) uses the fast path exclusively; walk_dag_async is never called. Pins the happy-path contract so later phases cannot accidentally degrade to always-fallback.

musehub#107 / muse#58

sha256:4dd2a937f66f8e36d9aa59bd1bf3cb880ca1d503fef67300a0cba3b482784081 sha
+24 symbols
1 changed · 982 in snapshot files
sha256:83a9cb877c9603cd474ec6569d16776f929382460924b224041747c313b45be5 snapshot
+24
symbols added
1
file changed
982
files in snapshot
0
dead code introduced
Semantic Changes 24 symbols
~ tests/test_mwp2_walk_fallback.py .py 24 symbols added
+ _OWNER variable variable _OWNER L53–53
+ _cid function function _cid L61–63
+ _now function function _now L71–72
+ _seed_commit function async_function _seed_commit L75–91
+ _seed_graph function async_function _seed_graph L94–109
+ _sid function function _sid L66–68
+ AsyncMock import import AsyncMock L39–39
+ AsyncSession import import AsyncSession L43–43
+ MagicMock import import MagicMock L39–39
+ MusehubCommit import import MusehubCommit L47–47
+ MusehubCommitGraph import import MusehubCommitGraph L47–47
+ _sa_delete import import _sa_delete L42–42
+ _walk_commit_delta import import _walk_commit_delta L51–51
+ annotations import import annotations L35–35
+ blob_id import import blob_id L46–46
+ datetime import import datetime L37–37
+ hash_snapshot import import hash_snapshot L45–45
+ logging import import logging L38–38
+ patch import import patch L39–39
+ pytest import import pytest L41–41
+ select import import select L42–42
+ test_mwp2_01_corrupt_generation_truncates_walk function async_function test_mwp2_01_corrupt_generation_truncates_walk L118–176
+ test_mwp2_02_missing_start_tip_graph_row function async_function test_mwp2_02_missing_start_tip_graph_row L185–230
+ test_mwp2_03_consistent_graph_uses_fast_path function async_function test_mwp2_03_consistent_graph_uses_fast_path L239–298
Files Changed
+1
982 in snapshot

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