cli: lower mutex value operands iteratively

This commit is contained in:
dev committed 2026-10-11 18:41:13 +03:00
1 parent c5d0d09a81
commit 7ccded2b59
5 files changed
+348 -21

No files matched your search

+4 -1
View File
@@ -563,4 +563,7 @@ The [atomic operand increment](source-expression-depth-audit.md#atomic-operand-c
The [task.join increment](source-expression-depth-audit.md#task-join-operand-continuations) preserves consuming/type/result/void rules, spans, loans and host OOM through the shared driver. Build/units/format, exact ordinary conformance coverage, public check/lower parity, lifetime/related/CFG checks and 522 focused CLI checks pass, with valid call operands and exact rejections through 65,536 and runtime/fuel through 1,024. Read-only Claude core/follow-up reviews found no production or fixture defect. At that checkpoint a valid 16-level alternating join/spawn probe still aborted at 256 before/after, confirming the next spawn-argument callback. Other callbacks/walks, Q-060 full GC and Phase 6 gates remain open; no semantic/depth-limit change.
The [spawn increment](source-expression-depth-audit.md#task-spawn-argument-continuations) preserves scope/worker/arity/per-argument priority, moves, bound loans, emission and host OOM with shared continuations. Build/units/format, exact ordinary conformance coverage, public check/lower parity and lifetime/related/CFG/static-worker checks pass. The focused gate completes 497 distinct CLI checks across split runs, with original/formatted lower parity through 65,536, scalar/pair check through 65,536, mixed check through 32,768 then existing E5101, runtime/source-AIR/fuel through 1,024 and rejected positions through 65,536. Read-only Claude core/final follow-up reviews found no production or fixture defect, within their recorded scope. Nested mutex.make/take still aborts at 256/1,024 before/after and is next. Graph/place/control/liveness and multi-result callbacks, Q-060 full GC and Phase 6 exit gates remain open; no semantic/depth-limit change.
The [spawn increment](source-expression-depth-audit.md#task-spawn-argument-continuations) preserves scope/worker/arity/per-argument priority, moves, bound loans, emission and host OOM with shared continuations. Build/units/format, exact ordinary conformance coverage, public check/lower parity and lifetime/related/CFG/static-worker checks pass. The focused gate completes 497 distinct CLI checks across split runs, with original/formatted lower parity through 65,536, scalar/pair check through 65,536, mixed check through 32,768 then existing E5101, runtime/source-AIR/fuel through 1,024 and rejected positions through 65,536. Read-only Claude core/final follow-up reviews found no production or fixture defect, within their recorded scope. At that spawn checkpoint nested mutex.make/take aborted at 256/1,024 before/after and was next. Graph/place/control/liveness and multi-result callbacks, Q-060 full GC and Phase 6 exit gates remain open; no semantic/depth-limit change.
The [mutex make/take increment](source-expression-depth-audit.md#mutex-maketake-operand-continuations) preserves consuming/content/type priority, explicit moves, spans, loans, emission and host OOM. Build/units/format, lifetime/related/CFG and 310 focused CLI checks pass; scalar checks and original/formatted lower reach 65,536, mixed checks reach 32,768 then existing E5101, runtime/source-AIR/fuel reach 1,024 and rejected positions reach 65,536. All 1,793 ordinary conformance files have exact successful coverage. Frozen public check/lower parity passes (1,423/506) over `tests/conformance/**/*.aji`; read-only Claude core/final reviews found no production or fixture defect within their recorded scope. The filename-only follow-up subset passes 48 checks. Index operands still abort at 1,024 before/after; other walks, Q-060 and Phase 6 remain open. No semantic or depth-limit change.
+62 -5
View File
@@ -939,10 +939,67 @@ or fixture defect, relying on the core review plus the final diff, driver and
generic-worker code; it did not re-audit every consumer or run tests. Its exit,
formatted-check bound and schedule-seed wording suggestions are integrated.
The next finite probe, nested `mutex.take(mutex.make(...))`, accepts at 16
but aborts at 256/1,024 with no JSON before and after this spawn repair.
At this spawn checkpoint, nested `mutex.take(mutex.make(...))` accepts at 16
but aborts at 256/1,024 with no JSON before and after the spawn repair.
`task-spawn-next-probes.json` and matching raw stdout/stderr retain the evidence.
Mutex operands are the next confirmed callback repair; other walks remain open.
Mutex operands were the next confirmed callback repair; other walks remained open.
## Mutex make/take operand continuations
Mutex.make/take now use the shared consuming driver (spec 15 §7; spec 04
§40), preserving arity, explicit-move, no-hint operand descent, void/never
content rejection, element constraints and input-span type errors, followed
by unchanged wrapping/result names/emission. No-live-borrow rules remain
verifier-owned (E2101; E4101 for a live task loan); make is unlocked with no
allocation and take has no unlock/destructor. No semantic/effect/feature/
AIR/bundle/limit/runtime/scheduler change. Work states keep arena lifetime.
The copied former `ReferenceMutex` uses recursive oracle consuming descent,
sharing leaf/place/type/emission helpers. Shallow comparisons cover 36 expressions × 11 wrappers (396 forms),
each under three hints, including borrowed/owning/aggregate/nonvalue operands, moves,
CFG and error priority. New-driver tests cover 32,768 make/take pairs with
exact operation spans and a deep unknown leaf emitting nothing. Six public
accepted/rejected recovering/persistent OOM sweeps preserve host errors,
absence of partial AIR and actual backing cleanup on arena destruction.
Build/units/format pass. All 310 focused CLI checks complete: scalar check
through 65,536; mixed id/negation check through 32,768 then existing E5101 at
65,536 (327683 main instructions, 327684 whole-module). Lower/fmt exact AIR
parity reaches 65,536; formatted accepted checks repeat only through 1,024.
Quantum-one/seed-7 source/AIR runtime and exact fuel boundaries reach 1,024,
without scheduler records because these operations are not scheduling points.
Eight rejected families preserve code/fields/positions and identical
check/lower/run/report/explore JSON, plus formatted positions, through 65,536.
Existing valid `source/linear/mutex.aji` and rejected
`source/inferred_content/mutex_void.aji` retain their contracts. Lifetime,
related-position and CFG suites pass (188/409/146), and all 1,793 ordinary
conformance files have exact successful coverage. This includes existing
`source/layer8/reject/take_while_borrowed.aji`, its E2101 rejection twin and
multi-task mutex examples; this increment adds no new mutex stress experiment.
Frozen public check/lower parity passes (1,423/506, byte-exact) over
`tests/conformance/**/*.aji`; `task-mutex-public-parity.json/.log` record it.
Read-only Claude core review found no
production or fixture defect; final read-only follow-up agrees after reading
the final diff, current code and listed evidence. Neither review ran tests,
proved every remaining path or independently counted every gate. Final
follow-up documentation suggestions are integrated. Its filename
collision observation is corrected with distinct leaf-based names; the
48-check two-family subset passes after that filename-only change.
The shallow oracle compares value/error, problem/unimplemented, blocks,
allocations/constants/bindings, counter/current block, feature-use set, linear and
constant flags and borrow-parent mappings; other Lowerer state is unverified.
It covers return-expression fixtures, not every statement context. Deep unit
spans/errors test only the new scalar driver; id/negation alternation is CLI
coverage. OOM sweeps compare failure-free result tags, with baseline codes
checked separately; they do not compare failure-free error spans. Accepted
report/explore and full expression-suite execution are not claimed. No arbitrary
control/liveness or runtime-depth closure is established.
Follow-up index-operand nesting `a[a[...0usize]]` on `[usize; 1]` accepts
16/256 but aborts at 1,024 before/after. `task-mutex-next-probes.json` and raw
stdout/stderr record the confirmed remaining callback. An initial probe used
invalid `array<usize, 1>` syntax and was corrected before this failure claim.
## Remaining work
@@ -958,7 +1015,7 @@ includes a confirmed lowerer failure and inspection-only risks:
| Production path | Evidence and next scope |
|---|---|
| Parser `ifExpr`, block/statement and match/arm expression entry | Native callback re-entry remains. Bounded block/if regression probes above pass; arbitrary and alternating control/statement depth is unverified. |
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field, array and enum-payload descent are repaired above. Boolean, consuming own/region, atomic, task.join and spawn operands are repaired above. Mutex make/take callbacks independently abort at 256/1,024 before and after the spawn repair. Multi-result task.join_cancel inputs and other graph/place/control callbacks retain native entry. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field, array and enum-payload descent are repaired above. Boolean, consuming own/region, atomic, task.join and spawn operands are repaired above. Mutex make/take operands are repaired above, with final gates pending. Index operands independently abort at 1,024 before/after the mutex repair. Multi-result task.join_cancel inputs and other graph/place/control callbacks retain native entry. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
| Lowerer use-after-region/liveness and assignment scans (`After`, first-use/read scans, `blockAssigns`/`stmtAssigns`/`exprAssigns`, match/select helpers) | Recursive AST walks inspected; audit their callers and finite deep inputs separately. |
The formatter's expression-marking traversal already uses a worklist, as
@@ -967,5 +1024,5 @@ claim every listed callback fails, or that all other paths have been cleared.
Q-061 and Phase 6 remain open; Q-060's unfinished full GC validation is
independent. The five reviewed increments now have a scoped external review;
the host-OOM follow-up and intermediate repairs have no separate review.
The struct/value-field, array, enum-payload, task.join and task.spawn
The struct/value-field, array, enum-payload, task.join, task.spawn and mutex
increments have the scoped reviews recorded above.
+16 -1
View File
@@ -778,7 +778,22 @@ E5101 at 65,536. Runtime/source-AIR/fuel checks reach 1,024; rejected family
positions reach 65,536; formatted accepted checks are repeated only through
1,024. Runtime uses quantum one/seed 7, with extra seeds 0/1 through 16.
Read-only Claude core/final follow-up reviews found no production or fixture
defect within their recorded scope. Nested mutex.make/take still aborts at
defect within their recorded scope. At this spawn checkpoint nested mutex.make/take aborts at
256/1,024 before/after and is next. Remaining graph/place/control/liveness and
multi-result callbacks keep Q-061 open; no semantic/depth-limit change. Q-060
full GC and Phase 6 exit gates remain open.
### Mutex make/take operand depth increment
The [mutex increment](../design/source-expression-depth-audit.md#mutex-maketake-operand-continuations)
preserves consuming/content/type priority, explicit moves, spans, loans,
emission and host OOM with the existing driver. Build/units/format and 310
focused CLI checks pass; scalar check and original/formatted lower reach
65,536, mixed check reaches 32,768 then existing E5101. Runtime/source-AIR/
fuel and formatted accepted checks reach 1,024; rejected positions reach
65,536. Lifetime/related/CFG suites and all 1,793 ordinary conformance
files with exact coverage and public frozen check/lower parity (1,423/506)
pass over `tests/conformance/**/*.aji`. Read-only Claude core/final reviews
found no production or fixture defect within their recorded scope. The filename-only follow-up subset passes 48 checks. Index operands still abort
at 1,024 before/after; other callbacks/walks, Q-060 and Phase 6 remain open.
No semantic or depth-limit change.