Skip to content

governance: ReScript frontend trips package anti-pattern policy on main #43

Open

Description

@hyperpolymath

What

governance / Language / package anti-pattern policy job is failing on main (verified 2026-06-01):

```
❌ ReScript files detected - use AffineScript instead
'# hypatia:ignore cicd_rules/banned_language_file' pragma if intentional)
```

Source: estate language policy 2026-05-25 banned ReScript estate-wide in favour of AffineScript.

Impact

Where the ReScript is

`frontend/src/` per `.claude/CLAUDE.md` — quandledb's UI shell.

Options

A. Migrate frontend/src → AffineScript (clean, estate-aligned; tracked separately under standards#252 estate-wide TS/ReScript→AffineScript campaign).

B. `.hypatia-ignore` pragma for `frontend/src/.res`** (escape hatch; keeps governance green until A lands).

C. Hand-port a minimal AffineScript shell that boots the same JSON API (smaller scope than full migration; aligned with estate STEP 8 first Mode-A batch pattern — see panll#72 / affinescript#505).

Out-of-scope today

The current krl/quandledb/tangle audit explicitly excludes estate-wide ReScript migration. This issue records the debt so that the next maintenance pass can take it.

Acceptance

Either `.hypatia-ignore` covers `frontend/`, or the ReScript files are gone and replaced by AffineScript equivalents, and the governance check is green on `main` for two consecutive pushes.

See also

  • standards#252 (estate ReScript→AffineScript umbrella)
  • panll#72 (Mode-A pattern: pure modules port first; user-shell defers)
  • affinescript#508 (AS `pub` gap in user-modules ESM codegen — blocks Mode-B for now)

Activity

  1. hyperpolymath commented on Jun 1, 2026

    @hyperpolymath
    OwnerAuthor

    Status update — AffineScript stdlib codegen has landed (2026-06-01) 📌

    Surfacing the AS-side baseline shift for the parking context here:

    • affinescript#522 (merged 2026-06-01) — Sqlite.affine codegen foundation; first stdlib extern with full Deno-ESM lowering + tests end-to-end.
    • affinescript#504 (merged 2026-06-01) — closes 6 of 10 STEP-3 Deno-ESM gaps; 6 new stdlib externs (stat helpers, byte ops, importMetaUrl) + wildcard-let codegen fix that was breaking strict-mode ESM.
    • affinescript#463 (merged 2026-05-30) — non-ASCII string literals emit correct \uXXXX/\u{X} Unicode escapes in Deno-ESM (unblocks any source with emoji/CJK/accented chars).
    • affinescript#421 — stdlib/json v0.3 rewired to hpm-json-rsr Zig FFI (11 externs).

    What now works that didn't before: stdlib externs (Sqlite, Deno, json) lower to runnable Deno-ESM via lib/codegen_deno.ml; the lowering pattern (declare in stdlib/*.affine → wire in deno_builtins table + prelude → smoke-test in tests/codegen-deno/*) is repeatable and tested.

    What is NOT yet resolved:

    • User-module codegen — only stdlib has codegen so far; user-defined pub extern fn in app code is not yet wired.
    • Stdlib primitive gaps still open: affinescript#160 (Http.fetch), #161 (portable Json — partially closed by stdlib/json v0.3), #162 (Dict/Map).
    • Migration parser affinescript#57; module-qualified type paths affinescript#228; effect-row v1 affinescript#59.

    Action for this ticket: No new sweep being kicked off here from this status post — surfacing so anyone landing here can see the current AS baseline. Re-evaluate when user-module codegen + the named stdlib primitives land.

    🤖 Filed as part of a cross-estate AS-status sweep on 2026-06-01.

  2. hyperpolymath commented on Jun 11, 2026

    @hyperpolymath
    OwnerAuthor

    Re-triage: the cited Mode-B blocker affinescript#508 (pub gap in user-module ESM codegen) is CLOSED (verified 2026-06-11). Mode-B may be viable now; see hyperpolymath/affinescript#563 for current upstream state.

  3. hyperpolymath commented on Jul 21, 2026

    @hyperpolymath
    OwnerAuthor

    Correction while triaging: this issue describes the frontend as ReScript, but the tree has no .res files — the frontend is a single AffineScript TEA program (frontend/src/ui/tea/quandle_gui.affine, checked via deno task check → affinescript check). Whatever governance policy fires here is pattern-matching on the wrong ecosystem; the fix should be evaluated against AffineScript, not ReScript.

    🤖 Generated with Claude Code

  4. hyperpolymath commented on Aug 3, 2026

    @hyperpolymath
    OwnerAuthor

    Correction: the frontend is AffineScript, not ReScript

    Measured on main: the only frontend source file is

    frontend/src/ui/tea/quandle_gui.affine
    

    plus frontend/deno.json. There are no .res/.resi files anywhere in the tree, and .claude/CLAUDE.md documents the frontend as "an AffineScript TEA program (Model/Msg/init/update/view/subs)".

    So the issue title/body describing a "ReScript frontend" is stale — it predates the AffineScript migration. The CHANGELOG's pre-absorption history still mentions Api.res, which is presumably where the label came from.

    This matters for the governance gate the issue is about: a package anti-pattern policy keyed on ReScript will never match, so whatever it is currently reporting is not measuring the real frontend. Worth re-checking what the gate actually inspects before treating it as satisfied.

  5. added
    chore
    governance
    migration
    on Aug 27, 2026
  6. added
    priority:p0
    scope:repo
    status:ready
    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

    choregovernancemigrationpriority:p0scope:repostatus:ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions