Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

test(learn): let the tournament parent outlive the 4-way barrier

Cursor Agenta44a2adda002
diff --git a/tests/learn_e2e.py b/tests/learn_e2e.py
index efb592da..06f63227 100644
--- a/tests/learn_e2e.py
+++ b/tests/learn_e2e.py
@@ -184,7 +184,7 @@ def write_interpreter_shim(tools: Path, name: str, python: Path, body: str) -> t
return program, script
-def invoke(graff: Path, workspace: Path, env: dict[str, str], *args: str, succeeds: bool = True) -> subprocess.CompletedProcess[str]:
+def invoke(graff: Path, workspace: Path, env: dict[str, str], *args: str, succeeds: bool = True, timeout: int = 60) -> subprocess.CompletedProcess[str]:
privacy_args = ["--learning-privacy", "aggregate"] if (args and (args[0] == "submit" or "--submit" in args)) else []
result = subprocess.run(
[str(graff), *privacy_args, "learn", *args],
@@ -193,7 +193,7 @@ def invoke(graff: Path, workspace: Path, env: dict[str, str], *args: str, succee
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
- timeout=60,
+ timeout=timeout,
check=False,
)
if succeeds and result.returncode != 0:
diff --git a/tests/learn_tournament_e2e.py b/tests/learn_tournament_e2e.py
index 14ead3aa..bd1ea7d4 100755
--- a/tests/learn_tournament_e2e.py
+++ b/tests/learn_tournament_e2e.py
@@ -23,7 +23,7 @@ from learn_tournament_fixtures import MUTATOR
from learn_e2e import (
GradeCapture,
- invoke,
+ invoke as _invoke,
json_bytes,
raw_sha256,
run_id_from,
@@ -34,6 +34,13 @@ from learn_e2e import (
write_private,
)
+# Four primary evaluators rendezvous for up to TOURNAMENT_BARRIER_DEADLINE
+# seconds (default 120). The parent must outlive that wait or a loaded CI
+# runner kills `graff learn run` with TimeoutExpired while peers are still
+# starting (#467).
+def invoke(*args, timeout: int = 180, **kwargs):
+ return _invoke(*args, timeout=timeout, **kwargs)
+
EVALUATOR = r'''import hashlib, json, os, pathlib, sys, time
operation, request_path, response_path = sys.argv[1:4]