diff --git a/container-stack/svalinn/.machine_readable/6a2/STATE.a2ml b/container-stack/svalinn/.machine_readable/6a2/STATE.a2ml index 233d7794..47381e11 100644 --- a/container-stack/svalinn/.machine_readable/6a2/STATE.a2ml +++ b/container-stack/svalinn/.machine_readable/6a2/STATE.a2ml @@ -5,7 +5,7 @@ [metadata] project = "svalinn" version = "0.1.0" -last-updated = "2026-03-13" +last-updated = "2026-06-21" status = "active" session = "converted from scheme — 2026-04-11" @@ -36,13 +36,18 @@ milestones = [ ] [blockers-and-issues] +# NOTE: milestone %s above reflect ReScript feature-completeness; the +# ReScript -> AffineScript MIGRATION (PR #46 / stapeln #96) is NOT complete. issues = [ - # No blockers recorded + { id = "as-wasm-ctor-link", severity = "high", status = "fixed-carried", note = "AffineScript core-WASM codegen did not link cross-module enum constructors (gen_imports dropped TopType) -> `use prelude::{Some,None,...}` consumers failed `compile` with Codegen.UnboundVariable. Fixed + proven (stapeln #105); carried as container-stack/svalinn/patches/affinescript-wasm-ctor-link.patch over affinescript 58dc2a0 until it lands upstream. NOT affinescript #138 (closed = front-end half)." }, + { id = "gateway-port-4of11", severity = "medium", status = "in-progress", note = "4/11 src/*.affine compile to WASM (auth/AuthTypes, gateway/GatewayTypes, gateway/RateLimiter, vordr/VordrTypes). Remaining: 4 parse errors (Main `None=>{}`, host/Json `pub extern fn`, policy/PolicyEngine, vordr/Client); 2 sibling-module resolutions (auth/Authz `use AuthTypes`, gateway/SecurityHeaders `use Json` -- single-file compile has no src/** search path, needs a project/manifest build mode upstream); 1 WASM builtin gap (gateway/Metrics `float_to_string` unimplemented in core-WASM codegen)." }, ] [critical-next-actions] actions = [ - # No actions recorded + { priority = 1, action = "Land the constructor-link patch upstream in hyperpolymath/affinescript (ready-to-file issue text + patch in maintenance/affinescript-wasm-ctor-link/), then re-pin AFFINESCRIPT_REF to the merged SHA and drop the carried `git apply` in Containerfile + .github/workflows/svalinn-affine-build.yml." }, + { priority = 2, action = "Resolve the 4 gateway parse errors, the Metrics float_to_string WASM gap, and the sibling-module search-path need; re-run the per-module compile gate toward 11/11." }, + { priority = 3, action = "Wire svalinn-affine-build.yml to a green build at 11/11, then cut over (delete .res) per AFFINE-MIGRATION-TASK.md." }, ] [maintenance-status] diff --git a/container-stack/svalinn/AFFINE-MIGRATION-TASK.md b/container-stack/svalinn/AFFINE-MIGRATION-TASK.md index 4d954532..4cd45821 100644 --- a/container-stack/svalinn/AFFINE-MIGRATION-TASK.md +++ b/container-stack/svalinn/AFFINE-MIGRATION-TASK.md @@ -16,6 +16,31 @@ Do not claim done until every verification gate below passes locally. Work on branch `claude/stapeln-maintenance-followup-iEUKy` (PR #46, draft). Commit per logical module; push; keep the PR draft until all gates pass. +## Current status — 2026-06-21 (updated this session; supersedes the PR #46 framing) + +**Compiler blocker cracked + partial port landed.** The root blocker was NOT +affinescript #138 (closed — that was the front-end/resolver half); it was an +untracked **WASM-codegen** gap: `gen_imports` never linked imported enum +constructors, so `use prelude::{Some, None, ...}` consumers failed `compile` +with `Codegen.UnboundVariable`. Fixed + proven (stapeln #105) and **carried** as +`container-stack/svalinn/patches/affinescript-wasm-ctor-link.patch` over +affinescript `58dc2a0` (the current `AFFINESCRIPT_REF`) until it lands upstream. + +**Gateway port: 4/11 `src/*.affine` compile to WASM** — `auth/AuthTypes`, +`gateway/GatewayTypes`, `gateway/RateLimiter`, `vordr/VordrTypes`. Remaining: +- **4 parse errors** — `Main` (`None => {}`), `host/Json` (`pub extern fn`), + `policy/PolicyEngine`, `vordr/Client` (compiler-rejected syntax). +- **2 sibling-module resolutions** — `auth/Authz` (`use AuthTypes`), + `gateway/SecurityHeaders` (`use Json`): single-file `compile` has no `src/**` + search path; needs a project/manifest build mode upstream. +- **1 WASM builtin gap** — `gateway/Metrics`: `float_to_string` not implemented + in the core-WASM codegen. + +**Next:** land the patch upstream → re-pin `AFFINESCRIPT_REF` to the merged SHA +and drop the carried `git apply` → fix the parse/type/sibling issues → 11/11 +green → cutover. Full analysis + ready-to-file affinescript issue text: +`maintenance/affinescript-wasm-ctor-link/README.adoc`. + ## Prerequisites (must exist locally) - `opam` + OCaml ≥ 5.1, `dune` ≥ 3.14, `m4`, `git`