gabriel / musehub public
fix patch task/proposal-models-v2 #9 / 19
AI Agent gabriel · 132 days ago · May 8, 2026 · Diff

fix: Phase-C trusts content-addressed chain for previously-committed objects

Objects with an object_ref for the repo were verified when committed — the content-addressed chain (snapshot_id = hash(manifest)) is ground truth. Phase-C now skips the storage check for those objects entirely, only verifying objects that are new to the repo and not in the push bundle.

This fixes pushes that failed when old committed snapshots referenced objects that were later lost from storage: the new snapshot inherits the old files but Phase-C no longer re-checks them.

Layers covered: L6.1 — already-committed snapshot trusted, push passes L6.2 — new snapshot inheriting ghost from old commit passes L6.3 — truly-missing object (no object_ref, not in bundle) still rejected L6.4 — mixed push (old ghosts + new objects) passes

P3.2 / P5.6 updated to test the never-committed ghost case (DB row with no object_ref) which Phase-C still rejects via the ghost guard.

sha256:7bd79167159ccf7e5a18936dc5ff246c8ea650d2a1d2fd3b79860e26f607fb02 sha
+55 ~4 −3 symbols
sha256:fcc5d2c627ef1a8d77dc7cbf4479cff1f3c7691f3654e3f1fd550e1181efe149 snapshot
+55
symbols added
~4
symbols modified
−3
symbols removed
0
dead code introduced
Semantic Changes 62 symbols
~ tests/test_phase_c_scope.py .py 39 symbols added
+ SFRAME_ERROR variable variable SFRAME_ERROR L43–43
+ _body_iter function async_function _body_iter L91–92
+ _collect_frames function async_function _collect_frames L95–102
+ _commit_pack_frame function function _commit_pack_frame L78–81
+ _commit_wire function function _commit_wire L120–126
+ _end_frame function function _end_frame L74–75
+ _fw variable variable _fw L44–44
+ _header_frame function function _header_frame L67–71
+ _insert_ghost_object function async_function _insert_ghost_object L154–164
+ _insert_snapshot_row function async_function _insert_snapshot_row L136–150
+ _now function function _now L51–52
+ _o_frame function function _o_frame L84–88
+ _pack function function _pack L59–60
+ _push_stream_bytes function function _push_stream_bytes L105–117
+ _snap_wire function function _snap_wire L129–133
+ _uid function function _uid L55–56
+ _wrap function function _wrap L63–64
+ AsyncSession import import AsyncSession L30–30
+ MuseWireFrameWriter import import MuseWireFrameWriter L32–32
+ SFRAME_COMMIT_PACK import import SFRAME_COMMIT_PACK L35–35
+ SFRAME_END import import SFRAME_END L35–35
+ SFRAME_HEADER import import SFRAME_HEADER L35–35
+ SFRAME_OBJECT import import SFRAME_OBJECT L35–35
+ annotations import import annotations L21–21
+ blob_id import import blob_id L33–33
+ create_repo import import create_repo L41–41
+ datetime import import datetime L24–24
+ db import import db L34–34
+ fake_id import import fake_id L33–33
+ msgpack import import msgpack L26–26
+ pg_insert import import pg_insert L29–29
+ pytest import import pytest L27–27
+ select import import select L28–28
+ timezone import import timezone L24–24
+ zlib import import zlib L23–23
+ test_L6_1_phase_c_skips_already_committed_snapshot function async_function test_L6_1_phase_c_skips_already_committed_snapshot L172–202
+ test_L6_2_fixed_phase_c_skips_committed_snapshots function async_function test_L6_2_fixed_phase_c_skips_committed_snapshots L210–258
+ test_L6_3_fixed_phase_c_rejects_missing_in_new_snapshot function async_function test_L6_3_fixed_phase_c_rejects_missing_in_new_snapshot L266–291
+ test_L6_4_fixed_mixed_push_passes function async_function test_L6_4_fixed_mixed_push_passes L299–356
~ GHOST_OBJECTS_INVESTIGATION.md .md 15 symbols added, 2 symbols removed, 2 symbols modified
Fix section Fix L433–450
code[python]@L437 variable variable code[python]@L437 L437–447
+ Fix (deployed ✅) section Fix (deployed ✅) L433–438
+ Status section Status L438–447
+ Layer 6 — Phase-C scope: new snapshots only section Layer 6 — Phase-C scope: new snapshots only L447–551
+ First principles section First principles L469–487
+ Fix section Fix L527–551
+ code[python]@L532 variable variable code[python]@L532 L532–551
+ Layer 6 tests section Layer 6 tests L497–527
+ code@L500 variable variable code@L500 L500–505
+ code@L507 variable variable code@L507 L507–512
+ code@L514 variable variable code@L514 L514–518
+ code@L521 variable variable code@L521 L521–526
+ py:2112–2114) section The code (musehub_wire.py:2112–2114) L456–469
+ code[python]@L458 variable variable code[python]@L458 L458–464
+ Two questions section Two questions L487–497
+ What we observed section What we observed L449–456
~ tests/test_push_presign_ghost_guard.py .py 1 symbol added, 1 symbol removed
test_P5_6_ghost_still_rejected_by_phase_c function async_function test_P5_6_ghost_still_rejected_by_phase_c L316–342
+ test_P5_6_never_committed_ghost_rejected_by_phase_c function async_function test_P5_6_never_committed_ghost_rejected_by_phase_c L316–350

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