Skip to content

Commit edb13f3

Browse files
docs(int-03): retarget TECH-DEBT + ECOSYSTEM to #485/#486/#487 follow-ups (#491)
## Summary - #180 closed 2026-05-31 after ADR-015 substrate (S1–S6b + byte-IR) shipped; both ledger docs still described the residual in prose without referencing the new follow-up issues - Updates the INT-03 row in `docs/TECH-DEBT.adoc` + `docs/ECOSYSTEM.adoc` to cite #485 (S5 filesystem), #486 (S6c default-flip), #487 (recv/send/accept sockets); also drops the slot-numbering drift artifact (the rows said \"S5 (native clocks/env/argv)\" mid-paragraph and then \"S5 (env_at/arg_at) DONE\" — two different meanings) - Retargets INT-06's `blocked by INT-03` → `blocked by #485` (the actual unblocking slice) ## Test plan - [x] `./tools/check-doc-truthing.sh` passes (presence invariants + over-claim ratchet) - [x] Confirmed text matches the per-slice PR refs in `CHANGELOG.md` and `git log --grep="ADR-015"` - No code touched — CI-neutral 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent cf35b97 commit edb13f3

2 files changed

Lines changed: 61 additions & 74 deletions

File tree

docs/ECOSYSTEM.adoc

