Skip to content

ESTATE: total ReScript-surface elimination from all .affine (committed goal; blocked-on #228) #229

@hyperpolymath

Description

@hyperpolymath

Is your feature request related to a problem? Please describe.

A subset of estate .affine files are unfinished ReScript→AffineScript hand-ports:
the file declares itself AffineScript (module …;) but the body still carries
ReScript surface syntax. A .affine file with ReScript syntax is neither valid
ReScript nor valid AffineScript — it is debt in limbo, and it cannot be
oracle-certified.

Found in the estate dialect-conformance audit (oracle main.exe check over 28
repos / ~1177 .affine on origin/main). Confirmed ReScript-surface
constructs seen in .affine: array<T> / option<T> / Dict.t<T> generics,
mutable record fields, type rec, open Mod, %%raw(\…`), (~x) => …arrow-fn,List(X)(vsList[X]), JSON.t, import … as`.

This is a committed goal: total elimination of ReScript surface from every
estate .affine file. The end state is that every .affine parses and checks
on affinescript main, with zero ReScript syntax remaining.

Describe the solution you'd like

Per-repo, oracle-validated RS→AffineScript completion ports, sequenced after
#228
:

  1. Blocked-on LANG: type/effect grammar has no module-qualified path — Pkg.Type/Pkg.Effect unrepresentable (estate-wide port blocker; ADR-014) #228 (ADR-014, module-qualified type/effect path). The oracle
    stops at the first parse error. Today only ~22 files fail first on RS
    surface — a floor, not the truth: e.g. burble has 19 first-fault-RS files +
    16 that fail first on Externs.Foo but are the same RS port with RS
    surface hidden behind the qualified-path fault. Until LANG: type/effect grammar has no module-qualified path — Pkg.Type/Pkg.Effect unrepresentable (estate-wide port blocker; ADR-014) #228 clears
    qualified-path faults, each file's full RS inventory is invisible and a port
    cannot be re-validated. LANG: type/effect grammar has no module-qualified path — Pkg.Type/Pkg.Effect unrepresentable (estate-wide port blocker; ADR-014) #228 landing is what makes a complete and
    verifiable
    RS sweep possible.
  2. Re-audit after LANG: type/effect grammar has no module-qualified path — Pkg.Type/Pkg.Effect unrepresentable (estate-wide port blocker; ADR-014) #228: rebuild oracle, re-run /tmp/affine-audit/audit.sh,
    produce the true per-file RS construct inventory.
  3. Derive the RS→AffineScript canonical map from the language side, not
    guessed.
    array<T>List[T] is mechanical, but mutable fields,
    Dict.t, type rec, %%raw, (~x) => map onto the affine/ownership model
    and several are redesigns. Any construct with no clean target is escalated
    as its own language-side issue/ADR (bidirectional evidence — same discipline
    that produced LANG: type/effect grammar has no module-qualified path — Pkg.Type/Pkg.Effect unrepresentable (estate-wide port blocker; ADR-014) #228), not patched divergently across N repos.
  4. Per-repo branch + PR, each oracle-validated locally before push (estate
    CI does not compile .affine), squash-merge, noreply author.
  5. Per-repo hands-off confirm before touching: policy hands-off is the
    ReScript ecosystem (.res); .affine-with-RS is an in-scope unfinished
    port — but confirm per repo it is an intended AffineScript target, not a
    deliberate interop artefact, before removal (burble's standing caveat).

Describe alternatives considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmajorMajor issue — significant scope, broader impact than a feature/bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions