Checkpoint experiments through SWE pilot v2

This commit is contained in:
pj committed 2026-09-15 15:46:10 +05:30
1 parent abacd5c5e1
commit 72d77018d8
845 files changed
+431756 -41

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
from pathlib import Path
import runpy
import pytest
script = runpy.run_path(str(Path(__file__).parents[1] / "scripts" / "diagnostic.py"))
def test_defaults_are_preview_and_two_samples():
args = script["parser"]().parse_args(["--out", "logs/example"])
config, seeds = script["configuration"](args)
assert not args.execute
assert len(config["ids"]) == 2
assert config["concurrency"] == 2
assert not seeds
def test_large_diagnostic_batch_rejected():
args = script["parser"]().parse_args(["--out", "logs/example", "--ids", *map(str, range(40))])
with pytest.raises(ValueError, match="1–8"):
script["configuration"](args)
def test_seed_manifest_identifies_input(tmp_path):
p = tmp_path / "reference.py"
p.write_text("# actual donor content\n")
args = script["parser"]().parse_args(["--out", "logs/example", "--seed-file", str(p)])
config, seeds = script["configuration"](args)
assert seeds[p.name] == p.read_text()
assert config["seed_files"][p.name]["source"] == str(p.resolve())
assert len(config["seed_files"][p.name]["sha256"]) == 64