eval: evaluator environment, evaluator.log, ajieval evaluate
The evaluator now receives AJIEVAL_LANGUAGE, AJIEVAL_TOOLCHAIN_PATH and AJIEVAL_TOOLCHAIN_DIRS (the toolchain exactly as the agent's sandbox had it), its full output is saved as evaluator.log in the run directory, and ajieval evaluate runs an evaluator on any workspace exactly as the harness does. harness.md documents what a sandboxing evaluator should do (bind the toolchain dirs, private CARGO_HOME + --offline, build without the agent's target/ and caches, report infrastructure failures distinctly).
This commit is contained in:
1 parent
93cf553a77
commit
2ee1ff192f
27 files changed
+91
-7
No files matched your search
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "echo"
|
||||
version = "0.1.0"
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":12138803327433613668,"outputs":{"17276427787476938915":{"success":true,"status":"","code":0,"stdout":"rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: x86_64-unknown-linux-gnu\nrelease: 1.99.0\nLLVM version: 23.1.1\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/shkmv/.rustup/toolchains/1.99.0-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_primitive_alignment=\"16\"\ntarget_has_atomic_primitive_alignment=\"32\"\ntarget_has_atomic_primitive_alignment=\"64\"\ntarget_has_atomic_primitive_alignment=\"8\"\ntarget_has_atomic_primitive_alignment=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
+1
@@ -0,0 +1 @@
|
||||
22f82d773cfb6ce9
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":5244445300240561903,"features":"[]","declared_features":"[]","target":12538796586915257791,"profile":7333259681545804295,"path":4942398508502643691,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/echo-cd02f4ae2050300b/dep-bin-echo","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
/home/shkmv/Work/aji/docs/evaluation/dev-tasks/dev-echo/lang/rust/target/debug/deps/echo-cd02f4ae2050300b.d: src/main.rs
|
||||
|
||||
/home/shkmv/Work/aji/docs/evaluation/dev-tasks/dev-echo/lang/rust/target/debug/deps/echo-cd02f4ae2050300b: src/main.rs
|
||||
|
||||
src/main.rs:
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
/home/shkmv/Work/aji/docs/evaluation/dev-tasks/dev-echo/lang/rust/target/debug/echo: /home/shkmv/Work/aji/docs/evaluation/dev-tasks/dev-echo/lang/rust/src/main.rs
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Whitespace-only changes.
@@ -93,7 +93,28 @@ The harness calls `CMD WORKSPACE LANGUAGE TASK_DIR` outside the agent's sandbox.
|
||||
{"accepted": true, "gates": {"verifier": true, "public_tests": true, "hidden_functional": true, "hidden_regression": true, "fuzz": true, "resources": true, "deterministic_runs": true, "schedule_exploration": true}}
|
||||
```
|
||||
|
||||
`accepted` follows protocol §13: all mandatory gates pass, with no partial success. The evaluator runs untrusted code, so it must sandbox that code itself. The record stores the hash of the evaluator, or of `--evaluator-hash-path`, and the full verdict.
|
||||
`accepted` follows protocol §13: all mandatory gates pass, with no partial success.
|
||||
|
||||
**Evaluator environment.** The harness calls the evaluator with the caller's environment plus three variables that describe the language toolchain exactly as the agent's sandbox had it:
|
||||
|
||||
| Variable | Contents |
|
||||
|---|---|
|
||||
| `AJIEVAL_LANGUAGE` | `aji_air`, `rust` or `zig` |
|
||||
| `AJIEVAL_TOOLCHAIN_PATH` | the toolchain's PATH entries, `:`-separated |
|
||||
| `AJIEVAL_TOOLCHAIN_DIRS` | the directories to bind read-only, one per line |
|
||||
|
||||
An evaluator that sandboxes the code it builds and runs should:
|
||||
|
||||
- bind `AJIEVAL_TOOLCHAIN_DIRS` read-only and put `AJIEVAL_TOOLCHAIN_PATH` first on PATH, rather than relying on shims such as `~/.cargo/bin` or mise, which need the real HOME;
|
||||
- set a private `CARGO_HOME` and build with `--offline` (Rust);
|
||||
- build in a copy of the workspace without `target/`, `.zig-cache/` or `zig-out/`, which the agent built under `/work`;
|
||||
- report infrastructure failures distinctly from solution failures.
|
||||
|
||||
The evaluator's full output is stored in the run directory as `evaluator.log`; the record keeps only the verdict. To debug an evaluator without an agent run, call it exactly as the harness does:
|
||||
|
||||
```sh
|
||||
python3 -m ajieval evaluate --task TASK_DIR --language rust --workspace DIR --evaluator CMD --log evaluator.log
|
||||
``` The evaluator runs untrusted code, so it must sandbox that code itself. The record stores the hash of the evaluator, or of `--evaluator-hash-path`, and the full verdict.
|
||||
|
||||
## Run record (`RUN/run.json`, protocol §28)
|
||||
|
||||
|
||||
Reference in new issue
Block a user