Benchmark: the seed is a git repository's first commit
The agent works in a clone, but benchmark workspaces were plain directories, so a model that starts with `git log` failed two commands in a row and was stopped as stuck within seconds (Flash-Next, 10 of 13 failures on 2026-10-24). The seed is now committed on main, locally and on the build VM, and how a workspace is set up is part of each task's hash, so earlier runs are reported as not comparable. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
1 parent
3caf4aab69
commit
7a57cef9ff
2 files changed
+57
-2
No files matched your search
@@ -151,6 +151,33 @@ def test_a_changed_task_gets_a_new_hash(tmp_path: Path) -> None:
|
||||
assert copy.content_hash != task.content_hash
|
||||
|
||||
|
||||
def test_the_seed_is_a_git_repository_with_one_clean_commit(tmp_path: Path) -> None:
|
||||
# The agent works in a clone; a model that starts with `git log` must not
|
||||
# fail here where it would succeed in production.
|
||||
import subprocess
|
||||
|
||||
[task] = load_tasks(["write-function"])
|
||||
task.seed_into(tmp_path)
|
||||
|
||||
def git(*args: str) -> str:
|
||||
return subprocess.run(
|
||||
["git", *args], cwd=tmp_path, capture_output=True, text=True, check=True
|
||||
).stdout
|
||||
|
||||
assert git("log", "--oneline").count("\n") == 1
|
||||
assert git("status", "--short") == ""
|
||||
|
||||
|
||||
def test_how_the_seed_is_set_up_is_part_of_the_hash(monkeypatch) -> None:
|
||||
# Runs from before the seed was committed are not comparable.
|
||||
import nisse_dev.bench.tasks as tasks_module
|
||||
|
||||
[task] = load_tasks(["write-function"])
|
||||
before = task.content_hash
|
||||
monkeypatch.setattr(tasks_module, "SEED_SETUP", "seed copied")
|
||||
assert task.content_hash != before
|
||||
|
||||
|
||||
def test_an_unknown_task_is_refused() -> None:
|
||||
with pytest.raises(ValueError, match="unknown task"):
|
||||
load_tasks(["nope"])
|
||||
@@ -211,6 +238,17 @@ def test_a_solved_task_is_a_success(tmp_path: Path) -> None:
|
||||
assert record.tuning["driver"]["max_turns"] == 40
|
||||
|
||||
|
||||
def test_the_model_can_read_the_history_on_the_build_vm(tmp_path: Path) -> None:
|
||||
[task] = load_tasks(["write-function"])
|
||||
turns = [
|
||||
[call("run_command", "g", command="git log --oneline && git status --short")],
|
||||
*SOLVE_SLUGIFY,
|
||||
]
|
||||
record = run_task(task, FACTS, Scripted(turns), Tuning(), host=HOST, note="n")
|
||||
assert record.success
|
||||
assert record.failed_commands == 0
|
||||
|
||||
|
||||
def test_saying_finished_is_not_success(tmp_path: Path) -> None:
|
||||
# Success is the hidden check passing, never the model's own claim.
|
||||
[task] = load_tasks(["write-function"])
|
||||
|
||||
Reference in new issue
Block a user