Skip to content

Commit 4e7ba5a

Browse files
hyperpolymathclaude
andcommitted
docs(estate): #229 ledger — oracle-grounded corrections (Refs #229)
Oracle-peeled the four allegedly "quick-win" *_gui.affine files. Findings, all compiler-verified, folded back into RESCRIPT-ELIMINATION.adoc before #248 merges (soundness-first; the foundation must be correct): 1. Record sigil is the DOMINANT estate blocker and was NOT in #229's named construct set. spec.md:414-421 prescribes the exact rewrite: expression- /pattern-position record literal `{`->`#{` (typed `T #{…}`); leave struct/type decl bodies. Oracle: bare `{x:1}` / `M{x:1}` / `M(x:1)` all parse-error; `Type #{…}` is the form. Added as the lead Tier-1 row. 2. Angle-brackets are NOT RS surface. Oracle: `Option<Int>` passes — both `<>` and `[ ]` type-application parse. The RS tell is the lowercase type name, not the brackets. Tier-1 row corrected (was an overclaim). 3. The text-scan inventory is a lower-bound triage signal, not the true per-file inventory: the oracle stops at the first parse error, so deeper RS layers are invisible until earlier ones go (the *_gui files scan as "List(X) only" but also need `#{` beneath). Added an explicit WARNING. 4. Scanner false positive: `mutable-field` matched a comment in panll/.../wizard.affine. panll carries no listed RS construct; its real fault is an enum trailing comma (not a #229 construct). panll reclassified OUT of #229 (scope now ~83 files / 11 repos). 5. No trivial single-construct quick wins exist — even one-RS-flagged files are multi-layer; per-repo plan + Tier-4 wording corrected. docs-only; dune build clean; 270 gate unaffected by construction. Refs #229. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9be1cfa commit 4e7ba5a

1 file changed

Lines changed: 57 additions & 19 deletions

File tree

docs/RESCRIPT-ELIMINATION.adoc

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,30 @@ INT-01 #178 qualified-value resolver* (see §"Cross-unit gating").
8181
|`proof-burrower` |3 |
8282
|`idaptik` |3 |
8383
|`bofj-kitt` |3 |
84-
|`panll` |1 |`src/ui/tea/wizard.affine` — `mutable-field`
85-
|`invariant-path` |1 |`src/ui/tea/invariant_path_gui.affine` — `List(X)` only
86-
|`git-scripts` |1 |`src/ui/tea/git_scripts_gui.affine` — `List(X)` only
87-
|`game-server-admin` |1 |`src/ui/tea/gsa_gui.affine` — `List(X)` only
88-
|*total* |*~84* |over 12 repos
84+
|`invariant-path` |1 |`src/ui/tea/invariant_path_gui.affine` — `List(X)` +
85+
record sigil (layered)
86+
|`git-scripts` |1 |`src/ui/tea/git_scripts_gui.affine` — `List(X)` +
87+
record sigil (layered)
88+
|`game-server-admin` |1 |`src/ui/tea/gsa_gui.affine` — `List(X)` + record
89+
sigil (layered)
90+
|*total* |*~83* |over 11 repos (panll removed — see note)
8991
|===
9092

91-
The four `*_gui.affine` single-file repos are pure `List(X)` — Tier-1
92-
mechanical, no module coupling: the genuine quick wins.
93+
[WARNING]
94+
====
95+
*The text-scan inventory is a lower-bound triage signal, not the true
96+
per-file inventory.* The oracle stops at the first parse error, so a file's
97+
deeper RS layers are invisible until earlier ones are removed (e.g. the
98+
`*_gui.affine` files scan as "`List(X)` only" but in fact also need the
99+
`#{` record sigil beneath it). And the scanner has false positives:
100+
`mutable-field` matched a *comment* in `panll/src/ui/tea/wizard.affine`
101+
("no shared mutable state") — panll carries *no* listed RS construct; its
102+
real first fault is a trailing comma in an `enum` variant list, which is
103+
not a #229 named construct. *`panll` is reclassified out of #229 scope.*
104+
The true per-file inventory only emerges by iterative oracle-peeling
105+
*during* each port — which is exactly why #229 mandates per-repo,
106+
oracle-validated, human-gated ports rather than one blind sweep.
107+
====
93108

