Keep the ablation arms inside the line budget the repo enforces

copy_store() moved into bench/scratch.py: systems.py had reached 512 lines
and bench/filesize_check fails anything over 500. The move is behaviour
identical, so the scale reports keep the commit stamp they were generated
against — the code they describe is complete at that commit.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-08 17:04:16 -04:00
1 parent c4a8c36416
commit 6cc5640856
6 files changed
+33 -19

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
"""Every harness measures a copy. The frozen baseline store is cited evidence, and the product
migrates whatever database it opens."""
from __future__ import annotations
import shutil
import time
from pathlib import Path
def copy_store(home: Path, scratch: Path) -> tuple[Path, float]:
"""Work on a copy: the baseline store is frozen evidence and must not be migrated in place."""
source = home / "data" / "ely_eye.sqlite"
if not source.is_file():
raise SystemExit(
f"{source}: no product database, build it with python -m bench.ingest_baseline"
)
data = scratch / "data"
data.mkdir(parents=True, exist_ok=True)
began = time.perf_counter()
for suffix in ("", "-wal", "-shm"):
if (path := Path(str(source) + suffix)).is_file():
shutil.copyfile(path, data / (source.name + suffix))
return scratch, time.perf_counter() - began