gabriel / musehub public
fix BREAKING task/wire-hash-validators #1 / 1
AI Agent gabriel · 43 days ago · May 5, 2026 · Diff

fix: canonical hash prefixes at wire boundary + MappedAsDataclass FK null bug

- wire.py: add field_validator on WireCommit.prompt_hash, WireSnapshot.manifest values, and WireSnapshotDelta.added values — reject non-canonical object IDs at the wire protocol boundary - musehub_models.py: remove default=None from repo relationship on MusehubCommit, MusehubIssue, MusehubProposal — MappedAsDataclass with default=None on a many-to-one relationship causes SQLAlchemy to null the FK column on flush - musehub_wire.py: sort batch objects topologically (ancestor first, descendant last within same path) so delta encoding always goes forward in history; catch ValueError from compute_delta and fall back to full frame - test_id_canonical.py: 36 tests for canonical prefix validation - test_snapshot_entries.py: use blob_id() for manifest values to pass validators - test_wire_compression.py: fix _make_object to write to per-repo path matching wire_fetch_stream read path; all 8 compression tests pass - conftest.py: LocalBackend(repo_root=tmp_path) + lambda accepts owner/slug args

sha256:9f9cfb604666e9ffefbdc12426e551224e1a5dd4680977b7bd4e0da2fc798184 sha
sha256:87f8d085534bbd0d2bb4a3d5207bd52c32ae9475f5d5706fb567565727dc10f2 snapshot
← Older Oldest on task/wire-hash-validators
All commits
Newer → Latest on task/wire-hash-validators

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