Track B: networkless shell, context metrics, freeze, journal

- Claude Code and OpenCode: system shells replaced inside the sandbox by
  wrappers that run every command in a nested bubblewrap with an empty
  network namespace and no resolver socket; the CLI keeps its backend
  connection. dev-netprobe (new dev task) passes for all three agents:
  no network, no DNS from the shell
- context metrics for both tracks: provider input (cached/uncached),
  cumulative context through the tool loop, unique reference tokens and
  bundle coverage; report shows them; no dollar cost for Track B
- ajieval freeze: frozen state (clean Aji commit, binary, bundle,
  toolchains, docs, CLI versions and config fingerprints, tasks,
  evaluator, limits) and a shuffled cell order; matrix verifies it and
  runs cells sequentially in that order; ajieval journal
- docs: benchmark-authoring.md (roles, clean-context brief, E-G
  checklist); harness.md, protocol §39b, plan updated
This commit is contained in:
dev committed 2026-10-04 17:58:32 +03:00
1 parent 00cbb65447
commit 8b7911669d
16 files changed
+574 -43

No files matched your search

+81
View File
@@ -0,0 +1,81 @@
# Benchmark Authoring and References (E0-2, E-G)
Non-normative. How the private tasks and reference implementations for the Track B smoke (E-N) and later experiments are produced without contaminating them with knowledge of Aji's development.
## Separation of roles
| Role | Context | Sees | Produces |
|---|---|---|---|
| Language developer (the agent working in this repository) | the whole development history | this public repository | language, harness |
| Benchmark author | a fresh agent context in the private benchmark repository | only the brief below and [`harness.md`](harness.md) (task format, evaluator contract) | tasks, public and hidden tests, evaluator, manifest, reviewer notes |
| Reference writer, one per language | a fresh agent context per language | one task statement, its language's starter workspace and the documentation a smoke participant gets (for Aji exactly the frozen Agent Reference Bundle) | a reference solution |
| Owner | everything private | everything | reviews, freezes, runs |
Rules:
- The private repository is never shown to the language developer's conversation. Hidden tests, task designs and evaluator code are never pasted into it.
- The benchmark author writes the evaluator from the task statement and does **not** tune it to reference implementations.
- If a reference fails the evaluator because the task is ambiguous, the statement or evaluator is corrected and its `version` is increased, and the references are rerun. Then everything is frozen. After the freeze no change is allowed until the last run of the experiment.
- The Aji reference is written by a separate agent, never by the language developer.
Reference writers can run through the harness itself, which gives them exactly the participants' environment: `ajieval native` with the task, the language and generous limits. The runs live in the private repository, and their records are not shared with the language developer.
## Brief for the benchmark author
> You are designing a private held-out benchmark for comparing AI agents writing systems software in three languages: Aji/AIR, Rust and Zig. You have no role in Aji language design and must not optimize tasks for Aji.
>
> Create two benchmark tasks:
>
> 1. A memory-safety-heavy streaming/binary-processing systems task.
> 2. A concurrency-heavy bounded-processing task.
>
> The tasks must belong to these broad families, but must NOT reproduce public examples such as a simple length-prefixed frame decoder, append-only log, basic producer/consumer pipeline, or simple fan-out example.
>
> For each task produce:
>
> - a language-neutral task statement;
> - deterministic acceptance criteria;
> - public tests;
> - private hidden tests;
> - fuzz/property tests where applicable;
> - resource limits;
> - a machine evaluator implementing `CMD WORKSPACE LANGUAGE TASK_DIR` and returning the required JSON verdict;
> - a task manifest containing version and hashes;
> - reviewer notes explaining possible ambiguities;
> - no reference to Aji-specific constructs in the task statement.
>
> Requirements:
>
> - More than one implementation strategy must be valid.
> - Hidden tests must test only stated requirements.
> - Do not introduce arbitrary requirements that favor one language.
> - Include malformed/error cases.
> - The concurrency task must exercise boundedness, ownership/lifetime of work, termination and at least one failure/cancellation scenario.
> - The memory task must exercise incremental input, malformed data, integer/bounds edge cases and constrained memory.
> - Avoid task structures already described in public Aji documentation.
> - Do not reveal the hidden tests or concrete hidden task design outside this private benchmark repository.
>
> Task directory and evaluator format: see `harness.md` (task directory, evaluator contract). Each language gets a starter workspace with a README describing the program's interface and a public test command. The Aji/AIR workspace describes the entry point and the `aji run` invocation (grants, inputs), the way `docs/evaluation/dev-tasks/dev-echo/lang/aji_air/README.md` does.
## Gate E-G (before the 18 runs)
All of the following must hold:
```text
networkless shell for all native agents (verified: dev-netprobe)
native configurations frozen (ajieval freeze)
2 private tasks reviewed
evaluator frozen
task/evaluator hashes frozen
Rust references PASS
Zig references PASS
Aji/AIR references PASS
Aji compiler commit frozen
Agent Reference Bundle hash frozen
Rust/Zig toolchains + docs frozen
```
`ajieval freeze PLAN.json` records the frozen state and a random cell order. `ajieval matrix PLAN.json` refuses to run if anything changed. Observations during the runs go to `ajieval journal PLAN.json "…"` and are acted on only after the last run.