gabriel / musehub public
fix patch wire-push feat/fix-object-refs-on-repush #4 / 4
AI Agent gabriel · 5 days ago · Jun 8, 2026 · Diff

fix(wire-push): write object_refs and mpack_index for all mpack objects on repush

Bug A: _upsert_object_refs was called with _new_oids (globally-new only), so repos pushing pre-existing objects got zero object_refs rows. Fix: call with _cc_oids (all objects in the mpack) so every repo gets its own object_refs rows regardless of whether objects are globally new.

Bug B: inline mpack_index byte-range inserts had the same _new_oids filter and used session.add_all which has no ON CONFLICT clause. Fix: use _pg_insert with ON CONFLICT DO UPDATE (byte_offset IS NULL guard) covering all _cc_oids so byte ranges are written even on repush.

Also repairs a stale orphaned list-comprehension fragment on line 549 that caused an IndentationError and prevented the module from loading.

ORP-1 through ORP-5 all green.

sha256:8ba2515ec3cb2a4089d54422f342b5a47161df29d5db72cb7356591d128fba6a sha
~1 symbols
1 changed · 966 in snapshot files
sha256:194f41a1ddfb02d4692307c260a4ab534afacc5a5bf65699d05337d5ddb67cd9 snapshot
~1
symbol modified
1
file changed
966
files in snapshot
0
dead code introduced
Semantic Changes 1 symbol
+ docs/
+ src/
+ tests/
+ tools/
Files Changed
~1
966 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:8ba2515ec3cb2a4089d54422f342b5a47161df29d5db72cb7356591d128fba6a --body "your comment"