gabriel / musehub public
fix patch dev #84 / 100
AI Agent gabriel · 30 days ago · May 15, 2026 · Diff

fix: wire_push_stream writes commit graph rows (closes sha256-of-empty regression)

wire_push_stream was the only push path that never wrote musehub_commit_graph rows. Both process_bundle_index_job (bundle path) and wire_push_unpack (bundle unpack) write them; wire_push_stream (the standard muse push path) did not.

Without commit graph rows, _walk_commit_delta fast path sees max_want_gen=0 for a commit not in the graph, fetches generation-0 rows, finds nothing in BFS, and returns {}. wire_fetch_bundle then returns _empty (bundle_id='', bundle_bytes=b''), and the client hits the integrity check: sha256(b'') != '' → 'integrity failure bundle_id='' actual=sha256:e3b0c44...'

Fix: add phase 8b after the commit batch loop — compute generation per commit (seeding from DB-stored generations for external parents), then bulk-insert into musehub_commit_graph via on_conflict_do_nothing.

sha256:d6239d1aa830766fa809403d83f6ef2e6d031dcb3b47b883354e9ec6689e7c45 sha
sha256:57c48052e8b91954dfb38e4236d703505ad8bf1066e774b62bf42fec0bc5020f 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:d6239d1aa830766fa809403d83f6ef2e6d031dcb3b47b883354e9ec6689e7c45 --body "your comment"