- 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
- 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
Owner review of the RFC 0007 implementation:
- spec 11 §8.1: xoshiro256** with SplitMix64 seeding specified bit for
bit, fill consumes ceil(n/8) outputs LSB first; golden vector; own
implementation replaces std.Random (whose seeding differs)
- spec 07a: canonical run record; stdout/stderr as UTF-8 strings or
base64 objects, files always base64 objects
- spec 11 §8: blocked only at global quiescence (no runnable unit, no
known future event, unfinished execution)
- reserved feature resource_joins; test names are permanent and
rule-descriptive (renamed resource_*/borrow_* tests)
- plan: remaining Phase 2 order heap/regions -> unsafe -> hosted ->
reports -> aji.toml
- air: cap<K> and built-in enums (cap_error) as types; enum.switch over
built-in enums; cap.narrow terminator with ok/err targets; intrinsic
syntax (registry still empty: E0004); registries for effects,
capability kinds and built-in enums, synced with reference docs
- verifier: effect stage (E3101, flat, direct callees); cap.narrow form
check (E3202) and ok/err parameter rules (E5002, E1001); capabilities
are copyable, not zeroable, not comparable; sizes cap 8, built-in tag
- interp: host authority table; @main instantiation from grants by
parameter name with not_instantiated reasons; capabilities render as
opaque
- CLI: --grant P=KIND[:SCOPE], exit code 6; runner: grant: and
not_instantiated: headers, pending only for unsupported features
- conformance: 18 Phase 2 tests; 4000 mutants without a crash
Owner decisions after the Phase 0 review:
- precedence: docs/spec/ is the single normative source; RFCs are
decision records whose accepted rules are integrated into the spec in
the same change (AGENTS.md, docs/README.md, rfcs/README.md, DD-011)
- RFC 0004 Accepted (scope: AIR format 0, language 0.1)
- AIR format 0 frozen as the semantic baseline; spec 07 §8.7 defines the
only permitted additive changes, everything else needs `air 1` (DD-012)
- Q-019 resolved: deterministic instruction fuel (spec 11 §7). Outcome
`limit_exceeded` is a runner outcome, not a trap; `aji run --fuel N`,
exit code 5; conformance runs always use fuel (default 1 000 000,
`fuel:` header); fuel/schedule budget/quantum kept separate for P3
(DD-013)
- src/interp/machine.zig: format-0 interpreter on the air64 target;
checked/wrapping arithmetic, shifts, casts, aggregates, calls with a
1024-frame limit, traps as records with T0xxx codes
- aji run: prints one JSON run record; exit code 4 on trap
- conformance runner: `expect: run` with `result:`/`trap:`, every run
executed twice and compared byte-for-byte; header keys must be single
lowercase words
- Phase 0 corpus: 3 accept, 19 reject, 15 run tests (41 total)
- docs/roadmap/ -> docs/plan/ (implementation-plan.md becomes plan/README.md)
- docs/reference/design-decisions.md -> docs/design/decisions.md (+ DD-008..010)
- SPEC.md and docs/spec/INDEX.md merged into docs/spec/README.md
- new docs/design/open-questions.md: spec gaps found so far (Q-001..Q-018)
- new docs/dev/architecture.md and docs/dev/testing.md
- docs/README.md: layout, precedence, where new documents go
- update links in README, AGENTS, CONTRIBUTING, sources and test docs
Draft specification, RFCs, reference registries and examples, plus the
reference-implementation skeleton: build.zig, diagnostic envelope with
error-code registry synced to docs, aji CLI, conformance runner with seed
tests, CI and contributor docs.