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

Commit a3ea0659

a3ea065926c9Mergedfrom mrmrs-d5ae98

mrmrs · 1 month ago · 23 files · +14 added · ~9 modified

Description

P5 scale & coverage: every user-facing op timed (git vs oak), fresh/default/large/XL tiers, 14 core.yaml shapes runnable, git-sizer stats per fixture

Lane P5 of the benchmark program (worker /Users/mrmrs/o/worker-mrmrs-20260928T133154-p5-scale). New suite suites/scale plus a scale lane in the row contract. ALL timings are DEVELOPMENT-ONLY (evidence_class development_only_loaded_host, claim_eligible false, derived: no calibration record): the calibrated Oak-vs-Git campaign re-runs this machinery on a quiet host.

What it adds

  • 23 ops timed for git and oak with untimed oracles: clone.full, status.clean/dirty, diff.dirty, commit.dirty, push.branch, pull.ff, pull.diverged, merge.preview(+conflict), merge.local, merge.conflict, log.full, log.n, log.path, blame, switch.existing/back, branch.create, branch.list, gc (git gc / oak maintenance compact), review.branch_diff, file.show. Only ctx.timed() calls are measured; setup, dirty shapes and every oracle run outside the timed path. No equivalent -> skip row with a reason (oak has no blame; oak local merge unreachable; oak serve lacks merge-to-main).
  • Oracles read the fixture with git plumbing + the generator's own content function (worktree bytes, history/path-touch counts, branch paths, conflict counts) and label their evidence class (oracle_reader). Committed-state oracles (commit.dirty, pull.ff, pull.diverged, gc) use git cat-file for git and the independent stdlib reader (oak_sqlite_reader.committed_payloads) for Oak; a reader bound or unsupported format => oracle_ok null (unmeasured), never a pass. Oak rows (incl. ingest rows) carry binary_sha256 for publish_gate.
  • Tiers (t/perf fresh/default/large concept, re-implemented): fresh, default, large; XL axes behind --allow-xl: xl-history (100k commits), xl-tree (1M files), xl-deep (depth 40), xl-refs (10k branches + 2k tags), xl-bigblob (3 GiB, sparse-friendly), xl-combined (all axes; --allow-xl-combined).
  • shape:<id> / shapes: the 14 scenarios/core.yaml shapes (never run before) mapped to runnable fixtures via their fixture_shape; --shape-scale for dev runs.
  • Deterministic fast-import generator (1M files 10-16 s, 100k commits 23-39 s); identity = refs_sha256 pinned in config/fixtures.json for every tier except xl-combined, with a regeneration test.
  • git-sizer metric set re-implemented on git plumbing (MIT attribution: suites/scale/third_party/git-sizer/{NOTICE,LICENSE-MIT}, docs/prior-art.md); compact stats on every row.
  • Statistics: git, git_aa, oak_installed, oak_installed_aa interleaved (seeded shuffle per unit per run), per-cell A/A floors (oakbench.cellstats), MDE at 80% power for oak-vs-git and oak-vs-oak per cell; verdicts suppressed.
  • Transport: loopback HTTP both sides (oakbench.gitserver vs oak serve). Oak sync rows say oak_server_seed when the server had to be seeded with a one-commit snapshot (push caps; below).
  • Docs: suites/scale/README.md, docs/prior-art.md (git-sizer + t/perf op list/tiers, file names only), docs/benchmark-coverage.md, scenarios/scale.yaml (generated op catalog with tperf_refs).

Tests: python3 -m unittest discover -s tests -> 1453 tests OK (7 skipped) on the combined tree (main 76308956 + this branch; conflicts in rows.py / lane_contract.py / docs/prior-art.md resolved keeping both robustness and scale); tests/test_scale_suite.py 69 tests, tests/test_oak_sqlite_reader.py +4 (generator determinism + registry pins, sizer vs git, tiers/shapes, every op oracle pass+fail with canned subject output, row contract, git-only end-to-end schedule).

