Repository navigation
Description
Description
Rerunning scripts/verify/perf-ab.py with the same --out path can pass a comparison even when the new test processes emit no case records. The runner reads old cap-verify-<pid>.jsonl files left in each report directory and treats them as results from the new invocation. It also overwrites the prior test.log.
This affects local reruns after changing builds or case filters. A fresh CI output directory does not have this contamination. The tool already rejects fresh runs with no case records, but stale reports bypass that check.
Reproduction
On baseline 848d18fe7b601f1b92ada6563e56e1fba4ebe1e0, this standard-library fixture exercises the production run_once boundary without building native media binaries:
import importlib.util
import json
import sys
import tempfile
from pathlib import Path
spec = importlib.util.spec_from_file_location("perf_ab", "scripts/verify/perf-ab.py")
perf = importlib.util.module_from_spec(spec)
spec.loader.exec_module(perf)
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
(root / "crates/verify").mkdir(parents=True)
binary = root / "fixture.py"
binary.write_text(f"#!{sys.executable}\nprint('0 new cases')\n")
binary.chmod(0o700)
report = root / "reports"
report.mkdir()
(report / "cap-verify-123.jsonl").write_text(
json.dumps({"case": "export/basic/output/mp4/native", "outcome": "pass"}) + "\n"
)
side = {"worktree": str(root), "binaries": {"export": str(binary)}}
result = perf.run_once(side, "export", "export/basic/*", "fast", root, report)
print(result["exit"], result["outcomes"])Actual baseline result:
0 {'export/basic/output/mp4/native': 'ran'}
Expected: refuse to read prior reports as current results and preserve the earlier evidence.
Additional Context
- Linux x86_64, Python 3.14.8, standard library only.
- The native reporter appends to PID-named files, so a different process does not replace earlier reports.
- A separate full-CLI reproduction first emitted valid fixture reports, then reran with no new rows. Baseline exited 0 on both invocations. The fix exits 1 on the rerun before launching children and preserves the old log.
- The fixture implements the native report contract. No actual media benchmark or performance improvement is claimed.
Activity
linear commentedon Oct 22, 2026
CAP-877