graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
feat(evals): graff-evals — in-repo harness/model eval environment
Rach Pradhan54af074ef587
diff --git a/.gitignore b/.gitignoreindex 722dae9b..2a1ea6ea 100644--- a/.gitignore+++ b/.gitignore@@ -35,3 +35,5 @@ dist/# surfer lives in its own repo (~/surfer, github.com/justrach/surfer) — never track it heresurfer/+graff-evals/results/+graff-evals/.sandboxes/diff --git a/graff-evals/README.md b/graff-evals/README.mdnew file mode 100644index 00000000..2f216673--- /dev/null+++ b/graff-evals/README.md@@ -0,0 +1,66 @@+# graff-evals++A self-contained eval environment for coding harnesses: run any model through+any harness on a fixed task suite and get pass rate, wall time, first-output+latency, and token usage side by side.++Every task is one JSON file in `tasks/` — fixture files inline, a prompt, and+a deterministic shell `check` that decides pass/fail inside the sandbox. No+network is needed to author or verify tasks; only the harness under test+spends model calls.++## Run it++```sh+cd graff-evals++# full suite on graff (defaults to grok-4.6)+./run.py --harness graff++# one task, three reps, on the grok CLI+./run.py --harness grok --task fix-fib --reps 3++# harness-vs-harness on the same model+./run.py --harness graff,grok --model grok-4.6++# a different model through graff+./run.py --harness graff --model claude-opus-4-8++# the locally built binary instead of the installed one+zig build && ./run.py --harness graff-dev++# interactive: pick a task + harness, watch the run live, get the verdict+./run.py --interactive+```++Results land in `results/run-<stamp>.jsonl` (one record per run) plus a+summary table on stdout. `.sandboxes/` holds the materialized working dirs of+the last run for post-mortems; both are disposable.++## Harnesses++`harnesses.json` declares each harness as a command template plus parsers:++- `answer` — where the final answer text comes from (`stdout`, or+ `grok-stream` for grok's `streaming-messages-json` result event).+- `usage` — how to extract token counts (`graff-stderr` parses graff's+ `[usage]` line; `grok-stream` reads the result event's usage).+- `capabilities` — feature gates; a task listing `requires` a capability is+ skipped on harnesses that lack it (e.g. `output-schema` structured outputs).++Add a harness by adding an entry; add a model by passing `--model`.++## Tasks++12 tasks across categories: instruction-following, debugging, shell, data+(JSON/CSV), text extraction, refactoring, test-writing, git, long-context+recall, structured output, and code comprehension. The check runs in the+sandbox with `$ANSWER_FILE` pointing at the captured final answer, so checks+can assert on the answer text and on filesystem/git state.++Authoring rules that keep results comparable:++- The check must be deterministic and self-contained (`python3` + POSIX sh).+- Planted values (sums, counts, code words) live in the fixture, not the+ prompt, so the model must actually do the work.+- One behavior per task; keep prompts short and unambiguous.diff --git a/graff-evals/harnesses.json b/graff-evals/harnesses.jsonnew file mode 100644index 00000000..0cfd9e98--- /dev/null+++ b/graff-evals/harnesses.json@@ -0,0 +1,40 @@+{+ "graff": {+ "cmd": ["graff", "-p", "{prompt}", "--model", "{model}", "--yolo"],+ "answer": "stdout",+ "usage": "graff-stderr",+ "capabilities": ["output-schema"],+ "schema_args": ["--output-schema", "{schema}"],+ "default_model": "grok-4.6"+ },+ "graff-full": {+ "cmd": ["graff", "-p", "{prompt}", "--model", "{model}", "--yolo", "--no-lean"],+ "answer": "stdout",+ "usage": "graff-stderr",+ "capabilities": ["output-schema"],+ "schema_args": ["--output-schema", "{schema}"],+ "default_model": "grok-4.6"+ },+ "graff-dev": {+ "cmd": ["{repo}/zig-out/bin/graff", "-p", "{prompt}", "--model", "{model}", "--yolo"],+ "answer": "stdout",+ "usage": "graff-stderr",+ "capabilities": ["output-schema"],+ "schema_args": ["--output-schema", "{schema}"],+ "default_model": "grok-4.6"+ },+ "grok": {+ "cmd": ["grok", "-p", "{prompt}", "-m", "{model}", "--always-approve", "--output-format", "streaming-messages-json"],+ "answer": "grok-stream",+ "usage": "grok-stream",+ "capabilities": [],+ "default_model": "grok-4.6"+ },+ "claude": {+ "cmd": ["claude", "-p", "{prompt}", "--model", "{model}", "--dangerously-skip-permissions"],+ "answer": "stdout",+ "usage": null,+ "capabilities": [],+ "default_model": "claude-sonnet-5"+ }+}diff --git a/graff-evals/run.py b/graff-evals/run.pynew file mode 100755index 00000000..a77cb756--- /dev/null+++ b/graff-evals/run.py@@ -0,0 +1,222 @@+#!/usr/bin/env python3+"""graff-evals: a self-contained eval environment for coding harnesses.++Every task is a JSON file under tasks/ that declares its fixture files, the+prompt, and a deterministic shell check. The runner materializes a sandbox,+drives any configured harness (harnesses.json) with any model, captures wall+time / first-output latency / token usage, verifies the outcome, and writes+JSONL results plus a summary table.++ ./run.py --harness graff --model grok-4.6 # full suite+ ./run.py --harness grok --task fix-fib --reps 3 # one task, 3 reps+ ./run.py --harness graff,grok --model grok-4.6 # side by side+ ./run.py --interactive # pick + watch live+"""+import argparse, json, os, re, shutil, subprocess, sys, time++ROOT = os.path.dirname(os.path.abspath(__file__))+REPO = os.path.dirname(ROOT)+TASKS_DIR = os.path.join(ROOT, "tasks")+RESULTS_DIR = os.path.join(ROOT, "results")+SANDBOX_DIR = os.path.join(ROOT, ".sandboxes")++GRAFF_USAGE_RE = re.compile(+ r"\[usage\] (\d+) api call\(s\) · (\d+) in \((\d+) cached\) \+ (\d+) out tokens")+++def load_tasks():+ tasks = {}+ for name in sorted(os.listdir(TASKS_DIR)):+ if not name.endswith(".json"):+ continue+ with open(os.path.join(TASKS_DIR, name)) as f:+ t = json.load(f)+ tasks[t["id"]] = t+ return tasks+++def load_harnesses():+ with open(os.path.join(ROOT, "harnesses.json")) as f:+ return json.load(f)+++def materialize(task, sandbox):+ if os.path.exists(sandbox):+ shutil.rmtree(sandbox)+ os.makedirs(sandbox)+ for rel, content in task.get("files", {}).items():+ path = os.path.join(sandbox, rel)+ os.makedirs(os.path.dirname(path), exist_ok=True)+ with open(path, "w") as f:+ f.write(content)+ for cmd in task.get("setup", []):+ subprocess.run(["/bin/sh", "-c", cmd], cwd=sandbox, capture_output=True, timeout=60)+++def build_cmd(harness, task, model):+ subst = {"prompt": task["prompt"], "model": model, "repo": REPO}+ cmd = [part.format(**subst) for part in harness["cmd"]]+ if "output-schema" in task.get("requires", []):+ schema = json.dumps(task["schema"], separators=(",", ":"))+ cmd += [part.format(schema=schema, **subst) for part in harness.get("schema_args", [])]+ return cmd+++def parse_answer_and_usage(harness, stdout, stderr):+ answer, usage = stdout.strip(), {}+ if harness["answer"] == "grok-stream":+ answer = ""+ for line in stdout.splitlines():+ line = line.strip()+ if not line.startswith("{"):+ continue+ try:+ ev = json.loads(line)+ except json.JSONDecodeError:+ continue+ if ev.get("type") == "result":+ answer = ev.get("result") or ""+ u = ev.get("usage", {})+ usage = {"calls": ev.get("num_turns"), "in": u.get("input_tokens"),+ "cached": u.get("cache_read_input_tokens"),+ "out": u.get("output_tokens"), "api_ms": ev.get("duration_api_ms")}+ if harness.get("usage") == "graff-stderr":+ m = GRAFF_USAGE_RE.search(stderr)+ if m:+ usage = {"calls": int(m.group(1)), "in": int(m.group(2)),+ "cached": int(m.group(3)), "out": int(m.group(4))}+ return answer, usage+++def one_run(hname, harness, task, model, rep, live=False):+ sandbox = os.path.join(SANDBOX_DIR, f"{hname}-{task['id']}-r{rep}")+ materialize(task, sandbox)+ cmd = build_cmd(harness, task, model)+ timeout = task.get("timeout_s", 240)+ t0 = time.monotonic()+ first_out = None+ stdout_parts, stderr_parts = [], []+ try:+ p = subprocess.Popen(cmd, cwd=sandbox, stdout=subprocess.PIPE,+ stderr=subprocess.PIPE, text=True)+ import selectors+ sel = selectors.DefaultSelector()+ sel.register(p.stdout, selectors.EVENT_READ, "out")+ sel.register(p.stderr, selectors.EVENT_READ, "err")+ open_streams = 2+ while open_streams and time.monotonic() - t0 < timeout:+ for key, _ in sel.select(timeout=0.5):+ chunk = key.fileobj.readline()+ if not chunk:+ sel.unregister(key.fileobj)+ open_streams -= 1+ continue+ if first_out is None:+ first_out = round(time.monotonic() - t0, 2)+ (stdout_parts if key.data == "out" else stderr_parts).append(chunk)+ if live:+ sys.stdout.write(chunk if key.data == "out" else f"\x1b[2m{chunk}\x1b[0m")+ sys.stdout.flush()+ timed_out = p.poll() is None+ if timed_out:+ p.kill()+ p.wait(timeout=10)+ rc = p.returncode+ except FileNotFoundError:+ return {"harness": hname, "task": task["id"], "rep": rep,+ "error": f"harness binary not found: {cmd[0]}", "outcome_ok": False}+ stdout, stderr = "".join(stdout_parts), "".join(stderr_parts)+ wall = round(time.monotonic() - t0, 2)+ answer, usage = parse_answer_and_usage(harness, stdout, stderr)+ with open(os.path.join(sandbox, ".eval-answer.txt"), "w") as f:+ f.write(answer)+ check = subprocess.run(["/bin/sh", "-c", task["check"]], cwd=sandbox,+ capture_output=True, text=True, timeout=60,+ env=dict(os.environ, ANSWER_FILE=".eval-answer.txt"))+ rec = {"harness": hname, "task": task["id"], "category": task.get("category", ""),+ "model": model, "rep": rep, "wall_s": wall, "first_out_s": first_out,+ "exit": rc, "timed_out": timed_out, "outcome_ok": check.returncode == 0,+ "answer_head": answer[:120]}+ rec.update({f"tok_{k}": v for k, v in usage.items()})+ if check.returncode != 0 and check.stderr.strip():+ rec["check_note"] = check.stderr.strip()[:200]+ return rec+++def summarize(records):+ by = {}+ for r in records:+ b = by.setdefault(r["harness"], {"n": 0, "ok": 0, "wall": 0.0, "tin": 0, "tout": 0})+ b["n"] += 1+ b["ok"] += bool(r.get("outcome_ok"))+ b["wall"] += r.get("wall_s", 0) or 0+ b["tin"] += r.get("tok_in") or 0+ b["tout"] += r.get("tok_out") or 0+ print(f"\n{'harness':<12} {'pass':>7} {'wall':>8} {'in_tok':>9} {'out_tok':>8}")+ for h, b in by.items():+ print(f"{h:<12} {b['ok']}/{b['n']:<5} {b['wall']:>7.1f}s {b['tin']:>9} {b['tout']:>8}")+++def interactive(tasks, harnesses):+ tlist = list(tasks.values())+ print("tasks:")+ for i, t in enumerate(tlist):+ print(f" [{i}] {t['id']:<18} {t.get('category', '')}")+ ti = int(input("task #: ").strip() or "0")+ hnames = list(harnesses)+ for i, h in enumerate(hnames):+ print(f" [{i}] {h}")+ hi = int(input("harness #: ").strip() or "0")+ hname = hnames[hi]+ harness = harnesses[hname]+ model = input(f"model [{harness.get('default_model', '')}]: ").strip() or harness.get("default_model", "")+ task = tlist[ti]+ print(f"\n── {task['id']} on {hname} ({model}) — live output ──\n")+ rec = one_run(hname, harness, task, model, rep=1, live=True)+ print("\n── verdict ──")+ print(json.dumps(rec, indent=2, ensure_ascii=False))+++def main():+ ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)+ ap.add_argument("--harness", default="graff", help="comma-separated harness names (see harnesses.json)")+ ap.add_argument("--model", default=None, help="model id (default: per-harness default_model)")+ ap.add_argument("--task", action="append", help="task id filter (repeatable)")+ ap.add_argument("--reps", type=int, default=1)+ ap.add_argument("--interactive", action="store_true", help="pick a task+harness, watch it live")+ args = ap.parse_args()++ tasks = load_tasks()+ harnesses = load_harnesses()+ if args.interactive:+ interactive(tasks, harnesses)+ return++ os.makedirs(RESULTS_DIR, exist_ok=True)+ stamp = time.strftime("%Y%m%d-%H%M%S")+ out_path = os.path.join(RESULTS_DIR, f"run-{stamp}.jsonl")+ picked = {tid: t for tid, t in tasks.items() if not args.task or tid in args.task}+ records = []+ with open(out_path, "w") as f:+ for hname in args.harness.split(","):+ harness = harnesses[hname]+ model = args.model or harness.get("default_model", "")+ for task in picked.values():+ missing = [c for c in task.get("requires", []) if c not in harness.get("capabilities", [])]+ if missing:+ print(f"skip {task['id']} on {hname}: needs {missing}", flush=True)+ continue+ for rep in range(1, args.reps + 1):+ rec = one_run(hname, harness, task, model, rep)+ records.append(rec)+ f.write(json.dumps(rec, ensure_ascii=False) + "\n")+ f.flush()+ ok = "✓" if rec.get("outcome_ok") else "✗"+ print(f"{ok} {hname:<12} {task['id']:<18} r{rep} {rec.get('wall_s', '?')}s "+ f"in={rec.get('tok_in', '?')} out={rec.get('tok_out', '?')}", flush=True)+ summarize(records)+ print(f"\nresults: {out_path}")+++if __name__ == "__main__":+ main()diff --git a/graff-evals/tasks/01-exact-reply.json b/graff-evals/tasks/01-exact-reply.jsonnew file mode 100644index 00000000..dbe7cdd7--- /dev/null+++ b/graff-evals/tasks/01-exact-reply.json@@ -0,0 +1,8 @@+{+ "id": "exact-reply",+ "category": "instruction-following",+ "prompt": "Reply with exactly: pong",+ "files": {},+ "check": "grep -qi pong \"$ANSWER_FILE\"",+ "timeout_s": 120+}diff --git a/graff-evals/tasks/02-fix-fib.json b/graff-evals/tasks/02-fix-fib.jsonnew file mode 100644index 00000000..76e30d6c--- /dev/null+++ b/graff-evals/tasks/02-fix-fib.json@@ -0,0 +1,11 @@+{+ "id": "fix-fib",+ "category": "debugging",+ "prompt": "Run `python3 test_fib.py`. It fails because fib.py has an off-by-one bug. Fix fib.py, rerun the test, and confirm it prints OK.",+ "files": {+ "fib.py": "def fib(n):\n a, b = 0, 1\n for _ in range(n - 1):\n a, b = b, a + b\n return a\n",+ "test_fib.py": "from fib import fib\nassert fib(10) == 55, f\"fib(10) = {fib(10)}, expected 55\"\nassert fib(1) == 1, f\"fib(1) = {fib(1)}, expected 1\"\nprint(\"OK\")\n"+ },+ "check": "python3 test_fib.py | grep -q OK",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/03-file-ops.json b/graff-evals/tasks/03-file-ops.jsonnew file mode 100644index 00000000..f2bd62ef--- /dev/null+++ b/graff-evals/tasks/03-file-ops.json@@ -0,0 +1,8 @@+{+ "id": "file-ops",+ "category": "shell",+ "prompt": "Create a file hello.txt containing exactly: hi\nThen rename hello.txt to greeting.txt. Confirm with ls.",+ "files": {},+ "check": "test ! -e hello.txt && test \"$(cat greeting.txt)\" = hi",+ "timeout_s": 180+}diff --git a/graff-evals/tasks/04-json-transform.json b/graff-evals/tasks/04-json-transform.jsonnew file mode 100644index 00000000..e6236647--- /dev/null+++ b/graff-evals/tasks/04-json-transform.json@@ -0,0 +1,10 @@+{+ "id": "json-transform",+ "category": "data",+ "prompt": "Read data.json (a list of people). Write adults.json containing only the entries with age >= 18, sorted by name ascending, same object shape, as a JSON array.",+ "files": {+ "data.json": "[{\"name\": \"Cy\", \"age\": 18}, {\"name\": \"Bo\", \"age\": 12}, {\"name\": \"Ada\", \"age\": 31}, {\"name\": \"Dee\", \"age\": 7}]\n"+ },+ "check": "python3 -c \"import json; d=json.load(open('adults.json')); assert [p['name'] for p in d]==['Ada','Cy'], d; assert all(p['age']>=18 for p in d)\"",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/05-regex-count.json b/graff-evals/tasks/05-regex-count.jsonnew file mode 100644index 00000000..8857782b--- /dev/null+++ b/graff-evals/tasks/05-regex-count.json@@ -0,0 +1,10 @@+{+ "id": "regex-count",+ "category": "text",+ "prompt": "Count how many lines in app.log start with the severity token ERROR (exactly that token, not WARN or INFO, not ERRORS_TOTAL, not lowercase). Write just that number to count.txt.",+ "files": {+ "app.log": "INFO boot ok\nERROR db timeout\nWARN slow query\nERROR cache miss storm\nINFO tick\nERRORS_TOTAL 99\nERROR disk full\nINFO tick\nerror lowercase noise\nERROR net reset\n"+ },+ "check": "test \"$(tr -d '[:space:]' < count.txt)\" = 4",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/06-refactor-rename.json b/graff-evals/tasks/06-refactor-rename.jsonnew file mode 100644index 00000000..613a078e--- /dev/null+++ b/graff-evals/tasks/06-refactor-rename.json@@ -0,0 +1,11 @@+{+ "id": "refactor-rename",+ "category": "refactor",+ "prompt": "Rename the function `calc_total` to `sum_amounts` everywhere in this project (definition and all call sites), keeping behavior identical. Then run `python3 main.py` to confirm it still prints 42.",+ "files": {+ "lib.py": "def calc_total(items):\n return sum(items)\n\n\ndef unrelated():\n return 1\n",+ "main.py": "from lib import calc_total\n\nprint(calc_total([40, 2]))\n"+ },+ "check": "python3 main.py | grep -q 42 && ! grep -q calc_total lib.py && ! grep -q calc_total main.py && grep -q sum_amounts lib.py && grep -q sum_amounts main.py",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/07-write-tests.json b/graff-evals/tasks/07-write-tests.jsonnew file mode 100644index 00000000..c006b200--- /dev/null+++ b/graff-evals/tasks/07-write-tests.json@@ -0,0 +1,10 @@+{+ "id": "write-tests",+ "category": "testing",+ "prompt": "Write test_calc.py for calc.py with at least 4 assert statements covering both add() and mul(), including at least one negative-number case. Run it with python3 to prove it passes.",+ "files": {+ "calc.py": "def add(a, b):\n return a + b\n\n\ndef mul(a, b):\n return a * b\n"+ },+ "check": "python3 test_calc.py && test \"$(grep -c 'assert' test_calc.py)\" -ge 4 && grep -q add test_calc.py && grep -q mul test_calc.py",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/08-git-ops.json b/graff-evals/tasks/08-git-ops.jsonnew file mode 100644index 00000000..89927682--- /dev/null+++ b/graff-evals/tasks/08-git-ops.json@@ -0,0 +1,16 @@+{+ "id": "git-ops",+ "category": "git",+ "prompt": "This directory is a git repo with an uncommitted change to note.txt. Create a branch named feature/notes, switch to it, and commit the change there with the message 'add note'. main must stay clean.",+ "files": {+ "note.txt": "original\n"+ },+ "setup": [+ "git init -q -b main .",+ "git -c user.email=e@x -c user.name=eval add note.txt",+ "git -c user.email=e@x -c user.name=eval commit -qm init",+ "printf 'edited\\n' > note.txt"+ ],+ "check": "git rev-parse --verify -q feature/notes >/dev/null && git log feature/notes --oneline | grep -q 'add note' && test \"$(git show main:note.txt)\" = original",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/09-recall-noise.json b/graff-evals/tasks/09-recall-noise.jsonnew file mode 100644index 00000000..fa5263c9--- /dev/null+++ b/graff-evals/tasks/09-recall-noise.json@@ -0,0 +1,10 @@+{+ "id": "recall-noise",+ "category": "long-context",+ "prompt": "Read briefing.txt carefully, then answer: what is the launch code word? Reply with just the code word.",+ "files": {+ "briefing.txt": "OPS BRIEFING (rev 7)\nThe launch code word is MARIGOLD-7. Memorize it; it appears once.\nSection 1: logistics. The venue changed twice. Catering settled on the northern hall after the flood assessment, which itself took three weeks longer than planned because the inspector was reassigned. Section 2: staffing. Rotations follow the summer schedule; exceptions require two approvals and a written rationale filed before Thursday. Section 3: comms. All updates go through the liaison desk; direct pings to the program office are discouraged and will be redirected. Section 4: budget. The Q3 envelope held despite the vendor reprice; contingency remains untouched. Section 5: schedule. Dry runs happen weekly; the full rehearsal lands two weeks before the window opens. Section 6: risks. Weather remains the dominant variable, followed by supplier slippage and the certification backlog. Section 7: misc. Badge renewals are due; parking permits roll over automatically. End of briefing.\n"+ },+ "check": "grep -q 'MARIGOLD-7' \"$ANSWER_FILE\"",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/10-schema-output.json b/graff-evals/tasks/10-schema-output.jsonnew file mode 100644index 00000000..d4b30680--- /dev/null+++ b/graff-evals/tasks/10-schema-output.json@@ -0,0 +1,20 @@+{+ "id": "schema-output",+ "category": "structured-output",+ "prompt": "Inspect inventory.txt and report: how many distinct SKUs are listed, and which SKU has the highest total quantity? Fill the schema.",+ "requires": ["output-schema"],+ "schema": {+ "type": "object",+ "properties": {+ "distinct_skus": {"type": "integer"},+ "top_sku": {"type": "string"}+ },+ "required": ["distinct_skus", "top_sku"],+ "additionalProperties": false+ },+ "files": {+ "inventory.txt": "SKU-A 12\nSKU-B 40\nSKU-C 7\nSKU-B 5\nSKU-D 19\n"+ },+ "check": "python3 -c \"import json,os; d=json.load(open(os.environ['ANSWER_FILE'])); assert d['distinct_skus']==4, d; assert d['top_sku']=='SKU-B', d\"",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/11-csv-sum.json b/graff-evals/tasks/11-csv-sum.jsonnew file mode 100644index 00000000..f3ec1a33--- /dev/null+++ b/graff-evals/tasks/11-csv-sum.json@@ -0,0 +1,10 @@+{+ "id": "csv-sum",+ "category": "data",+ "prompt": "Sum the amount column of data.csv and write the exact total (no currency sign, keep the decimal) to total.txt.",+ "files": {+ "data.csv": "id,amount,note\n1,10.5,first\n2,2,second\n3,7.25,third\n4,30,fourth\n"+ },+ "check": "python3 -c \"t=open('total.txt').read().strip().rstrip('0').rstrip('.'); assert t == '49.75', t\"",+ "timeout_s": 240+}diff --git a/graff-evals/tasks/12-dead-code.json b/graff-evals/tasks/12-dead-code.jsonnew file mode 100644index 00000000..46ba91ef--- /dev/null+++ b/graff-evals/tasks/12-dead-code.json@@ -0,0 +1,11 @@+{+ "id": "dead-code",+ "category": "comprehension",+ "prompt": "One function defined in utils.py is never used anywhere in this project (not imported, not called, including inside utils.py itself). Name it — reply with just the function name.",+ "files": {+ "utils.py": "def parse_row(row):\n return row.split(',')\n\n\ndef normalize(text):\n return text.strip().lower()\n\n\ndef legacy_export(rows):\n return '\\n'.join(','.join(r) for r in rows)\n\n\ndef validate(row):\n return len(parse_row(row)) == 3\n",+ "main.py": "from utils import parse_row, normalize, validate\n\nrow = ' A,B,C '\nprint(validate(normalize(row)), parse_row(normalize(row)))\n"+ },+ "check": "grep -q legacy_export \"$ANSWER_FILE\"",+ "timeout_s": 240+}