94109
=== Non-RS DRIFT (NOT #229 scope — recorded so it is not mistaken for it)
95110

@@ -116,19 +131,39 @@ Every target form carries its grounding citation. Four tiers.
116131
|===
117132
|ReScript |AffineScript |Grounding
118133

119-
|`array<T>` |`[T]` |list/array type is `[T]` — `stdlib/collections.affine`,
120-
`stdlib/prelude.affine`; `lib/parser.mly:486,394` (type-app is `[ ]`)
121-
|`option<T>` / `result<T,E>` |`Option[T]` / `Result[T, E]` |
122-
`stdlib/prelude.affine:19-21` `pub type Option<T> = Some(T) \| None` /
123-
`Result<T,E> = Ok(T) \| Err(E)`; type-app `[ ]` per `lib/parser.mly:486`,
124-
`stdlib/traits.affine:89` `Into[T]`
125-
|generic `name<T>` |`Name[T]` |capitalise + `[ ]`; `lib/parser.mly:486`
126-
|`List(X)` |`[X]` |list type is `[T]` (the four `*_gui.affine` quick wins)
134+
|*expression-/pattern-position record literal* `{ f: v }` → `#{ f: v }`;
135+
typed `T { f: v }` → `T #{ f: v }` |the *record sigil* `#{…}` |*The
136+
dominant estate blocker — and NOT in #229's named construct set.*
137+
`docs/spec.md:414-421` prescribes exactly this rewrite ("rewrite each
138+
expression-position record literal `{`→`#{`; leave struct/type declaration
139+
bodies"); examples `spec.md:901,1320`. Oracle-verified: bare `{x:1}` /
140+
`M{x:1}` / `M(x:1)` all parse-error; `Type #{…}` is the form. Applies to
141+
record *patterns* in `match` too. Position-aware codemod (expr/pattern vs
142+
decl), *not* naive regex.
143+
|`List(X)` |`[X]` |list type is `[T]`; oracle-verified `List(Int)`
144+
parse-errors, `[Int]` passes. `stdlib/collections.affine`,
145+
`stdlib/prelude.affine`
146+
|lowercase `array<…>` / `option<…>` / `result<…>` |`[…]` / `Option[…]` /
147+
`Result[…]` (capitalise the type name) |The RS tell is the *lowercase type
148+
name*, **not** the angle brackets. Oracle-verified: `Option<Int>` *passes*
149+
— both `<>` and `[ ]` type-application parse (`lib/parser.mly:486`).
150+
Capitalising the name is the fix; bracket style is free choice (`[ ]`
151+
canonical per spec v2.0 / `stdlib/traits.affine:89`)
127152
|`open Mod` |`use Mod::*;` |`lib/parser.mly:172` `ImportGlob`
128153
|`type rec t = …` |`type t = …` |AS `type`/`enum` decls are self-referential
129154
by default (`stdlib/prelude.affine:19-21`); drop `rec`
130155
|===
131156

157+
[NOTE]
158+
====
159+
The record-sigil row was discovered by oracle-peeling the four allegedly
160+
"quick-win" `*_gui.affine` files: each is a *layered* port (`List(X)` was
161+
only the first wall; `#{` record literals + record patterns lie beneath).
162+
This corrects two earlier overclaims: (a) angle-brackets are *not* RS
163+
surface; (b) there are *no* trivial single-construct quick wins — even
164+
one-RS-flagged files are multi-layer.
165+
====
166+
132167
=== Tier 2 — Semantic redesign (maps onto the affine model; per-case, NO blind codemod)
133168

134169
[cols="2,3"]
@@ -180,7 +215,8 @@ qualified-*value* resolution gap (`lib/resolve.ml:719,797`
180215

181216
⇒ *`idaptik-dlc-vm` (28 files, 33% of #229 scope) is gated on the INT-01 #178
182217
qualified-value resolver.* `burble` (rs-generic/array/mutable/%%raw-dominated,
183-
not module-coupled) and the four `List(X)` quick-win repos are not gated and
218+
not module-coupled) and the three smallest non-coupled repos
219+
(`git-scripts`, `game-server-admin`, `invariant-path`) are not gated and
184220
proceed first. This does not reorder the mandate (#229 foundation first, as
185221
instructed); it is the foundation's own finding that the `idaptik-dlc-vm`
186222
*slice* of the per-repo work naturally sequences after INT-01 #178.
@@ -195,9 +231,11 @@ hands-off confirm before touching*: policy hands-off is the ReScript
195231
confirm per repo it is an intended AffineScript target, not a deliberate
196232
interop artefact (burble's standing caveat), before removal.
197233

198-
. *Quick wins (Tier-1 only, no coupling):* `git-scripts`, `game-server-admin`,
199-
`invariant-path` (one `List(X)` file each), then `panll` (`mutable-field`,
200-
Tier-2 single file).
234+
. *Smallest non-coupled (Tier-1, layered — not trivial):* `git-scripts`,
235+
`game-server-admin`, `invariant-path` (one file each: `List(X)` *and* the
236+
`#{` record sigil in expr + `match` pattern position; iterative
237+
oracle-peel). `panll` is *excluded* (no listed RS construct — see the
238+
lower-bound-triage warning above).
201239
. *`burble`* (32): Tier-1 mechanical pass first (re-validated), Tier-2
202240
`mutable`/labelled per-case, Tier-3 constructs blocked on ESC-01..03.
203241
. *Small tail:* `standards`, `developer-ecosystem`, `stapeln`,

0 commit comments

Comments
 (0)