Skip to content

INT-03 S5: native wasi:filesystem (open/read/write/close) — unblocks INT-06 #485

Description

@hyperpolymath

ADR-015 canonical S5 (per .machine_readable/6a2/META.a2ml): bring up wasi:filesystem primitives — path_open / fd_read / fd_write (non-stdout) / fd_close. INT-03 substrate (#180) is otherwise shipped; this slice is what unblocks INT-06 (server-side runtime profile, ledger-only today, blocked-by INT-03).

Pattern is settled from S4a/S4b/S6b: declare imports in lib/wasi_runtime.ml, on-demand canonical-order indexing via optional_wasi + ctx.wasi_func_indices, Effect_sites pre-scan, surface builtins on the File capability with Effect File (reserved). Component path bridges to wasi:filesystem/types via the preview1→preview2 command/reactor adapter (already provisioned by S2 / S3 / S6a). Path encoding goes through the byte-IR (I32Load8U/I32Store8, shipped #339) the same way env_at/arg_at do.

Gates: hermetic test under tests/componentize/ that round-trips a small file through wasmtime run with a --dir preopen; combo regression that filesystem + clock + env + sock_shutdown imports stay canonically ordered.

Ledger: INT-03 (S1, substrate) follow-up. Refs #180.

Activity

  1. added
    majorMajor issue — significant scope, broader impact than a feature/bug
    on May 31, 2026
  2. hyperpolymath commented on Sep 21, 2026

    @hyperpolymath
    OwnerAuthor

    Preview1 S5 lowering is on the branch: file_open/file_read/file_fd_write/file_close → path_open/fd_read/fd_write/fd_close, Effect File, dirfd 3, combo canonical-order lock, gated tests/componentize/filesystem_smoke.sh (wasmtime run --dir host::.).

    Landed on wasi-485-closeout (main...feat/wasi-485-closeout). Index #175 closed.

  3. added a commit that references this issue on Sep 21, 2026
  4. hyperpolymath commented on Sep 21, 2026

    @hyperpolymath
    OwnerAuthor

    PR opened: #757 (feat/wasi-485-closeout → main).

  5. hyperpolymath commented on Sep 21, 2026

    @hyperpolymath
    OwnerAuthor

    Landed in #757 (merged to main, ff7ccd7). Preview1 file_open/file_read/file_fd_write/file_close → path_open/fd_read/fd_write/fd_close, Effect File, dirfd 3, combo lock, gated tests/componentize/filesystem_smoke.sh.

    Closing this follow-up. Native-preview2 filesystem is #486 remainder, not this ticket.

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

    majorMajor 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