Oak findings (filed; standalone repros in the worker's repros/)

  • fb-549 HIGH clone/switch wall-bound ~10-25 ms per file with little CPU: every materialized file does 2x F_FULLFSYNC (materialize.rs:464 -> atomic_file.rs:113 temp-file sync_all + :143 parent-dir sync_all). Dev rows: clone 5k files 42-64 s vs git 0.5-1.3 s; 50k files depth 40 537 s vs 4 s. repros/oak-clone-switch-wall-vs-cpu.sh
  • fb-550 HIGH push admission caps: resolved manifest entries summed over every pushed commit (commits x files, cap 1M); a single 50,000-file commit is refused ("blobs total 50002"; real ceiling ~49,998 files); no split. repros/oak-push-admission-cap.sh
  • fb-551 MEDIUM oak log <path> / oak log -v blind on history imported by oak clone <x.git>. repros/oak-log-path-imported-history.sh
  • fb-552 MEDIUM peer pull exits 5 (incomplete_ancestry): first-parent-only fetch leaves a merge parent missing (not a reparent problem). repros/oak-peer-pull-missing-merge-parent.sh
  • fb-553 MEDIUM depth/large-file scaling: merge.preview 3.1 s and review.branch_diff 3.0 s at 100k commits (git 14-18 ms); clean status 370 ms with one 3 GiB file (git 6 ms).
  • fb-554 LOW a refused push still persists the remote linkage (remote_url set after "no remote state was mutated"). repros/oak-refused-push-persists-remote-link.sh. The earlier "log hides local history" claim was a repro artifact and is withdrawn; the dev-run log.full "expected 1002, got 3" was the same artifact (work repo linked to a snapshot-seeded server) and is gone since the server is seeded from a separate import.

QA round 1 fixes (verdict FIX @ c44c9111)

  1. Timing: timed commands use run_timed(watchdog_seconds=...) (timer thread kills the process group; single blocking wait4) instead of Popen.wait(timeout) polling; core lane unchanged. Test: 13 ms child with vs without the bound, |median delta| < 2 ms.
  2. Comparability: cells whose Oak server was snapshot-seeded are oak_vs_git_comparability=not_comparable:oak_server_seed_snapshot_1_commit; Oak-vs-Git delta/MDE suppressed (kept out of the BH family), summary shows n/c + oak-vs-oak only. Tested for push/pull/clone on default/xl-deep/xl-history/xl-refs.
  3. Dev-only enforced in data, verified by recomputation (QA r2 blocker + r3 holes fixed): evidence_class/claim_eligible are derived by scripts/oakbench/scale_calibration.py. run_scale_suite.py calibrate (>= 10 runs) writes the A/A campaign + host probes to a JSONL named in the record by content sha256. run --calibration-record and publish_gate both require that JSONL (gate: among its inputs) and RECOMPUTE everything from it; the record's numbers are never trusted. Policy 2026-09-29.3 (provisional, re-derive on the dedicated runner, P6):
    • A/A per arm (git and oak separately): median floor <= 10% and <= 10% of cells over 10%; identical-binary claims counted on a HELD-OUT half with floors from the other half, must be 0 (QA r3: a 50%-slow oak_aa arm in 11/12 cells now FAILS; a same-pair floor could never produce a claim).
    • Quiet host: load/core <= 0.10; flush probe must be the platform's full-flush primitive (F_FULLFSYNC on macOS; plain fsync rejected there), median <= 2.5 ms; >= 2000 files/s. No idle baseline was obtainable on this shared host (SSD reads 3.7-3.9 ms loaded).
    • Work volume recorded on every row and probe (df device/mount point, fstype, diskutil bus protocol of the APFS physical store); RAM disks / disk images / tmpfs / unknown refused (a RAM disk read 0.19 ms and was classified ram_or_disk_image); calibration and run must be on the same volume.
    • Shared runner_id, host_cpu_count, host_mem_bytes, Oak/Git binary sha256, registry-pinned fixtures; the run's own disk probes and each row's load must be quiet. Tests FAIL: QA's forged record (fixture tests/fixtures/scale/qa-r2-forgedC.fresh.jsonl.gz), resealed edits, copied runner, host mismatch, JSONL sha mismatch, missing campaign JSONL, broken A/A arm, held-out A/A shift, < 10 runs, RAM/image volume, volume mismatch, non-full-flush probe, contended disk. Stated limit: the campaign JSONL itself is not authenticated; editing its ~40 load/probe numbers and resealing (or fabricating a campaign) needs a signed runner to detect. Real smoke here: calibrate -> invalid (git 6/21 and oak 3/18 cells over 10%, load/core 0.25, F_FULLFSYNC 3.9 ms).
  4. Findings above corrected with fb IDs; repros renamed/re-headed.
  5. Oak harness branches are closed on teardown (git deletes); oak branch.list lists open branches: counts now constant across runs (3 fresh, 52 default).
  6. Fixture pin checked at generation (fixture_pin_status on rows; mismatch aborts the tier); results files named <bench_id>..jsonl.
  7. oak_sqlite_reader: tree_entries optional (dropped by oak maintenance compact by design); trees.content is the only tree form then, NULL content is Invalid. New real-store tests: compacted read, root/nested tree tamper, nulled content. P2 tamper tests green. gc oracles now measured (0 reader-unavailable rows).

Re-measure (dev-only, host load ~3): fresh + default, 5 runs x 4 arms, 941 rows; only failures are Oak log.path oracles (fb-551). oak-vs-oak MDE median 16% (fresh) / 6.5% (default); git small-op rows no longer cluster at poll steps (fresh status.clean 4.4-5.8 ms).

Left for later: calibrated campaign on a quiet host; xl-tree and xl-combined runs (1M-file worktrees are hours on this host; generation + sizer only); oak serve merge-to-main (merge.local/server merge skips); 16 agent-task catalog (P7); cold-cache mode for this lane.

Details

Commit
a3ea065926c9
Parent
7630895676ca
Merge parent
f08b4a249972

config/fixtures.jsonmodifiedView file

@@ -97,6 +97,120 @@
9797 "license": "synthetic",
9898 "hosting": ["local"],
9999 "status": "planned"
100+ },
101+ "scale-fresh-v1": {
102+ "generator": "suites/scale/scalesuite/generator.py",
103+ "version": "scale-gen-2026-09-28.1",
104+ "seed": "oakbench-scale-fresh-v1",
105+ "description": "Scale-lane tier fresh: 100 files, depth 3, 1 commits, 1 branches, 0 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
106+ "manifest": null,
107+ "license": "synthetic",
108+ "hosting": ["local"],
109+ "spec_sha256": "9facd15d230155ce52cc085333c427ff735b974ad03f2a4f3614a8eebe1d21c8",
110+ "refs_sha256": "f0d568082f55f84a96ce5819b610ec95c6b99a3567377d456d3177586b10f923",
111+ "head_commit": "688e50e5a1d837b6be449f365621d1d380cd2c84"
112+ },
113+ "scale-default-v1": {
114+ "generator": "suites/scale/scalesuite/generator.py",
115+ "version": "scale-gen-2026-09-28.1",
116+ "seed": "oakbench-scale-default-v1",
117+ "description": "Scale-lane tier default: 5000 files, depth 6, 1000 commits, 50 branches, 20 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
118+ "manifest": null,
119+ "license": "synthetic",
120+ "hosting": ["local"],
121+ "spec_sha256": "8c781cedd9dea7e1a2324081930529696328490060d0dc5d662f615f2dde9bcd",
122+ "refs_sha256": "a5766e865961b70fb2d05c0bf5f83fd298e8e9ae4fc30f485ed433e228d5b2b3",
123+ "head_commit": "264f76de8698f05c76833225bfdb9bf4a56e8764"
124+ },
125+ "scale-large-v1": {
126+ "generator": "suites/scale/scalesuite/generator.py",
127+ "version": "scale-gen-2026-09-28.1",
128+ "seed": "oakbench-scale-large-v1",
129+ "description": "Scale-lane tier large: 100000 files, depth 8, 10000 commits, 1000 branches, 200 tags, 1 x 268435456 B binary. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
130+ "manifest": null,
131+ "license": "synthetic",
132+ "hosting": ["local"],
133+ "spec_sha256": "617ae6051841c1168cbb445049a548bf4746403da5dd532ca35e6cc6262f69fc",
134+ "refs_sha256": "82f7f3fe7768398605bbab332053604bb14d66ae61c82fc4d7792bc9cc9dfc49",
135+ "head_commit": "8428cb7ac769609f60be860e268dec8e296761ff"
136+ },
137+ "scale-xl-history-v1": {
138+ "generator": "suites/scale/scalesuite/generator.py",
139+ "version": "scale-gen-2026-09-28.1",
140+ "seed": "oakbench-scale-xl-history-v1",
141+ "description": "Scale-lane tier xl-history: 10000 files, depth 5, 100000 commits, 1 branches, 0 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
142+ "manifest": null,
143+ "license": "synthetic",
144+ "hosting": ["local"],
145+ "spec_sha256": "f831dec246c56d087965ca1ff7c4b70eeffe1138d0cf29e2b3bc51b11e79f8f6",
146+ "refs_sha256": "25cf2c4a60be2a8705b2cdb40ab0186320e8cffb63cb1eba67bef3717826da09",
147+ "head_commit": "191a7109560d09eae4dd375b4768074c1605e641",
148+ "status": "xl_opt_in"
149+ },
150+ "scale-xl-tree-v1": {
151+ "generator": "suites/scale/scalesuite/generator.py",
152+ "version": "scale-gen-2026-09-28.1",
153+ "seed": "oakbench-scale-xl-tree-v1",
154+ "description": "Scale-lane tier xl-tree: 1000000 files, depth 6, 3 commits, 1 branches, 0 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
155+ "manifest": null,
156+ "license": "synthetic",
157+ "hosting": ["local"],
158+ "spec_sha256": "11e4fcbdd3203ccb67a8eb5eded9d2a81ac0e216ac60e8b74f17f4d01482e9b1",
159+ "refs_sha256": "fb1b20baa40bfbf6762115c2258c38b26f247a1eb577e5ba75a4a06cd418a8cc",
160+ "head_commit": "cdd855ccce37c28ae81662b437535ab213ec7406",
161+ "status": "xl_opt_in"
162+ },
163+ "scale-xl-deep-v1": {
164+ "generator": "suites/scale/scalesuite/generator.py",
165+ "version": "scale-gen-2026-09-28.1",
166+ "seed": "oakbench-scale-xl-deep-v1",
167+ "description": "Scale-lane tier xl-deep: 50000 files, depth 40, 100 commits, 1 branches, 0 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
168+ "manifest": null,
169+ "license": "synthetic",
170+ "hosting": ["local"],
171+ "spec_sha256": "75d4e3f983b386134a17e9e354690ceeccea9d1346e695e66971c491d66240c6",
172+ "refs_sha256": "75bd4162737fac219e61eb059135d35f964d66c85fe44b4e25a077f8d6bb8718",
173+ "head_commit": "d82cd03d0cc01b634317cc3a96f8d57e5c6034a3",
174+ "status": "xl_opt_in"
175+ },
176+ "scale-xl-refs-v1": {
177+ "generator": "suites/scale/scalesuite/generator.py",
178+ "version": "scale-gen-2026-09-28.1",
179+ "seed": "oakbench-scale-xl-refs-v1",
180+ "description": "Scale-lane tier xl-refs: 2000 files, depth 4, 1000 commits, 10000 branches, 2000 tags. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
181+ "manifest": null,
182+ "license": "synthetic",
183+ "hosting": ["local"],
184+ "spec_sha256": "0ad66690641e42577c3e01860e069d9116ab32e146425cb7de84bc7b4465aeb7",
185+ "refs_sha256": "bbd9a6b8a475b3d7cf7999bfa499d0124271ee45e825abd39a74846cf04a821f",
186+ "head_commit": "853d2bf0536df418e83980785f558920e1dee3f3",
187+ "status": "xl_opt_in"
188+ },
189+ "scale-xl-bigblob-v1": {
190+ "generator": "suites/scale/scalesuite/generator.py",
191+ "version": "scale-gen-2026-09-28.1",
192+ "seed": "oakbench-scale-xl-bigblob-v1",
193+ "description": "Scale-lane tier xl-bigblob: 16 files, depth 2, 3 commits, 1 branches, 0 tags, 1 x 3221225472 B binary. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
194+ "manifest": null,
195+ "license": "synthetic",
196+ "hosting": ["local"],
197+ "spec_sha256": "16a799ad3f9ec82996714e324698c3e495f8b8c86b3b76b1c167cac6c8aca01f",
198+ "refs_sha256": "25fcede598c9790cffdece35067500f84c20e3ccd17516e55f9bba27315147b4",
199+ "head_commit": "bbeb311ae7dcfd5d48832192a1c2b752e18443b3",
200+ "status": "xl_opt_in"
201+ },
202+ "scale-xl-combined-v1": {
203+ "generator": "suites/scale/scalesuite/generator.py",
204+ "version": "scale-gen-2026-09-28.1",
205+ "seed": "oakbench-scale-xl-combined-v1",
206+ "description": "Scale-lane tier xl-combined: 1000000 files, depth 32, 100000 commits, 10000 branches, 2000 tags, 1 x 3221225472 B binary. Identity = refs_sha256 (sorted '<oid> <ref>' list); regenerate with suites/scale/run_scale_suite.py generate.",
207+ "manifest": null,
208+ "license": "synthetic",
209+ "hosting": ["local"],
210+ "spec_sha256": "5af42782a61d086c5075224127674430db5acd4a95543a0e8b84e1b18b76b5de",
211+ "refs_sha256": null,
212+ "head_commit": null,
213+ "status": "xl_opt_in"
100214 }
101215 }
102216 }