B1 pre-registration Accepted (D1-D5; D4 with the no-tuning rule); cost proxies over all runs, safety metric renamed

This commit is contained in:
dev committed 2026-10-06 10:11:47 +03:00
1 parent 035ea19834
commit 6366d6c014
6 files changed
+134 -29

No files matched your search

+55 -24
View File
@@ -1,6 +1,6 @@
# B1: the first held-out benchmark after Phase 5 (pre-registration)
Status: **Proposed.** Accepted by the owner before the benchmark author starts. Frozen at `ajieval freeze`. After that nothing in this document changes until the last run.
Status: **Accepted** (owner, 2026-10-06). D1–D5 were decided as recorded at the end; D4 carries the no-tuning rule. Frozen at `ajieval freeze`. After that nothing in this document changes until the last run.
Decision context: owner, 2026-10-06. Phase 5 is closed. Phases 7 and 8 are on **hold** until B1 is analyzed.
```text
@@ -11,14 +11,14 @@ Phase 5 exit → B1 (this document) → analysis H1/H2/H4/H5 → decision: Phase
1. Does Aji/source raise verified success over Rust and Zig on systems tasks that load ownership, concurrency and atomics (H1)?
2. Does it reduce repair work (H2)?
3. How does success degrade from the strongest to the weakest agent stack in each language? The question is whether the degradation curve is flatter for Aji: the shape of degradation, not only the end points (H4).
4. What does a correct solution cost in tokens and time (H5 proxies; see D5)?
3. How does success degrade from the strongest to the weakest agent stack in each language? The question is whether the degradation curve is flatter for Aji: the shape of degradation, not only the end points. B1 measures this as a **stack-level capability compression signal**, not as evidence for H4 (D1).
4. What does a correct solution cost in tokens and time? Proxies only: H5 is not tested in B1 (D5).
## 2. Design
| Variable | Values |
|---|---|
| Language (condition) | Rust, Zig, Aji/source. Aji/AIR is not in the main matrix (D2). |
| Language (condition) | Rust, Zig, Aji/source. Aji/AIR is excluded (D2); a later diagnostic AIR experiment would not be part of B1. |
| Agent stack (Track B, native agents) | N1 Codex + `gpt-6.1-sol` (high), N2 Claude Code + `claude-opus-5-5` (high), N3 OpenCode + `zai-coding-plan/glm-5.3-flash`, configured as in P6A-9 |
| Task | 6 private held-out tasks, 2 per family (§3) |
| Repetition | 3 independent runs per cell |
@@ -68,7 +68,35 @@ Each task must be solvable in Rust, Zig and Aji/source. More than one implementa
| medium | the weakest stack understands the task and writes a program, but systems errors (ownership, races, orderings, resource paths) are common in at least one language |
| hard | beyond the weakest stack |
**H4 is tested on the medium level.** A task on which the weakest stack spends its whole budget reasoning and writes no program measures nothing about the language; task C in P6A-9 showed this. Distribution: 1 easy, 4 medium, 1 hard, with at least one medium task per family (D3). Calibration: D4.
The stack-level signal is measured on the medium level. A task on which the weakest stack spends its whole budget reasoning and writes no program measures nothing about the language; task C in P6A-9 showed this.
**Distribution (D3).**
- 6 tasks, 2 per family: A × 2, B × 2, C × 2.
- 1 easy, 4 medium and 1 hard.
- Every family has at least one medium task, so the easy and the hard task are never in the same family.
- The author assigns each task its **target band** before any pilot.
**Calibration (D4).** Every candidate task gets one pilot run per agent stack in **each** of the three languages: 9 runs per task, 54 for six tasks. A task is kept only if its pilot fits its target band under these language-symmetric rules, fixed now. "Strong" means N1 and N2, "weak" means N3, and "succeeds" means the evaluator accepts.
| Band | Rule |
|---|---|
| EASY | the strong stacks pass in ≥ 5 of their 6 language cells, AND the weak stack succeeds in ≥ 2 of 3 languages |
| MEDIUM | each strong stack succeeds in ≥ 2 of 3 languages, AND the weak stack succeeds in 1 or 2 of 3 languages, AND the weak stack produces code in all three languages |
| HARD | each strong stack succeeds in ≥ 2 of 3 languages, AND the weak stack succeeds in 0 of 3, AND in every language it produced a substantive implementation: a source file, and at least one compiler, verifier or test invocation on it |
**No tuning.** After a task's first pilot run the task is never edited. That covers its statement, tests, limits and evaluator. The only outcomes are:
```text
task fits its target band → kept unchanged
task does not fit its band → discarded completely; the author writes a new task; the new task gets a fresh pilot
```
Looking at where a pilot failed and adjusting the same task is forbidden.
- Before the first pilot, a reference writer may still report a real ambiguity, and the author may correct the task, as `benchmark-authoring.md` says.
- Pilot runs are never part of B1's statistics and are never reported as results of a language, not even to the language developer.
- Only the number of candidates discarded by calibration may be published, with no performance by language.
## 5. Metrics
@@ -85,12 +113,18 @@ Per run, from the run record (protocol §13–§16, §27):
New in B1 (implemented in `ajieval`, §8):
- **Statically prevented safety failures.** Safety diagnostics the compiler or verifier reported during the run, before any test ran. The code sets are fixed before freeze, one per language:
- **Pre-test statically caught safety errors.** Safety diagnostics the compiler or verifier reported during the run, before any test ran. The code sets are fixed before freeze, one per language:
- Aji: ownership, borrow, resource, island, concurrency, atomic and unsafe codes;
- Rust: borrow-checker, move, lifetime and `Send`/`Sync` codes;
- Zig: none (its safety checks are dynamic).
This metric says *where* a defect was stopped. It is not a success measure.
This metric is **not symmetric across languages**. It is used only to analyze the mechanism within Aji and Rust: where defects are stopped. A cross-language claim about safety ("Aji caught more, so Aji is safer") must not be made from it. Cross-language conclusions about safety come only from the hidden, fuzz and runtime gates of the evaluator.
- **Cost proxies (D5).** For each agent stack × language, the totals over **all** runs, failures included, divided by the accepted runs:
- `uncached_input_per_accepted`;
- `output_tokens_per_accepted`;
- `wall_seconds_per_accepted`.
Next to them: the median tokens, wall time and tool calls per run. An unreliable but cheap stack therefore does not look artificially cheap.
- **Race and atomic-ordering failures.** Failed runs classified `CONCURRENCY`, `DEADLOCK` or `ATOMIC_ORDERING`.
- **Unsafe usage.** A static count in the final program:
- Aji: functions declaring `unsafe`, `ref unchecked`, `assume`;
@@ -104,7 +138,12 @@ New in B1 (implemented in `ajieval`, §8):
2. **Degradation shape:** for each language, VSR along N1/N2 → N3, and the difference to the best baseline per agent stack. A flatter Aji curve is the signal. With three stacks this is three points, not a capability curve (D1).
3. **H1** (protocol §35): for the weakest stack, Aji VSR ≥ the best Rust/Zig VSR + 15 percentage points on families A and B. B1 reports this as *preliminary*: n = 18 per cell is too small for confirmation.
4. **H2:** median repair cycles among accepted runs, Aji ≤ 70 % of the best baseline.
5. **H4 (descriptive, D1):** N3 + Aji is compared with N1/N2 + Rust/Zig, non-inferior within 5 percentage points. The strongest form is N3 + Aji ≈ N1/N2 + Rust/Zig.
5. **Stack-level capability compression signal (D1, not H4).** N3 + Aji is compared with N1/N2 + Rust/Zig, non-inferior within 5 percentage points. The strongest form is N3 + Aji ≈ N1/N2 + Rust/Zig. It is reported as a preliminary practical signal: the stacks differ in more than the model. Strict H4 is only the follow-up controlled experiment (same scaffold, direct APIs, 4 capability levels, Rust / Zig / Aji).
5a. **Two figures** carry the analysis:
- stack strength against VSR, one line per language;
- task difficulty band (easy, medium, hard) against VSR per language.
The signal of interest is the weak stack keeping its success on Aji longer than on Rust/Zig across the four medium tasks, while the strong stacks stay at about the same level.
6. **Variance:** the spread across the three runs of each cell is reported. A cell whose three runs disagree is shown as such.
7. **Failures:** every failed run is classified (§27 category, where caught, §38 cause) before the summary is shared. No language change is decided from B1 before this classification.
8. **Negative results** are kept and reported (protocol §37).
@@ -127,20 +166,12 @@ As `benchmark-authoring.md`:
The language developer receives only numbers, codes, gate names, hashes and file names. B1's tasks become dev material once their results are used for a design decision (protocol §7).
## Decisions requested from the owner
## Decisions (owner, 2026-10-06)
- **D1. Track B and H4.** Protocol §39a says Track B results are never evidence for H4, because they measure model and agent stack together.
- Proposal: B1 reports H4 as *stack-level capability compression* (descriptive, labeled H4-B).
- Confirmatory H4 stays with Track A: one scaffold, direct APIs, 4 capability levels. That is the follow-up experiment.
- The alternative is to amend §39a.
- **D2. Aji/AIR.** Not in the main matrix.
- Proposal: leave it out entirely. AIR has served its research role (P6A-9), and every AIR run costs as much as a main run.
- The option: 1 run per cell as a diagnostic control (+54 runs).
- **D3. Difficulty distribution.** Proposal: 1 easy, 4 medium, 1 hard, with at least one medium per family.
- **D4. Calibration without selection bias.** If tasks are tuned until Rust/Zig fail often on the same agents, and then Aji is measured on those agents, the comparison is biased toward Aji: a selection effect. Proposal:
- calibration is **language-symmetric**: the operator makes one pilot run per stack in **each** of the three languages (54 runs);
- the criteria use only language-blind aggregates. For example, medium means N3 writes a compiling or verified program in ≥ 2 of the 3 languages, and N1/N2 pass in ≥ 2 of 3;
- pilot runs are discarded, never reported to the language developer, and never reused as B1 runs.
The cheaper alternative is the author's judgment plus the reference writers' cycle counts, with no pilots.
- **D5. H5.** On subscriptions there is no honest cost per solution (protocol §39a). Proposal: B1 reports output tokens, uncached input and wall time per *accepted* run as proxies. Cost in dollars waits for Track A.
| | Decision |
|---|---|
| D1 | **Accepted.** B1 is not evidence for H4: the stacks differ in more than the model. It reports a *stack-level capability compression signal*. Strict H4 needs the controlled follow-up. Protocol §39a stays unchanged. |
| D2 | **Accepted.** Aji/AIR is excluded completely. |
| D3 | **Accepted.** 1 easy, 4 medium, 1 hard; 2 tasks per family; at least one medium per family (§4). |
| D4 | **Accepted, with the no-tuning rule** (§4): symmetric calibration, 54 pilot runs, explicit band rules, and no edits after the first pilot. A misfitting task is discarded and replaced by a new one with a fresh pilot. Pilots are excluded from statistics and never reported by language. |
| D5 | **Accepted.** H5 is not tested; dollar cost is N/A. Cost proxies are counted over all runs per accepted run, next to the per-run medians (§5). |
+2 -1
View File
@@ -256,7 +256,7 @@ Lines are compared after removing line-number prefixes (`12→`, `12:`) and grep
- `diagnostics`: `E0001-E0006`, `E5001`, `E5002`, `E1001`, `E7005`, `other_E7xxx`, then `ownership`, `borrow` (including `memory.*`), `resource`, `concurrency`, `runtime_traps` by the code's kind in `reference/error-codes.md`, and `other` for every remaining code (effects, capabilities, unsafe…), so nothing is dropped; `ir_form_total` is the sum of the first three;
- `program`: source bytes, and for `aji_source` the lowered AIR bytes and both `mechanical_air_eliminated` metrics.
- B1 fields ([`b1-heldout-plan.md`](b1-heldout-plan.md) §5):
- `statically_prevented_safety`: safety diagnostics reported during the run. For Aji these are codes of kind ownership, borrow, init, memory, island, resource, concurrency, atomic, task, sync or unsafe. For Rust: E0382, E0499, E0502, E0505, E0506, E0507, E0596, E0597, E0716, E0373, plus the `Send`/`Sync` messages. For Zig it is 0, since its safety checks are dynamic.
- `pretest_static_safety_caught`: safety diagnostics reported during the run, before any test. The metric is not symmetric across languages: use it for the mechanism within Aji and Rust, never for a cross-language safety claim. For Aji these are codes of kind ownership, borrow, init, memory, island, resource, concurrency, atomic, task, sync or unsafe. For Rust: E0382, E0499, E0502, E0505, E0506, E0507, E0596, E0597, E0716, E0373, plus the `Send`/`Sync` messages. For Zig it is 0, since its safety checks are dynamic.
- `unsafe_usage`: a static count in the final workspace. For Aji: `effects [unsafe]`, `ref unchecked` and `assume`. For Rust: `unsafe`. For Zig: `@ptrCast`, `@ptrFromInt`, `@intFromPtr`, `@alignCast`, `@constCast`, `@volatileCast` and `@setRuntimeSafety(false)`.
- `failure_class`, `caught_by` and `atomic_error` come from `ajieval classify`. `--atomic-error memory_model|algorithmic` applies to failed runs of the atomic family.
@@ -275,6 +275,7 @@ python3 -m ajieval journal PLAN.json "observation" [--run RUN_ID]
python3 -m ajieval summary RUNS_DIR # shareable: PASS/FAIL matrix, per-cell metrics, aggregates
python3 -m ajieval checkpoint RUNS_DIR... [--json] # M checkpoint / P6A-9 rows (below)
python3 -m ajieval vsr RUNS_DIR... [--tasks T1,T2] [--json] # B1 §6.1: VSR per agent × language, 95 % Wilson intervals
python3 -m ajieval costs RUNS_DIR... [--tasks T1,T2] [--json] # B1 §5: totals over all runs per accepted run, per-run medians
python3 -m ajieval profile RUNS_DIR # shareable: termination, output tokens, tool calls, solution size, lowered AIR size (aji_source), docs files read, IR-form and type-mismatch diagnostic counts, diagnostic-code occurrences
```