Project-2 baseline

This commit is contained in:
2026-10-04 21:19:23 -04:00
parent 0f04889edf
commit 213eb3c403
861 changed files with 1710 additions and 3363322 deletions

View File

@@ -151,6 +151,25 @@ def _scan_stream_json(stream_path: Path) -> set[str]:
return found
def resolve_capture_dir(reference_run_dir: Path | str) -> Path:
"""The directory whose ``agent/trajectory.json`` is the run's captured transcript.
``reference-runs/<run>/agent/`` is gitignored, so a checkout carries no
trajectory there; the stored atomic regrade at
``rubric-regrades/<run>/agent/trajectory.json`` is the same transcript
(copy-reference-run files the replay trial verbatim). Prefer the run's own
copy, fall back to the stored regrade's, and return the run dir itself when
neither exists so callers report the canonical path.
"""
ref = Path(reference_run_dir)
if (ref / "agent" / "trajectory.json").exists():
return ref
stored = ref.parent.parent / "rubric-regrades" / ref.name
if (stored / "agent" / "trajectory.json").exists():
return stored
return ref
def captured_mutating_tools(reference_run_dir: Path | str) -> set[str]:
"""Return the file-mutating tool names found in a captured run's transcript.