E0-3: language-neutral agent scaffold and run recorder

tools/eval (stdlib Python): one agent loop, system prompt and tool set
(list/read/write/edit files, run, finish) for every language; language
profiles for aji_air, rust, zig carry only toolchain invocation, docs
location and command classification; bubblewrap sandbox without
network, read-only toolchain and /docs; providers: Anthropic Messages,
OpenAI-compatible (incl. local servers), scripted; run record per
protocol §28 (hashes, versions, limits, hardware, seed, all events,
patches, commands, final repository, first-generation snapshot,
evaluator verdicts, cost); metrics §14-§17; resumable matrix plans;
report (VSR, repair cycles, context, cost per correct solution);
classify (§27 categories, caught-by, smoke-test causes).

docs/evaluation/harness.md (task format for the private benchmark
repository, evaluator contract, record schema); dev-tasks/dev-echo
(harness development task, no benchmark family); smoke plan shape for
the owner's E-S choice (binary/stream parser, bounded pipeline);
self-tests in CI
This commit is contained in:
dev committed 2026-10-04 17:17:43 +03:00
1 parent d2932bd75a
commit b49003bdb9
38 files changed
+1735 -5

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env python3
"""Dev evaluator for dev-echo (public because the task is dev-set; real
evaluators live in the private benchmark repository and sandbox the code
they run).
usage: evaluator.py WORKSPACE LANGUAGE TASK_DIR -> JSON verdict on stdout
"""
import json, os, subprocess, sys
ws, lang = sys.argv[1], sys.argv[2]
REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
AJI = os.path.join(REPO, "zig-out", "bin", "aji")
cases = ["", "hello", "x" * 64, "line one\nline two\n"]
gates = {}
def build():
if lang == "rust":
return subprocess.run(["cargo", "build", "-q", "--offline"], cwd=ws, capture_output=True).returncode == 0
if lang == "zig":
return subprocess.run(["zig", "build-exe", "main.zig"], cwd=ws, capture_output=True).returncode == 0
return subprocess.run([AJI, "check", "main.air"], cwd=ws, capture_output=True).returncode == 0
def run(inp):
if lang == "aji_air":
p = subprocess.run([AJI, "run", "--grant", "in=io.read", "--grant", "out=io.write", "--stdin", inp, "main.air"], cwd=ws, capture_output=True, text=True, timeout=60)
try:
rec = json.loads(p.stdout)
except json.JSONDecodeError:
return None
return rec.get("stdout") if rec.get("status") == "returned" else None
exe = "./target/debug/echo" if lang == "rust" else "./main"
p = subprocess.run([exe], cwd=ws, input=inp, capture_output=True, text=True, timeout=60)
return p.stdout if p.returncode == 0 else None
gates["builds"] = build()
gates["functional"] = gates["builds"] and all(run(c) == c for c in cases)
print(json.dumps({"accepted": all(gates.values()), "gates": gates}))
@@ -0,0 +1,5 @@
# Interface
- Source: `main.air`, a text AIR module.
- Entry point: `@main(%in: cap<io.read>, %out: cap<io.write>)`; any return type.
- The program is run as `aji run --grant in=io.read --grant out=io.write --stdin TEXT main.air`; the bytes written to standard output appear in the run record's `stdout` field.
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
# Public test: one input.
out=$(aji run --grant in=io.read --grant out=io.write --stdin 'hello' main.air) || { echo "FAIL: aji run failed"; echo "$out"; exit 1; }
case "$out" in
*'"stdout":"hello"'*) echo "PASS";;
*) echo "FAIL: unexpected run record: $out"; exit 1;;
esac
@@ -0,0 +1,6 @@
[package]
name = "echo"
version = "0.1.0"
edition = "2021"
[dependencies]
@@ -0,0 +1,4 @@
# Interface
- Cargo package `echo` in this directory; the binary is `target/debug/echo`.
- The program reads standard input and writes standard output.
@@ -0,0 +1 @@
fn main() {}
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# Public test: one input.
cargo build -q --offline || { echo "FAIL: build"; exit 1; }
out=$(printf 'hello' | ./target/debug/echo)
[ "$out" = "hello" ] && echo PASS || { echo "FAIL: got '$out'"; exit 1; }
@@ -0,0 +1,4 @@
# Interface
- Source: `main.zig`, built with `zig build-exe main.zig` into `./main`.
- The program reads standard input and writes standard output.
@@ -0,0 +1 @@
pub fn main() void {}
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
# Public test: one input.
zig build-exe main.zig 2>&1 || { echo "FAIL: build"; exit 1; }
out=$(printf 'hello' | ./main)
[ "$out" = "hello" ] && echo PASS || { echo "FAIL: got '$out'"; exit 1; }
@@ -0,0 +1,7 @@
# Task: echo
Harness development task (dev set; not a benchmark family). Do not use it to evaluate anything.
Write a program that reads all of its standard input and writes exactly the same bytes to its standard output. The input is at most 64 bytes long and may be empty.
The repository contains a README with the program's interface for this language and a public test script, `sh test.sh`, which must pass.
@@ -0,0 +1,14 @@
{
"id": "dev-echo",
"version": "1",
"set": "dev",
"family": "harness-dev",
"prompt": "prompt.md",
"languages": {
"aji_air": {"workspace": "lang/aji_air", "test": "sh test.sh"},
"rust": {"workspace": "lang/rust", "test": "sh test.sh"},
"zig": {"workspace": "lang/zig", "test": "sh test.sh"}
},
"limits": {"tool_calls": 40, "total_tokens": 400000, "wall_seconds": 900, "command_timeout": 120},
"concurrency": false
}