Skip to content

docs(adr): ADR-015 WASI Preview2 / WASM Component-Model migration (Refs #180) - #252

Merged
hyperpolymath merged 1 commit into
mainfrom
int03-180-wasi-p2-adr
May 19, 2026
Merged

docs(adr): ADR-015 WASI Preview2 / WASM Component-Model migration (Refs #180)#252
hyperpolymath merged 1 commit into
mainfrom
int03-180-wasi-p2-adr

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

INT-03 slice S1 — ADR-015: WASI Preview2 / WASM Component-Model migration (#180)

lib/wasi_runtime.ml is wasi_snapshot_preview1.fd_write-to-stdout only
(no files/sockets/env/clock ⇒ no server-side runtime; INT-06 blocked).

The approach was an escalated one-way-door fork (AskUserQuestion,
2026-05-19): (a) expand preview1 surface, (b) preview1 + adapter, or
(c) full Component-Model re-target. Owner chose (c) — the largest,
one-way, highest-blast-radius path.

A HIGH one-way door gets its decision record before any irreversible
implementation
. This PR is slice S1: ADR + contract only, no codegen
change
.

Landed

  • ADR-015 in docs/specs/SETTLED-DECISIONS.adoc + .machine_readable/6a2/META.a2ml [[adr]] (format-matched to ADR-012/014). Staged S1..S6; the legacy preview1 path stays the default until S6 so the migration is reversible while in progress; the affinescript.ownership custom section is a multi-producer ABI (ephapax + typed-wasm) — format unchanged, coordinated upstream only.
  • wit/affinescript.wit — the WIT world of record (affinescript:cli world run; wasi:cli/clocks/filesystem/sockets 0.2 imports + wasi:cli/run export) with the slice rollout annotated.
  • docs/ECOSYSTEM.adoc + docs/TECH-DEBT.adoc INT-03 rows truthed.
  • INT-03 S2: provision component-model toolchain (wasm-tools, wasm-component-ld, wac) #251 filed: S2 toolchain prerequisite (wasm-tools/wasm-component-ld/wacabsent; hard gate on S3+), disclosed in the ADR.

Verification

dune test --force271/271 (no code change; zero regression).

Refs #180 (#251 = S2 toolchain gate). Not Closes — staged campaign; owner closes per ISSUE-CLOSURE.

🤖 Generated with Claude Code

#180)

INT-03 (#180): lib/wasi_runtime.ml is wasi_snapshot_preview1 fd_write to
stdout only — no files/sockets/env/clock, so no server-side runtime
(INT-06 blocked). The approach was an escalated one-way-door fork
(AskUserQuestion 2026-05-19); the owner chose the FULL WebAssembly
Component-Model re-target (WASI 0.2) over preview1-surface expansion
and the preview1+adapter option.

This is slice S1 — the decision record + contract, no codegen change
(the rigorous discipline for a HIGH one-way door: ADR before
irreversible implementation):

- ADR-015 added to docs/specs/SETTLED-DECISIONS.adoc + the
  .machine_readable/6a2/META.a2ml [[adr]] block (format-matched to
  ADR-012/014). Staged S1..S6; legacy preview1 path stays DEFAULT until
  S6 ⇒ reversible-in-progress. The affinescript.ownership custom
  section is a multi-producer ABI (ephapax + typed-wasm) and must
  survive verbatim — format unchanged, coordinated upstream only.
- wit/affinescript.wit — the WIT world of record (`affinescript:cli`
  world `run`), wasi:cli/clocks/filesystem/sockets 0.2 imports + the
  wasi:cli/run export, with the slice rollout annotated.
- docs/ECOSYSTEM.adoc + docs/TECH-DEBT.adoc INT-03 rows truthed.
- S2 toolchain prerequisite (wasm-tools/wasm-component-ld/wac — ABSENT;
  hard gate on S3+) filed as #251 and disclosed in the ADR.

Gate: dune test --force 271/271 (no code change; zero regression).

Refs #180 (#251 = S2 toolchain gate). Not Closes — INT-03 is the
staged campaign; owner closes per ISSUE-CLOSURE.
@hyperpolymath
hyperpolymath merged commit d88770a into main May 19, 2026
12 of 13 checks passed
@hyperpolymath
hyperpolymath deleted the int03-180-wasi-p2-adr branch May 19, 2026 16:26
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 44 issues detected

Severity Count
🔴 Critical 12
🟠 High 21
🟡 Medium 11

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stray AI.a2ml in root -- use 0-AI-MANIFEST.a2ml only",
    "type": "banned",
    "file": "AI.a2ml",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "high"
  },
  {
    "reason": "Superseded by 0-AI-MANIFEST.a2ml",
    "type": "banned",
    "file": "AI.djot",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "high"
  },
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/example/smoke_driver.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/cli.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/lib/compile.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/lib/runner.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant