Skip to content

spec: async-over-WasmGC convergence ABI + ADR-005 (Ephapax review, #31)#32

Merged
hyperpolymath merged 3 commits into
mainfrom
convergence/31-async-abi
May 19, 2026
Merged

spec: async-over-WasmGC convergence ABI + ADR-005 (Ephapax review, #31)#32
hyperpolymath merged 3 commits into
mainfrom
convergence/31-async-abi

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Records the shared async-over-WasmGC boundary protocol — surfaced by AffineScript #225 / ADR-013 and tracked by typed-wasm#31 — as a convergence-ABI spec section, plus the Ephapax co-stakeholder review.

What this adds

  • spec/async-convergence-abi.adoc — the agreed protocol: Thenable handle (synchronous i32 return), thenableThen(handle, closure) continuation in the shared closure ABI [fnId/table_idx@0, envPtr@4] via the module indirect-call table, host re-entry on settle, thenableResultJson / fixed-shape typed reader, { "__error" } host-boundary reject envelope, once-settle guarantee, and composition up the call chain (the basis of AffineScript ADR-013's transparent CPS surface, no JSPI).
  • ADR-005 in .machine_readable/6a2/META.a2ml (status: proposed).
  • Cross-reference from AGGREGATE-LIBRARY-VISION.adoc.

Ephapax convergence review (the typed-wasm#31 asks)

  • Co-stakeholder review of the protocol — reviewed against ephapax-wasm lowering + effect system (ADR-007..ADR-010).
  • Recorded as a typed-wasm convergence-ABI spec sectionspec/async-convergence-abi.adoc + ADR-005.
  • Divergence vs Ephapax's async loweringNONE. Ephapax has no async lowering yet (perform/handle emit unreachable), so adoption is purely additive. Its closure cell [table_idx@0, env_ptr@4] / call_indirect (env_ptr,param)->i32 is byte-identical to AffineScript #199. Planned one-shot resume(once) aligns with the once-settle guarantee. The {__error} envelope is a host-boundary convention and does not constrain Ephapax's native sum-type error model.

Status / not closing #31

Refs #31, not Closes#31 is the co-stakeholder review issue. ADR-005 is proposed; on explicit joint sign-off it becomes accepted and AffineScript #225 PR 2–4 (the CPS transform proper) are unblocked. Does not couple AffineScript to typed-wasm nor constrain Ephapax — binary-level convention only.

🤖 Generated with Claude Code

Records the shared async boundary protocol surfaced by AffineScript #225 /
ADR-013 as a typed-wasm convergence-ABI spec section, with the Ephapax
co-stakeholder review (typed-wasm#31).

- spec/async-convergence-abi.adoc: Thenable handle (sync i32 return),
  thenableThen continuation in the shared closure ABI
  [fnId/table_idx@0, envPtr@4] via the indirect-call table, host
  re-entry on settle, thenableResultJson / fixed-shape typed reader,
  { "__error" } host-boundary reject envelope, once-settle guarantee.
- Convergence review: NO DIVERGENCE. Ephapax has no async lowering yet
  (perform/handle emit unreachable) so adoption is additive; its closure
  cell [table_idx@0, env_ptr@4] / call_indirect (env_ptr,param)->i32 is
  byte-identical to AffineScript #199; planned one-shot resume(once)
  aligns with once-settle; {__error} is a boundary convention that does
  not constrain Ephapax's native sum-type error model.
- ADR-005 added to .machine_readable/6a2/META.a2ml (status: proposed,
  pending co-stakeholder sign-off).
- AGGREGATE-LIBRARY-VISION.adoc cross-references the new spec + ADR.

Refs #31

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hyperpolymath and others added 2 commits May 18, 2026 22:07
Co-stakeholder sign-off given (typed-wasm#31). Promote the async
convergence ABI from proposed to accepted:

- spec/async-convergence-abi.adoc status -> ACCEPTED 2026-05-18.
- ADR-005 status -> accepted; consequence note updated.

AffineScript #225 PR 2-4 (the transparent CPS transform proper) are
now unblocked.

Refs #31

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…formance (#31)

ADR-005 / async-convergence-abi.adoc had an internal ambiguity: the
continuation was specified both as (env_ptr, settled)->i32 AND as a value
read via the thenableResultJson accessor. Ratify the accessor model:
continuation signature is (env_ptr)->i32; the settled value is obtained
via thenableResultJson / a fixed-shape typed reader keyed by the Thenable
handle captured in env_ptr. Matches the proven #205 re-entry primitive and
AffineScript #225 PR 2; Ephapax conclusion unchanged (closure cell still
byte-identical; continuation is the no-extra-arg case of its general
(env_ptr,param)->i32).

Adds a Conformance — AffineScript section (the cross-repo marry-up table)
and records the amendment in ADR-005 + Status.

Refs typed-wasm#31
@hyperpolymath hyperpolymath merged commit ef29c36 into main May 19, 2026
@hyperpolymath hyperpolymath deleted the convergence/31-async-abi branch May 19, 2026 01:24
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 25 issues detected

Severity Count
🔴 Critical 6
🟠 High 8
🟡 Medium 11

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "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 actions/setup-node@v4 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action actions/setup-node@v4 needs attention",
    "type": "unpinned_action",
    "file": "e2e.yml",
    "action": "pin_sha",
    "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": "Action actions/upload-artifact@v4 needs attention",
    "type": "unpinned_action",
    "file": "release.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action actions/download-artifact@v4 needs attention",
    "type": "unpinned_action",
    "file": "release.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "believe_me undermines formal verification (1 occurrences, CWE-704)",
    "type": "believe_me",
    "file": "/home/runner/work/typed-wasm/typed-wasm/src/abi/TypedWasm/ABI/SessionProtocol.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "critical"
  },
  {
    "reason": "assert_total bypasses totality checker (1 occurrences, CWE-704)",
    "type": "assert_total",
    "file": "/home/runner/work/typed-wasm/typed-wasm/src/abi/TypedWasm/ABI/SessionProtocol.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "severity": "high"
  },
  {
    "reason": "believe_me undermines formal verification (1 occurrences, CWE-704)",
    "type": "believe_me",
    "file": "/home/runner/work/typed-wasm/typed-wasm/src/abi/TypedWasm/ABI/Echo.idr",
    "action": "flag",
    "rule_module": "code_safety",
    "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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant