gabriel / muse public
test dev
AI Agent gabriel · 60 days ago · Apr 17, 2026 · Diff

test: TDD data integrity — fix sha256: prefix in merge regression test helpers + add I-category false-conflict tests

Two systemic fixes to test_stress_merge_regression.py:

1. _write_object: was storing objects without sha256: prefix; validate_object_id now requires the prefix, causing all tests in categories A-H to error rather than exercising any merge logic. Fixed to use muse.core.object_store.write_object.

2. _h: fake hash helper was returning bare hex; changed to return sha256:<hex> so fake manifests pass validate_object_id in the merge engine.

Category I — False-conflict regression (5 new tests): I1: theirs-only addition not in conflict list when ours==base snapshot I2: theirs-only file lands on disk after clean merge I3: merge status is 'merged'/'fast_forward', never 'conflict' for theirs-only additions I4: multiple theirs-only additions all excluded from conflict list I5: even when genuine conflict exists, theirs-only files survive on disk

Root incident: muse/core/patch_record.py was falsely reported as a conflict and deleted from disk during a dev→main merge where main's HEAD snapshot was identical to the merge base (repeated merge pattern). Tests I1-I5 guard this invariant permanently.

sha256:634c6605409e2a2385d46b3c54b5e69e79e087d3affc9d0ffb1343d58d088dea sha
sha256:eb5c4b2a7f0ef0561c708bb5d89b4099cdca41d48986a5aee65ebdb13c85f4a6 snapshot
← 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:634c6605409e2a2385d46b3c54b5e69e79e087d3affc9d0ffb1343d58d088dea --body "your comment"