Skip to content

STDLIB-04d: IO externs — dedicated end-to-end test coverage #331

@hyperpolymath

Description

@hyperpolymath

Tracking issue for STDLIB-04d — row-split of STDLIB-04 (docs/TECH-DEBT.adoc:162, Refs #175).

Scope

The IO effect's externs in stdlib/effects.affine:

extern fn print(s: String) -> Unit / IO;
extern fn println(s: String) -> Unit / IO;
extern fn read_line() -> String / IO;
extern fn read_file(path: String) -> String / IO;
extern fn write_file(path: String, content: String) -> Unit / IO;

Current state (audit)

All five are wired on all backends (lib/interp.ml, lib/js_codegen.ml, lib/codegen_deno.ml). Per the 2026-05-24 audit, none have dedicated hermetic tests proving the surface lowering end-to-end on the OCaml interp + Deno codegen. This is test-debt, not impl-debt.

Acceptance

  • Hermetic e2e tests for each of the 5 externs (interp + Deno target at minimum)
  • write_file test uses Deno.makeTempDir (or interp tmpfile) — no fixture-litter
  • AOT gate uplifted (e.g. 281 → 286)
  • CAPABILITY-MATRIX + TECH-DEBT updated in the same PR

Severity / class

S3 — test coverage. Refs #175.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions