- docs/evaluation/results/2026-10-05-p6a-9.md: 12 paired cells on
p6a-candidate, criteria fixed before the runs (output-token criterion
reported as not met), owner's assessment and hypothesis statuses
- phase 6 plan: P6A-9 and P6A-10 done, exit review; plan README: P6A done,
P4/P5 unpaused, next held-out benchmark Rust/Zig/Aji-source with three
difficulty levels, Aji/AIR only as a control
- checkpoint note renamed to its actual date (2026-10-05)
- programs/parallel_map, channel_transfer, tcp_echo_tasks: the Phase 3 exit
programs in .aji, with AIR equivalence on every schedule seed
- tools/source_coverage.py: every .aji construct (56) has a run/accept test
and, where it rejects, a reject test; CI step
- gaps filled: wrapping arithmetic run test, break outside a loop (E7006),
close_receiver without pending (E7004)
- plan: P6A-7 freeze criterion (owner decision); further twins gradually
P6A-11: when a .aji module passed the frontend but its AIR does not parse
(E0001-E0005) or has invalid SSA/CFG (E5001, E5002), the result is one
E7900 source.internal_compiler_error at the source construct, with the
AIR code in air_code; semantic codes (E0006 included) are unaffected.
Unit test injects the checkpoint's `ret %` defect.
P6A-12: source-decidable type errors are E7005 at the source:
- `as` checks lossless widening with the verifier's own rule (shared
function), and that both sides are integers
- slice.copy element types; own.free / region.destroy operand types
- element rules of channel.make<T> and mutex.make (no borrow, scope,
task, shield or guard, at any depth)
Probing every source position found no other E1001/E1002 leak. The old
test encoding the previous rule (verifier_widen, E1002) is replaced by
typecheck/lossy_widen (E7005); 9 typecheck tests. Spec 15 §10 states the
frontend/verifier boundary.
- lock ref m as x { … } cancelled { … }: mutex.lock on a ref<mutex<T>>
(a mutex is borrowed for the lock, a ref binding used as is); ok edge:
mutex.borrow bound as x; at every normal exit borrow.end x then
mutex.unlock; the guard is never a source value
- mutex.make/mutex.take; mutex<T> type; ref mr = m lends a mutex
- shield { … }: task.shield.begin/end at every exit (nesting by construction)
- task.check_cancel and task.join_cancel as outcome matches
- select: one borrow per endpoint, send values evaluated first and
deduplicated, every edge binds its own value then the unsent values;
bind count E7005, missing outcome E7004
- linear values never get frame storage (borrowed in place)
- liveness: select handled in the read and after walks
- Quick Reference: select edges bind `job` back (ok(x, job), closed(job));
every Quick Reference example now passes (no PENDING)
- tests: 6 run tests with AIR equivalence (mutex counter, select draw,
select same value, shield, join_cancel forwarding, cancelled recv), 10
rejects (E4304 x3, E3001, E2101, E7005 x2, E7004, E3101 x2, E4101)
- spec 15 §7/§9, quick reference, bundle notes, plan
- scope s { … }: task.scope.begin, task.scope.end at every normal exit
(scope ends generalized: borrow.end or task.scope.end, innermost first)
- task.spawn(s, f, args): call-like; named linear values moved (E7003);
lent borrows are bound first (inline borrow E7006); scope operand E7005
- task.join/cancel/cancelled; task<T>, sender<T>, receiver<T>, scope types
- channels: make<T>, dup, send, recv, close_sender, close_receiver; send,
recv and close_receiver are outcome matches; endpoints by name, borrowed
for the operation and ended on every edge (written `mut tx`: E7006)
- outcome rebinding: a value coming back under the name of a variable of
its type becomes the variable's value (pending(r))
- joins carry live variables only (pruned SSA): a linear value consumed
before a join does not travel to it; ordered after-walk over the
enclosing statement or tail, sibling arms not counted
- parser: a keyword after `.` is a member name (task.cancelled)
- conformance equivalence ignores schedule.choices (quantum counts AIR
instructions)
- tests: 10 run tests with AIR equivalence (Phase 3 programs), 12 rejects
(E4301, E4101 x2, E4002, E2001, E3101, E3002, E7006 x2, E7003, E0006,
E7005); Quick Reference tasks/channels programs now pass
- spec 15 §4/§6/§7, grammar, quick reference, bundle notes, plan
- results note docs/evaluation/results/2026-10-06-m-checkpoints.md:
both checkpoints, owner's assessment (IR-tax closed at the engineering
level, layer 7 GO; cost hypothesis open); plan status and order
- P6A-12: source type-check completeness (E1001 reached the verifier
from a source run); not a layer 7 blocker
- harness: metrics.agent_status (max_tokens for a reply cut at its
length limit, provider_rate_limited for 429/usage limits) and
metrics.evaluation_status (accepted/rejected/evaluator_error/
infrastructure_failure/not_evaluated), kept apart; termination records
max_tokens; checkpoint rows show both; evaluator contract: an
infrastructure failure sets "infrastructure": true
- interpreter memory test: fast form (20k-320k iterations, 256 KiB
threshold via Options.collect_threshold) in zig build test; full form
(100k/1M/4M) in zig build test-extended; CI job 'extended' also runs
conformance with --collect-every-step
A. Interpreter memory grew with the number of executed steps (one arena,
never reclaimed): block and call arguments, frames, frame storage, value
copies, place paths, channel buffers and per-step scratch now live in a
collectable execution heap. Between instructions, past a threshold, the
live state is copied into a fresh heap (sharing preserved) and the old one
released. Long-lived state (module, world, authority, task, channel and
region tables, the result) stays in the caller's arena. The guarded value
of a mutex is a separate cell (no interior pointers). Nothing observable
changes: fuel, schedule, PRNG, values, traps and run records are the same.
- test: five loop shapes x 100k/1M/4M iterations, measured with the
interpreter's own heap counters: live state after a collection does not
grow with the iteration count; the heap stays under a fixed bound
- conformance --collect-every-step: the second run of every run test
collects before every instruction; records must be byte-identical
(passes, also with --stress 20)
B. A void function whose body ends in an if/if-else/match/block/void call
lowered to `ret %` (malformed AIR, reported as E0001): it now lowers to
`ret`. Seven fall-through tests (six failed before).
Also: files_opened counts reads by relative path and file name; P6A-11
(malformed generated AIR as an internal compiler diagnostic) and Q-023
(ref of a whole array as an argument) recorded.
- source bundle: a /docs directory with QUICK.md (Quick Reference plus a
where-to-read table), language/*.md, diagnostics/errors.md and the AIR
bundle only under air/; built from docs/agent/source-bundle.txt
(> output files, @manifest includes) by zig build agent-reference
- Quick Reference examples are checked: every aji block must be an
excerpt of a conformance program in tests/conformance/source/quickref
(zig build test fails otherwise); QR fixes found by the check
(mut d = data, region not auto-borrowed, statement/borrow blocks that
could not verify, io_error match)
- frontend: task.*/channel.*/mutex.* are not-yet-implemented, not E7006
- aji lower --stats: mechanical_air_eliminated_raw and _normalized (each
byte-string materialization counted as one constant; spec 15 §11)
- harness: profile aji_source (doc_groups), per-file and per-group docs
metrics on distinctive lines, profile columns (tool calls, lowered AIR
raw/normalized, docs files read, IR-form and type-mismatch counts),
dev-echo aji_source variant, scripted run and test, source token report
- plan: P6A-8 done, P6A-9 criteria; Q-021/Q-022 resolved; unsafe block
deferred
- intrinsics from the registry as plain calls: fallible ones are outcome
matches or `or trap` (E7006 otherwise), infallible ones plain calls
- resource operands by name, borrowed mut for the one operation and ended
on every edge; a mut binding/parameter passes as is; `mut f` is E7006
- closes consume with `move` (E7003); no inserted closes (E3002/E3001)
- data operands explicit (ref/mut/byte string, E7005 otherwise)
- file<…>, stream, listener types; cap.narrow.prefix with cap_error edges
- ref/mut unchecked s[i] (also as a binding) and assume(c) under
effects [unsafe]; boundary left to the verifier (E6001)
- trusted is reserved and rejected (E7006)
- parameter names preserved; generated names avoid them (normative)
- parser: >> closes two type arguments
- conformance: `equivalent:` compares the run record with a reference
AIR program (hello, file_copy, tcp_echo, narrow ok/not_subset/invalid,
random)
- spec 15, grammar, quick reference (io_error match fixed), plan, examples
- explicit move for named linear values; E7003 with suggestion "move x";
move of a copyable value is E7006; moved state left to the verifier
- own.new/own.array/region.create/region.new/region.array/cap.narrow.budget
as outcome matches or with `or trap`; own.take/own.free/region.reset/
region.destroy as AIR names in AIR operand order
- region.new/region.array take an explicit ref/mut region binding (E7005
otherwise); reset/destroy end nothing (verifier E2104)
- match kind (enum/outcome/integer) decided by the parser; built-in error
enums (alloc_error, cap_error, io_error) matched exhaustively
- cap<K> types; linear owners borrowed in place
- features header = registry closure of the features used
- parameters keep their source names (grants by @main parameter name)
- aji lower --stats: mechanical_air_eliminated = 1 - source/AIR bytes
- spec 15, grammar, quick reference, plan updated
Owner rules: addressability is decided by lowering (a variable that is
borrowed, indexed or written through a place gets frame storage in the
entry block; otherwise SSA; by name, deterministic); borrows are bound
only by 'ref r = place;' / 'mut r = place;' and live to the end of the
block (borrow.end at every normal exit, including break/continue/return);
no shadowing of an active borrow in the same scope; ref/mut as call
arguments are temporaries ended after the call; *r only for scalar and
struct referents, slices via s[i], s[a..b], s.len; writes *r = v,
r.f = v, s[i] = v with the value evaluated first; split_at as the only
multi-result binding; slice.copy(mut dst, ref src) as the only copy;
[e; N] evaluates e once; byte strings as [u8; N] in frame storage with
a fixed escape set; borrow.index.proven only for the verifier's own
fact form (if i < s.len, same SSA values), otherwise checked.
Diagnostics on lowered AIR are deduplicated per code and source
location. aji lower --stats counts code only (no comment lines).
Tests: 10 run (architecture goldens: value-only has no local.alloc,
borrowed has local.alloc, proven indexing), 6 rejects incl.
verifier-caught E2101 (aliasing; parent used after split_at).
Expansion on these programs: 4-9x bytes, 2.2-6.6x lines.
Owner rules: struct/enum declarations in Rust form; one construction
form each (named struct literal, Enum::Variant); struct fields lowered
in declaration order, so field order in the source does not change the
AIR (golden test with two orders, one AIR); match over enums exhaustive
with no '_' (E7004 lists missing variants, E7006 for '_'), integer
match needs '_'; payload names scoped to their arm (enum.switch block
parameters); match as an expression with a merge block; arm-level
source map; no destructuring, guards or nested patterns. Type inference
limits written into spec 15 (one function, monomorphic, no search,
E7007). aji lower --stats: source/AIR size and expansion ratio.
Tests: 4 run (one shared golden), 7 rejects incl. verifier-caught E1003.
src/frontend: lexer, AST, parser for the full 6A grammar (first error
only: one E7001 with span, expected and found), lowering to canonical
text AIR with a line map. Variables become SSA with block parameters
carried across if/while/for/loop joins; short-circuit and/or; checked,
wrapping and cast forms; calls; untyped let literals typed from later
uses, never guessed (E7007). The frontend repairs nothing.
check.checkFile: .aji → frontend → existing AIR parser and verifier;
every diagnostic at its source location, AIR location kept as
air_line/air_col; trap records gain source_location. CLI: check/run on
.aji, aji lower [--annotate].
Runner: .aji tests with the same headers; every accepted module must
lower deterministically, be canonical (lower → parse → print
unchanged) and match <file>.expected if present. Layer-1 tests: 6 run,
6 E7xxx rejects, 2 verifier-caught (E1002, E3101).
First entry for the condition Aji/source: skeleton, types, statements,
borrows and moves, outcome matches, authority/allocation/I/O table,
tasks, cancellation, channels, select, mutex, diagnostics-to-repair
table, index into the full reference. Consistent with spec 15 (one
fix there: send of a copyable value takes no move).
Owner decision after the native smoke: a minimal .aji frontend over the
frozen Phase 0-3 semantics (removes SSA, block parameters, CFG, feature
header; keeps every semantically significant action explicit), with
quantitative targets; quick reference and generic diagnostics in
parallel; new harder held-out benchmark; four conditions Rust, Zig,
Aji/AIR, Aji/source. Protocol: seen held-out tasks become dev material.
feature_not_declared gains closure (the feature and its dependencies)
and canonical_header (the complete sorted header with everything the
body needed so far); missing_dependency gains canonical_header. The code
and reason are unchanged (spec 07 §8.7): a generic repair aid, the only
diagnostic strong agents hit in the native smoke.
Tasks under aliases M and C. Strong agents at the ceiling; Aji/AIR cost
comes from a fixed bundle read (~33k tokens), ~3x source size and 4-8x
output tokens, and, for the weak agent, mostly IR-form errors (SSA, CFG)
rather than safety-rule errors; E0006 the only friction for strong
agents. Not evidence; no language change follows directly.
18 runs, 17 accepted; frontier agents at ceiling; GLM Aji/AIR 1/2 (BUDGET).
No compression signal; Aji/AIR costs more for every agent. Plan and
protocol updated (budget-terminated runs are judged on their final
repository). ajieval profile: per-run termination, output tokens, source
size and diagnostic-code occurrences, without task content.
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).
- native runs derive toolchain invocations, failed verifier/test cycles,
first check and first public test from the transcript's shell commands
(exit codes, per-language diagnostic patterns in the profiles)
- ajieval summary: shareable PASS/FAIL matrix per task, per-cell metrics
(verified, first attempt, repair cycles, tool calls, time, unique
bundle, context via tools, provider cached/uncached, classification,
caught by) and aggregates by language and agent
- benchmark-authoring.md: owner's prompts for the benchmark author and
the per-language reference implementers, order of work, re-gate rule,
no commits to this repository between freeze and the 18th run, what
comes back to the language developer
- 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
ajieval native: Codex, Claude Code and OpenCode in bubblewrap with a
shared network (backend only matters), a fresh HOME holding only the
credential file and a harness-written minimal config (no user skills,
MCP, memory, agents, plugins, global instructions), /work, read-only
/docs and toolchain; evaluator and Aji repository invisible. Codex:
workspace-write sandbox (shell without network), web search and product
features off. Claude Code: tools Bash/Read/Edit/Write, strict MCP,
slash commands off. OpenCode: pure, no MCP, webfetch/websearch/task off.
Record aji-eval-native/1: CLI version, requested/transcript model,
effort, account mode, config, command line, times, transcript, usage
(normalized), patch, final repository, verdict.
Gate on dev-echo (Aji/AIR) accepted for all three: codex 0.160.0 +
gpt-6.1-sol (high), Claude Code 2.1.288 + claude-opus-5-5 (high),
OpenCode 1.18.34 + zai-coding-plan/glm-5.3-flash. Protocol §39b and
plan: Track B first (E-N0 done, E-N 18 runs), Track A after analysis.
--key-file / key_file: first line is the key, never recorded (only its
source). Self-tests run the openai and anthropic providers against a local
mock server: request translation, extras, token parameter, auth, tool
loop, token accounting, and no key in the record.
- providers: per-model request extras (e.g. reasoning_effort), key_env,
token_param (max_completion_tokens on api.openai.com); recorded
- docs pinned to the toolchain being run: Rust offline docs from the
sysroot, Zig langref and std source of the same installation; several
mounts under a read-only /docs; hashes recorded (cached for big trees)
- protocol: neutral model labels and calibration before classes (§2);
smoke gates, fixed Aji commit, fixed per-model reasoning mode, slope of
degradation (§39a); Track A controlled vs Track B native agents (§39b)
- plan: E-C calibration, E-G gates, E-N native-agent run
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
P3-10 and P3-11 moved to P7-10 and P7-11 (executor model for async and
blocking host operations); semantic development paused until the E-S
smoke test is analysed
- program_parallel_map: four exclusive loans of disjoint quarters
- program_channel_transfer: heap-owned messages moved through a bounded
channel; the 64-byte budget fits exactly the bounded worst case
- program_tcp_echo_tasks: server task, one echo task per connection,
two client tasks sharing address and message by shared loans
- runner --stress N: seeds 0..N-1 under quanta 1, 2, 7 and the test's
own; failures print the replay command; CI runs --stress 200
- plan: P3-12, P3-13 done
- spec 04 §40: mutex<T> always linear, never copyable; mutex.take is the
only way to dismantle it and needs no live borrow (hence no guard and
no waiter); no unlock or destructor
- P3-10 (async buffer claims, E4303) moved to P7-10 with task-aware
I/O; E4303 stays reserved; Phase 3 scope closed
- RFC 0012 erratum: consumption after send is E2002, use is E2001
- tests: take while borrowed (E2101), use after take (E3001)
- features cancellation, channels, sync supported
- AIR model/parser/printer: shield, sender<T>, receiver<T>, mutex<T>,
guard<T>; task.check_cancel, task.join.cancel, task.shield.*,
channel.*, select (bracketed arms), mutex.*
- verifier: arities (E5002), element rules (E4001/E1001, E0006
channel_transfer), guard_transfer gating, task.wait effect (gated for
task.join by cancellation), per-edge consumption with values and
handles returned as block parameters, loans moved to the handle on
task.join.cancel's cancelled edge, shield order (E4305), guard
children (E2102), critical-section rule (E4304)
- interpreter: waiting-operation rule (ready, else cancelled if
observable, else wait), shield depth, bounded and rendezvous channels
with FIFO offers, drain-then-close receiver, budget release at the
last close, select with seeded draw among ready arms, mutex wakeups;
schedule record also after a select draw
- report counts task.spawn, task.wait and channel allocations
- spec erratum: mutex<T> is linear (format 0 has no droppable
move-only class)
- 30 new conformance tests (10 run with schedules, 4 accept, 16
reject); 6000-run schedule stress and 4350 mutants without failure
revision 2 per owner review: reserved-feature dependencies may change
until publication (general rule, DD-014); task.join.cancel returns the
handle on cancelled with loans still LOANED; channel.sender.dup from
ref<sender<T>> (MPSC, receiver_dup reserved); task.wait required by
every suspending operation, task.join included, only in modules
declaring cancellation; sent values and handles come back as block
parameters on closed/cancelled edges; explicit channel states
spec 04 §37-§41 and pointers in §11-§16, §35, §36; spec 05 §9, 07
§8.11, 07a, 08 §14, 11 §6-§7; features cancellation, channels, sync
published (implementation pending); rwlock, channel_transfer,
receiver_dup, guard_transfer reserved; effect task.wait; E4304, E4305;
Q-013 resolved; bundle +15.8 % tokens (recorded)
features cancellation, channels, sync; bounded/rendezvous channels with
separate linear endpoints and a drain-then-close receiver protocol;
waiting-operation rule with ok/closed/cancelled edges; shields with
innermost-first nesting (E4305); mutex with function-bound guard and the
no-wait-while-locked rule (E4304); select over channel operations with
seeded choice among ready arms and per-edge ownership (Q-013); rwlock,
channel_transfer, guard_transfer reserved; owner decisions D1-D3
- interpreter core rewritten around explicit per-task frame stacks so a
task can be suspended at any instruction; behavior of all existing
tests unchanged
- tasks: scope and task<T> (function-bound; task_transfer and
task_borrow_returns reserved), spawn/join/cancel/cancelled/scope.end;
cooperative scheduler with seeded choice rule, separate schedule seed,
quantum = fuel unit, task limit (limit_exceeded kind tasks), global
quiescence over waiting tasks; schedule field in the run record
- verifier: Send/Share table (E4001, E4002), loans as task-owned borrows
(E4302 on early end, E4101 on conflicts), E4301 at scope end, task
effects (E3101)
- CLI --quantum, --task-limit, --schedule-seed; runner schedules:,
quantum:, task_limit:, limit_exceeded:
- fixed: schedule seed default used orelse/^ precedence wrongly
- 15 phase-3 conformance tests; 4000 mutants without a crash
- Agent Reference Bundle +10.9 % tokens (recorded)
function-bound task handles and scopes (task_transfer reserved); loan
state machine; task results Send and borrow-free (task_borrow_returns
reserved); spawn argument rules (E4001/E4002); cancel is a request only;
child trap terminates the execution; deterministic task limit
(limit_exceeded kind tasks); separate schedule seed; one instruction =
one fuel unit = one quantum step; narrowed native equivalence
Feature tasks: scope and task<T>, spawn/join/cancel/cancelled, borrows
lent to tasks until join (E4302, E4101), structural Send/Share with a
base table resolving Q-014 (E4001, E4002), cooperative scheduler with a
seeded choice rule, quantum, global fuel, schedule exploration.