Lines changed: 38 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -211,53 +211,44 @@ INT-01 ↔ INT-02. S1; unblocks INT-05/08/11. The `affinescript-dom-loader`
211211
satellite shell is downstream.
212212
|INT-03 |WASI preview2 / host I/O beyond stdout |#180 |S1, ADR-015
213213
ACCEPTED (owner-chosen full WASM Component-Model re-target). Staged
214-
S1..S6; legacy preview1 stdout path remains the default until S6c
215-
(reversible-in-progress). S2 toolchain provisioned (#251). S3
216-
DONE: `tools/componentize.sh` wraps the emitted core module into a
217-
valid WASI-0.2 component via the fetch-pinned preview1→preview2
218-
*reactor* adapter (wasmtime v44.0.1, sha256-verified); the
219-
`typedwasm.ownership` section is proven to SURVIVE the wrap;
220-
`tests/componentize/smoke.sh` gates it (SKIP-safe without the
221-
toolchain). S4a (clock) + S4b (env_count, arg_count) DONE:
222-
builtins lower to on-demand `wasi_snapshot_preview1.*` imports
223-
(Effect_sites pre-scan, canonical-order indexing through
224-
`ctx.wasi_func_indices`; zero impact on units that don't use them;
225-
verified with a multi-import combo regression). Component path
226-
bridges to `wasi:clocks`/`wasi:cli`. **S6a (WIT export lifting)
227-
DONE: `lib/codegen.ml` auto-emits a `_start : () -> ()` shim that
228-
calls `main` and drops its i32 result whenever a parameter-less
229-
`fn main()` is present. `tools/componentize.sh --command` wraps
230-
with the fetch-pinned preview1→preview2 *command* adapter
231-
(wasmtime v44.0.1, sha256 8ff2ea78…) — the resulting component
232-
exports `wasi:cli/run@0.2.x` per `wit/affinescript.wit`. End-to-end
233-
smoke `tests/componentize/command_smoke.sh` proves the lift, the
234-
ownership section survives, and `wasmtime run <component>` exits
235-
0 on real-host invoke. Purely additive: reactor consumers, the
236-
`__indirect_function_table` export, and game-loop hooks are
237-
byte-unchanged.** **S6b (sockets on-ramp) DONE: new
214+
S1..S6c; legacy preview1 stdout path remains the default until S6c
215+
(reversible-in-progress). **#180 closed 2026-05-31 — substrate
216+
done.** Shipped: S1 ADR (#252), S2 toolchain (#286, closes #251),
217+
S3 componentize on-ramp via fetch-pinned preview1→preview2
218+
*reactor* adapter (wasmtime v44.0.1, sha256-verified) —
219+
`typedwasm.ownership` survives the wrap (#288), S4a `clock_now_ms`
220+
+ S4b `env_count`/`arg_count` lowering to on-demand
221+
`wasi_snapshot_preview1.*` imports via Effect_sites pre-scan with
222+
canonical-order indexing through `ctx.wasi_func_indices` (component
223+
path bridges to `wasi:clocks`/`wasi:cli`; #289, #290), byte-level
224+
wasm IR (`I32Load8U`/`I32Store8` family) + `env_at`/`arg_at`
225+
string accessors lowering via `gen_str_at_via_get` (#339, #364),
226+
S6a WIT export lifting via `_start : () -> ()` shim around
227+
parameter-less `fn main()` + `tools/componentize.sh --command`
228+
fetch-pinned *command* adapter (sha256 8ff2ea78…) — component
229+
exports `wasi:cli/run@0.2.x` per `wit/affinescript.wit`, real-host
230+
`wasmtime run <component>` exits 0, purely additive (reactor
231+
consumers + `__indirect_function_table` + game-loop hooks
232+
byte-unchanged) (#343), S6b sockets on-ramp via
238233
`net_shutdown(fd, how) -> Int` builtin (Effect `Net`, reserved)
239-
lowers to `wasi_snapshot_preview1.sock_shutdown` via the same
240-
on-demand canonical-order pattern as S4a/S4b (`optional_wasi`
241-
entry 4); the command adapter bridges to `wasi:sockets/tcp`
242-
internally without surfacing a host-side `wasi:sockets/*`
243-
requirement; `tests/componentize/sockets_smoke.sh` gates the
244-
lift + a clock+env+sock combo for canonical-order regression;
245-
wasmtime real-host invoke exits 0 on `net_shutdown(stdin, RDWR)`
246-
(ENOTSOCK errno is dropped). Larger socket primitives
247-
(recv/send/accept) require byte-level wasm IR for buffer /
248-
network-address marshalling — tracked alongside env_at/arg_at.**
249-
String accessors (env_at/arg_at) gated on a
250-
byte-level wasm-IR extension (I32Load8U/I32Store8 absent today)
251-
— tracked as the next slice before/with S5. Remaining sub-slices
252-
(per ADR-015 canonical numbering in META.a2ml): S5 — bring up
253-
`wasi:filesystem` (open/read/write/close), which unblocks INT-06
254-
(server-side runtime profile); S6c — flip the default wasm
255-
target from preview1 → component, bundled with the optional
256-
native-preview2 cleanup that replaces the on-demand preview1
257-
shims emitted by S4a/S4b/S6b with direct `wasi:clocks` /
258-
`wasi:cli` / `wasi:sockets` calls (only pays off once preview2
259-
is the default, hence the bundling). WIT world of record:
260-
`wit/affinescript.wit`
234+
lowering to `wasi_snapshot_preview1.sock_shutdown`
235+
(`optional_wasi` entry 4; command adapter bridges to
236+
`wasi:sockets/tcp` without surfacing a host-side `wasi:sockets/*`
237+
requirement; ENOTSOCK errno on `net_shutdown(stdin, RDWR)`
238+
dropped; 81d9fc7). Test gates:
239+
`tests/componentize/{smoke,command_smoke,sockets_smoke}.sh` cover
240+
the contract end-to-end; ownership section byte-survives every
241+
wrap; combo-import canonical-order regression. Residual (filed
242+
2026-05-31): #485 — S5 native `wasi:filesystem`
243+
(open/read/write/close), unblocks INT-06 (server-side runtime
244+
profile); #486 — S6c flip default wasm target preview1 →
245+
component, bundled with native-preview2 cleanup replacing the
246+
on-demand preview1 shims emitted by S4a/S4b/S6b with direct
247+
`wasi:clocks` / `wasi:cli` / `wasi:sockets` calls (only pays off
248+
once preview2 is the default — the one-way door that ends
249+
reversibility); #487 — socket recv/send/accept primitives
250+
(byte-level buffer / network-address marshalling, helper mirrors
251+
`gen_str_at_via_get`). WIT world of record: `wit/affinescript.wit`
261252
|INT-04 |Publish compiler + runtime to JSR (then npm) |#181 |runtime
262253
packaging READY (affine-js + affinescript-tea JSR dry-run green;
263254
manual-only `publish-jsr.yml`; docs/PACKAGING.adoc). INT-01 dep
@@ -266,7 +257,7 @@ auth). Compiler-binary distribution = design fork #260
266257
|INT-05 |Loader-driven multi-module app bundling |ledger-only |planned
267258
(blocked by INT-02)
268259
|INT-06 |Server-side runtime profile (on INT-03 WASI p2) |ledger-only
269-
|planned (blocked by INT-03)
260+
|planned (blocked by #485)
270261
|INT-07 |`affinescript-tea` runtime satellite |#182 |runtime + run loop
271262
shipped (`TeaApp`/`parseTeaLayout`, Linear-msg enforced); INT-01 dep
272263
cleared (#253). Router/nav = separate INT-09

docs/TECH-DEBT.adoc

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -365,33 +365,29 @@ follow-up
365365
multi-ns import object, ownership accessor); 14 unit tests via pinned
366366
`deno task test` + `tests/modules/loader-bridge/` e2e on real
367367
compiler-emitted xmod wasm (closes INT-01↔INT-02). Unblocks INT-05/08/11
368-
|INT-03 |WASI preview2 / host I/O |S1→S6a |#180 ADR-015 (full
369-
Component-Model re-target, S1..S6); S2 toolchain #251 closed;
370-
S3 componentize done; S4a (clock) + S4b (env_count, arg_count)
371-
DONE — on-demand preview1 imports via Effect_sites pre-scan,
372-
canonical-order indexing through `ctx.wasi_func_indices`; combo
373-
regression proves no collision. String accessors (env_at/arg_at)
374-
gated on byte-level wasm IR (I32Load8U/I32Store8 absent today) —
375-
tracked next slice. **S6a (WIT export lifting) DONE:
376-
`lib/codegen.ml` auto-emits a `_start : () -> ()` shim whenever
377-
a parameter-less `fn main()` is present (additive, no regression
378-
on reactor consumers); `tools/componentize.sh --command` wraps
379-
with the fetch-pinned command adapter (sha256
380-
8ff2ea78… / wasmtime v44.0.1, provisioned alongside the reactor
381-
adapter); `tests/componentize/command_smoke.sh` gates the
382-
contract end-to-end — `wasi:cli/run` lifted, ownership section
383-
survives, `wasmtime run` exits 0. Real-host main-invoke now
384-
works via `wasmtime run <component>`.** Remaining S6
385-
sub-slices: S5 (native clocks/env/argv), S6b (`wasi:sockets`),
386-
S6c (flip the default wasm target from preview1 → component)
387-
regression proves no collision. **S5 (env_at/arg_at) DONE — wasm
388-
IR extended with the byte-level load/store family
389-
(I32Load8U/I32Store8 and siblings); accessors lower to on-demand
390-
`environ_get`/`args_get` imports paired with the existing
391-
`*_sizes_get` (dedup keeps each WASI import exactly once even when
392-
both `*_count` and `*_at` are used in the same unit); guest
393-
allocates a length-prefixed AS string and byte-copies from the
394-
WASI buffer.** Real-host main-invoke = S6 (WIT export lifting)
368+
|INT-03 |WASI preview2 / host I/O |S1 |#180 ADR-015 (full
369+
Component-Model re-target, S1..S6c). **#180 closed 2026-05-31 —
370+
substrate done.** Shipped: S1 ADR (#252), S2 toolchain (#286,
371+
closes #251), S3 componentize on-ramp via fetch-pinned
372+
preview1→preview2 reactor adapter — `typedwasm.ownership` survives
373+
the wrap (#288), S4a `clock_now_ms` (#289), S4b
374+
`env_count`/`arg_count` (#290) — on-demand preview1 imports via
375+
Effect_sites pre-scan, canonical-order indexing through
376+
`ctx.wasi_func_indices`, combo regression proves no collision —
377+
byte-level wasm IR + `env_at`/`arg_at` (#339, #364), S6a WIT
378+
export lifting via `_start : () -> ()` shim around parameter-less
379+
`fn main()` + `tools/componentize.sh --command` command adapter
380+
(wasmtime v44.0.1, sha256 8ff2ea78…) — component exports
381+
`wasi:cli/run@0.2.x`, real-host `wasmtime run <component>` exits 0
382+
(#343), S6b sockets on-ramp via `net_shutdown` builtin lowering to
383+
`wasi_snapshot_preview1.sock_shutdown` (command adapter bridges to
384+
`wasi:sockets/tcp`; 81d9fc7). Gates:
385+
`tests/componentize/{smoke,command_smoke,sockets_smoke}.sh`.
386+
Residual (filed 2026-05-31): #485 S5 native `wasi:filesystem`
387+
(open/read/write/close — unblocks INT-06), #486 S6c flip default
388+
wasm target preview1 → component + native-preview2 cleanup (one-way
389+
door), #487 socket recv/send/accept primitives (byte-level buffer
390+
/ network-address marshalling)
395391
|INT-04 |Publish to JSR/npm |S2 |#181 packaging READY (dry-run green,
396392
manual workflow); compiler-binary distribution decided = **ADR-019**
397393
(#260, Releases + thin Deno/JSR shim, staged S1..S4; per-file record

0 commit comments

Comments
 (0)