fieldtest: remove-mut-var-assign — 4 examples, all working; milestone CLOSED

Post-audit downstream-LLM-author field test of the post-removal
Form-A surface. 4 fresh real-world programs written from DESIGN.md +
form_a.md + public examples only (no compiler source): running
sum-of-squares accumulator (loop/recur → 385), grade cascade
(let-threaded if → 4/2/0), Horner polynomial straight-line build-up
(let-shadow chain → 73), multi-state bracket scanner threading
(rest,depth,ok) by tail recursion → true/false. 0 bugs, 0 friction,
0 spec_gap, 4 working — every task clean and correct on the first
try with only let/if/loop/recur; all parse|render|parse
byte-identical; zero mut/var/assign tokens produced (a doc-faithful
author did not reach for the removed construct).

The closest-to-friction case (multi-state machine restates the full
state tuple per tail-call) is correctly classified working, not a
spec_gap: that explicit-dataflow cost is the local-reasoning pillar
working as designed; mut's implicit cross-iteration persistence is
exactly the failure class the removal eliminates. mut-keyword
rejection is fail-closed with a diagnostic that enumerates the
surviving forms (no tombstone, no-nostalgia, as spec'd).

Removal thesis empirically CONFIRMED — mut was redundant with
let/if/loop/recur in 100% of the fresh tasks. The
remove-mut-var-assign milestone is fully ratified and CLOSED:
spec+plan+iter, audit clean (architect [high] form_a.md fixed in
.tidy, bench causally exonerated), fieldtest clean. Roadmap P0
flipped [~]→[x]; WhatsNew user-facing entry appended.
This commit is contained in:
2026-05-18 11:28:34 +02:00
parent 4837871ddf
commit 5bb721178f
8 changed files with 414 additions and 19 deletions
+21 -19
View File
@@ -35,26 +35,28 @@ work progresses.
## P0 — In flight
- [~] **\[milestone\]** Remove `mut` / `var` / `assign`atomic
hard-removal of the local-mutable-state construct (`Term::Mut` +
`Term::Assign` + the `MutVar` surface decl; one indivisible
feature). `loop`/`recur` (shipped, closed) + `let`/`if` cover
every shipped use; the construct fails the feature-acceptance
criterion applied inverted (clause 2 redundant, clause 3 IS the
iterated-mutable-state bug class). Approach A: no deprecation
window, JSON tags fail closed as generic unknown-variant, codegen
alloca machinery kept (loop reuses it) + renamed `binder_allocas`,
shared `Term::Lam` escape guard keeps its `loop` half. Explicitly
decoupled from Stateful-islands (separate, deferred). Spec
approved + planned + implemented (605/0, loop/recur non-regression
green, removal made executable); milestone-close `audit` clean —
architect `[high]` (a spec-named in-tree grammar doc the iter
missed) fixed in `.tidy`, bench causally exonerated (HEAD vs
pre-milestone binaries `cmp`-byte-identical; the 3 `check.py`
firings are the tracked P2 `bump_s` staleness + the new P2
`max_us` `-n 5` false-positive — no ratify). Only `fieldtest`
(surface-touching) remains before close.
- [x] **\[milestone\]** Remove `mut` / `var` / `assign`CLOSED
2026-05-18. The local-mutable-state construct removed entirely
and atomically (`Term::Mut`/`Term::Assign`/`MutVar`, the 3 Form-A
keywords, the 4 `mut` `CheckError` variants, `mut_scope_stack`,
every exhaustive `Term` arm across 17 src files) in lockstep with
DESIGN.md + fixtures + drift trio + carve-out + roadmap; `loop`/
`recur` + `let`/`if` are the surviving forms. Justified by the
feature-acceptance criterion applied inverted (clause 2 redundant,
clause 3 IS the iterated-mutable-state bug class). Approach A: no
deprecation window, JSON tags fail closed; shared codegen alloca
machinery kept (loop reuses it, renamed `binder_allocas`) + the
`Term::Lam` escape-guard loop half byte-equivalent. spec/plan/
iter (`d1ad50e`/`f355899`/`07f0802`), milestone-close `audit`
clean (architect `[high]` form_a.md fixed in `.tidy` `4837871`;
bench causally exonerated HEAD vs pre-milestone bench binaries
`cmp`-byte-identical, no ratify), `fieldtest` clean (4 fresh
programs, all worked first try without mutable locals the
removal thesis empirically confirmed). Decoupled from
Stateful-islands. Stays here briefly for context; remove once
stale (full record in `docs/journals/INDEX.md`).
- context: `docs/specs/2026-05-18-remove-mut-var-assign.md`;
`docs/specs/2026-05-18-fieldtest-remove-mut-var-assign.md`;
`docs/journals/2026-05-18-iter-remove-mut-var-assign.1.md`;
`docs/journals/2026-05-18-audit-remove-mut-var-assign.md`