gabriel / musehub public
feat patch push dev
AI Agent gabriel · 156 days ago · Apr 23, 2026 · Diff

feat(push): Phase 6 — ingest transaction model

Snapshot referential integrity (Phase C): server now rejects pushes where a snapshot manifest references an object not in the push bundle and not in storage. Prevents dangled commits that can never be fetched.

Explicit rollback coverage (Phase D): session.rollback() added before all post-loop error paths (quota exceeded, unsigned commits) to complement the existing rollbacks on unknown parent and non-fast-forward errors.

_objects_in_push set tracks IDs of every object received in this push so the integrity check can distinguish 'in this bundle' from 'must be in DB'.

T12 TDD tests (3 tests, 57 total): P6A: missing snapshot object rejected 422 P6B: object from prior push accepted (already-in-storage path) P6C: branch head unchanged after rejected push (atomicity)

_make_commit helper updated: populates parent_commit_id/parent2_commit_id from parent_ids list so WireCommit validation sees proper parent links.

sha256:7707ea776a83cc570afb5582ab331a30e794ce8994ecadacf8ab3ff3daab66e0 sha
+3 ~2 symbols
sha256:66ca4a152d0c348b793e7fb4de22f849d6301da8905ae8527727657f4781bfdb snapshot
+3
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 5 symbols
~ tests/test_wire_push_stream.py .py 3 symbols added, 1 symbol modified
+ test_t12_p6a_snapshot_missing_object_rejected function async_function test_t12_p6a_snapshot_missing_object_rejected L1214–1245
+ test_t12_p6b_snapshot_object_from_prior_push_accepted function async_function test_t12_p6b_snapshot_object_from_prior_push_accepted L1249–1297
+ test_t12_p6c_failed_push_leaves_branch_unchanged function async_function test_t12_p6c_failed_push_leaves_branch_unchanged L1301–1358
← Older Oldest on dev
All commits
Newer → Latest on dev

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