Skip to content

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

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

Activity

  1. added
    enhancementNew capability or improvement to existing behaviour
    majorMajor issue — significant scope, broader impact than a feature/bug
    on May 18, 2026
  2. added 17 commits that reference this issue on May 19, 2026
  3. hyperpolymath commented on May 27, 2026

    @hyperpolymath
    OwnerAuthor

    Cross-reference (triage 2026-05-27): scope-disambiguated against #230 and #392 — these three are distinct, not consolidatable.

    Directions and target sets are disjoint. Consolidation is not safe.

  4. hyperpolymath commented on Jun 1, 2026

    @hyperpolymath
    OwnerAuthor

    Status update — AS stdlib codegen pattern now established (2026-06-01) 📌

    For ticket coordinators / anyone tracking this gap:

    What this means for the gap tracked in this ticket:

    • The codegen pattern is now a known repeatable shape: declare in stdlib/*.affine → wire in deno_builtins table + prelude → smoke-test in tests/codegen-deno/*.
    • This ticket remains open as a tracked gap; no new mass-port is being kicked off from this post.
    • Surfacing status so the broader picture stays accurate as more sub-tickets / dependent campaigns reference it.

    🤖 Cross-estate AS-status sweep on 2026-06-01.

  5. hyperpolymath commented on Sep 19, 2026

    @hyperpolymath
    OwnerAuthor

    Status measured today (2026-09-19) — the block is cleared and two of the five repos are already clean.

    blocked-on #228 no longer applies: #228 is implemented in full (parser layer in #241 5cca379, typecheck slice since landed — strip_module_qualifier, Module_resolution_error, module_quals, UnknownModule, with the four proposed tests in test/test_qualified_paths.ml).

    ReScript surface remaining in .affine files:

    Repo .affine files carrying ReScript surface
    burble 36 3 — client/web/src/bindings/PhoenixSocket.affine, client/web/src/app/voice/VoiceEngine.affine, client/web/src/app/voice/VoiceControls.affine
    git-scripts 5 2 — ui/src/HarApi.affine, ui/src/App.affine
    game-server-admin 2 0
    invariant-path 7 0
    idaptik-dlc-vm — repository no longer exists under that name (404); the remaining scope needs re-pointing or dropping

    So the work is now concrete: five files across two repos, plus one stale repo reference in this issue's own scope list. Keeping it open — that is a real residual, not a duplicate.

  6. added
    meta:umbrellaParent issue aggregating child issues
    scope:estateAffects many or all repos across the estate
    status:blockedCannot proceed until a dependency clears
    feeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes there
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement to existing behaviourfeeds:valence-shellFeeds valence-shell's proofs/engineering (D127): judge progress by what it contributes theremajorMajor issue — significant scope, broader impact than a feature/bugmeta:umbrellaParent issue aggregating child issuespriority:p1High - schedule nextscope:estateAffects many or all repos across the estatestatus:blockedCannot proceed until a dependency clears

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions