Phase 3: owner decisions on RFC 0012 implementation

- 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)
This commit is contained in:
dev committed 2026-10-04 16:57:59 +03:00
1 parent aaf32b6853
commit 929132c81d
8 files changed
+50 -8

No files matched your search

@@ -5,7 +5,8 @@ Scope: AIR format 0, features `cancellation`, `channels`, `sync`
Language version: 0.1
Measured Agent Reference Bundle growth on integration: +15.8 % tokens (estimate: 12–16 %).
Integrated into: spec 04 §37–§41; spec 04 §35; spec 05 §9; spec 07 §8.11; spec 07a; spec 08 §14; spec 11 §8; `reference/air-features.md`, `effects.md`, `error-codes.md`; `docs/design/decisions.md` DD-014; `docs/agent/bundle.txt`
Supersedes: —
Supersedes: —
Erratum (owner decision after implementation): rejected example 3 corrected to `E2002` (consumption after `send`); `E2001` is a non-consuming use. `mutex<T>` is always linear (spec 04 §40).
Resolves: Q-013 (deterministic `select` and the scheduler's choice points). Realizes spec 04 §7–§9, §12, §14–§16 for AIR. Builds on RFC 0011 (spec 04 §33–§36).
@@ -364,7 +365,8 @@ locked(%g: guard<u64>):
```text
channel.send %txb, %v, ok -> @sent, closed -> @closed, cancelled -> @c
sent:
%w = own.take %v ; E2001: %v was consumed by the send
%w = own.take %v ; E2002: %v was already consumed by the send
; (a non-consuming use, e.g. borrow.ref %v, is E2001)
```
```text