Merge pull request 'The call record: every model call, for the operator's study (M6.6a)' (#179) from call-record into main
This commit was merged in pull request #179.
This commit is contained in:
commit
c1f3d9dafb
22 files changed
+1346
-48
No files matched your search
@@ -467,3 +467,26 @@ def test_runs_from_before_the_driver_read_as_its_defaults() -> None:
|
||||
old["tuning"]["executor"] = old["tuning"].pop("driver")
|
||||
[row] = summarise([old], current)
|
||||
assert row.tuning == ""
|
||||
|
||||
|
||||
def test_a_kept_run_leaves_its_state_and_call_record(tmp_path: Path) -> None:
|
||||
# As the agent records itself (L7), so the status page can open a
|
||||
# benchmark run (X6); each run gets its own record, and the client is
|
||||
# left as it was.
|
||||
from nisse_core.models.calls import CallReader
|
||||
|
||||
[task] = load_tasks(["write-function"])
|
||||
client = Scripted(list(SOLVE_SLUGIFY))
|
||||
record = run_task(task, FACTS, client, Tuning(), host=HOST, keep=tmp_path / "runs")
|
||||
|
||||
[kept] = list((tmp_path / "runs").iterdir())
|
||||
assert kept.name.startswith("write-function-")
|
||||
assert (kept / "state.db").exists()
|
||||
[run] = CallReader(kept / "state.calls.db").runs()
|
||||
assert (run["work_item"], run["role"], run["outcome"]) == (
|
||||
"bench",
|
||||
"driver",
|
||||
"wait",
|
||||
)
|
||||
assert record.success
|
||||
assert not hasattr(client, "call_recorder")
|
||||
Reference in new issue
Block a user