Skip to content

async: FACT task.return skips the LiftOptions memory equality check (self-compares) #166

Description

@lannbot

From the 2026-08-20 conformance review. The code comment at the site is honest and detailed but is the only record; this issue is the tracking home it lacks.

The divergence

canon_task_return must check the options at the task.return site against the ones the task was lifted with — definitions.py:2389 via LiftOptions.equal (:643-646), which compares string encoding AND memory. For FACT passthrough tasks (task.factPassthrough), runtime/src/intrinsics/async_builtins.ts ~163-171 substitutes the memory half with a self-comparison (opts.memory vs itself, always true): the plan only carries the adapter's view of the lift memory, so a real comparison would false-reject legitimate shapes (e.g. cross-abi-calls.wast).

Net effect: a FACT-path task.return with a genuinely mismatched memory is accepted where the reference traps. wasmtime's own check is one-sided in the same way, but wasmtime corroborates rather than overrides.

Ask

Either:

  1. Thread the true lift-site memory through the plan so the check can be real — a descriptor-IR/plan-format contract change (versioned event, orchestrator-owned per the repo protocol); or
  2. Adjudicate the acceptance as a named divergence in docs/architecture.md (with the wasmtime-parity argument), and cross-link this issue from the code comment.

Classification from the review: C, high confidence the check is skipped, medium confidence on how much it matters in practice (requires a malformed-but-validating plan or an adapter/lift memory mismatch to observe).

Activity

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

    p2Minor bugs; desirable lower-priority featuresspec-divergenceBehavior diverges from the pinned CM reference; fix or adjudicate as a named divergence

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions