Reversible clean-root candidate rebuilt from oak/benchmarks main@009dead264ca; original repository retained.

mrmrs-15c4c5

mrmrs-15c4c5Closedinto main

3 commits · 20 files · +19 added · ~1 modified

Description

P3 merge correctness & quality suite (suites/merge): differential git merge-ort vs Oak merge engine

What

  • New self-contained suite under suites/merge/ (stdlib Python, ADR-0001). No changes to core harness (lane P1 files untouched).
  • Oak path exercised (phase 1): oak pull parent-sync = Oak client merge engine, driven end-to-end via oak clone <git> import, oak push to a local oak serve, oak commit, oak fetch, oak merge --dry-run --json (prediction), oak pull --json; conflicts measured as the committed result after a sentinel --continue. A small RawShim supplies the /raw route oak serve 0.105 lacks (bytes via oak file inspect) and can stage main's head for multi-step scenarios. HostedMergeAdapter = phase-2 plug point for oakspace server merge (not built).
  • Oracle: real git (xcrun shim resolved via oakbench.subjects) merge-tree --write-tree -z --messages: tree + conflict paths/types.
  • Classes per directional case: equal-to-git / differs-but-valid / oak-wrong / oak-unsupported / harness-error. Laws: no-lost-change, symmetry, idempotence, false/missed conflict rate, prediction agreement. JSONL rows (merge_suite_schema_version 1, evidence_class diagnostic_merge_correctness).
  • Sources: gitoxide gix-merge tree/cartesian/text baselines vendored VERBATIM (MIT OR Apache-2.0, upstream acf906f8, LICENSE-MIT/APACHE + NOTICE + sha256-pinned UPSTREAM.json); git t6423 (17 cases) / t6422 (4) re-implemented from comment prose, IDs cited, no GPL text; native incident shapes (stale base C vs X with partial graph, merge base via merge parent, revert after CLI sync, lineage-less sync, criss-cross tie-break x2, clock-skew + control, t6416 criss-cross modify/delete); 40 seeded generated histories. Phase-2 hosted specs (M0a, M0b, server /sync, client-vs-server tie-break, server skew, fb-530) listed, not executed.
  • tests/test_merge_suite.py: 39 hermetic instrument tests (classifier negative controls, law checks, oracle parsing, builder, vendoring byte-identity, no-GPL-text guard).

First run vs oak 0.105.0, final after QA rounds 1+2 (suites/merge/RESULTS-2026-09-28.md; worker runs/full4.jsonl): 762 cases / 387 scenarios: 328 equal-to-git, 134 differs-but-valid, 70 oak-wrong, 230 oak-unsupported (210 = gitlink matrix), 0 harness-error. Laws: idempotent 337/337, no-lost-change 460/491, symmetric 428/468, prediction agrees 494/532 (all 38 misses are failed pulls; 19 predicted clean), false-conflict 42/494 (8.5%), missed-conflict 136/494 (27.5%; 104 rename/dir-rename). Oak-wrong rows all map to filed bugs (fb-537..541, filed by o-4d 2026-09-28 from QA standalone repros) with strict rules (every reason on a row must match the same bug; exact error signatures; pinned expected_rows with new/vanished reporting): fb-540 F5 file<->dir pull fails (38; 24 violate "failed sync => worktree matches HEAD": 11 moved HEAD over a pre-merge worktree, 13 left a half-merged worktree with HEAD unchanged); fb-537 markers committed clean when an input lacks a final newline, incl. the binary case (13); fb-538 symlink targets text-merged with glued markers (8); fb-539 mode change silently lost (10); fb-541 criss-cross divergent resolutions (1). All 5 reproduce exactly as pinned; 0 unmapped.

QA round 1 (12 findings) and round 2 (R2-1 strict known-bug mapping + setup failures as harness-error + escape-route tests; R2-2 failed_pull_left_worktree_dirty invariant; R2-3 attribution wording) resolved. --resummarize RUN.jsonl re-evaluates bug mapping without running Oak.

Run: python3 suites/merge/run_merge_suite.py --workdir runs/merge --summary runs/merge-summary.json > runs/merge.jsonl Tests: python3 -m unittest discover -s tests

Commits3

docs/prior-art.mdmodifiedView file

@@ -3,7 +3,27 @@
33 This page records prior-art influence without importing another project's
44 benchmark implementation. The suite may learn from behavior categories,
55 reporting vocabulary, and measurement controls, but it must not vendor external
6-benchmark code or translate external shell scripts into local Python.
6+benchmark code or translate external shell scripts into local Python, except
7+for the recorded exception below.
8+
9+## Recorded Exception: gitoxide merge baselines (2026-09-28)
10+
11+`suites/merge/vendor/gitoxide/` vendors three gix-merge fixture scripts
12+(`tree-baseline.sh`, `tree-cartesian-baseline.sh`, `text-baseline.sh`)
13+verbatim from gitoxide commit `acf906f8fcdb8e8d143570737786543dc5a204a0`.
14+
15+- License: MIT OR Apache-2.0 (permissive). Both license texts and a `NOTICE`
16+ are carried next to the scripts. The SHA-256 of each script is pinned in
17+ `UPSTREAM.json` and checked by `tests/test_merge_suite.py`.
18+- Rationale: the scripts are a curated, upstream-maintained catalogue of
19+ merge-ort edge cases, including an exhaustive 14x14 operation product.
20+ Re-deriving them would lose that coverage and add transcription risk. They
21+ are only executed with real Git to build fixture repositories. Git's own
22+ merge-ort computes the reference result, and no gitoxide code runs in the
23+ measured path.
24+- Scope: this exception covers only these files. GPL sources, including
25+ Git's t64xx merge tests, stay clean-room: shapes are re-expressed from
26+ testcase prose and cited by ID, and no text is copied.
727
828 ## Clean-Room Rule
929