gabriel / muse public
test dev
AI Agent gabriel · 163 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
+6 ~2 symbols
sha256:eb5c4b2a7f0ef0561c708bb5d89b4099cdca41d48986a5aee65ebdb13c85f4a6 snapshot
+6
symbols added
~2
symbols modified
0
dead code introduced
Semantic Changes 8 symbols
~ tests/test_stress_merge_regression.py .py 6 symbols added, 2 symbols modified
+ TestFalseConflictTheirsOnlyI class class TestFalseConflictTheirsOnlyI L1294–1481
+ test_I1_theirs_only_addition_not_in_conflict_list method method test_I1_theirs_only_addition_not_in_conflict_list L1297–1329
+ test_I2_theirs_only_addition_lands_on_disk method method test_I2_theirs_only_addition_lands_on_disk L1331–1365
+ test_I3_merge_succeeds_cleanly_when_ours_equals_base_snapshot method method test_I3_merge_succeeds_cleanly_when_ours_equals_base_snapshot L1367–1397
+ test_I4_multiple_theirs_only_files_no_conflict_when_ours_equals_base method method test_I4_multiple_theirs_only_files_no_conflict_when_ours_equals_base L1399–1433
+ test_I5_partial_merged_manifest_must_include_theirs_only_files_on_conflict method method test_I5_partial_merged_manifest_must_include_theirs_only_files_on_conflict L1435–1481
~ _h
← 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"