Skip to content

plan v3: error-context tables, task-return result types, synthetic-root entering sets - #104

Merged
lann merged 3 commits into
mainfrom
plan-v3-89
Aug 11, 2026
Merged

plan v3: error-context tables, task-return result types, synthetic-root entering sets#104
lann merged 3 commits into
mainfrom
plan-v3-89

Conversation

@lann

@lann lann commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Wave 2 of the 2026-08-10 adversarial-review remediation (wave 1: #103).

Fixes #89, #101.

  • formatVersion 3 (strict equality, same-commit bump). Producer and
    consumer in one commit per the compat rule; bindgen envelope fixtures
    regenerated, worldDigests byte-identical (digest-neutral like the v2
    table sections).
  • errorContextTables: emitted from environ's
    ComponentTypes.error_context_tables; the error-context-transfer
    intrinsic resolves through a dedicated accessor in the correct index
    space (closes v2 amendment 3(b) — whose "fails loudly" claim is
    corrected in the contract: the resource-table reuse could silently
    mis-route in composed components). No more ?? 0 defaults on the
    transfer path.
  • task-return resultType: raw wasmtime TypeTupleIndex (the FACT
    prepare-call key) in results, interned plan.types index in
    resultType; loader builds the raw→interned dictionary. The
    canon_task_return result-type check (definitions.py:2395) now covers
    FACT cross-component tasks — mismatch traps. The memory-identity half
    of options equality remains a named open gap (not unblocked by the
    type mapping; re-justified at the site).
  • Synthetic per-instantiation root (plan/task: component instance tree has no wire form — host-entry reentrance gate locks only the leaf #101 adjudication, v3 amendment
    4): every instance's parent is a per-Store root, so host entries lock
    {leaf, root} per the reference's entering_set while guest-to-guest
    stays {leaf} (sibling cycles are DAG-unreachable per enter-sync-call: sibling reentrance cycle (A -> C -> A) is untrapped — reference mandates trap; needs corpus/wasmtime differential #99). Trap
    poisoning releases the root at all three bracket-break sites — the
    documented post-trap re-entry divergence stays per-instance. No wire
    form needed; matches wasmtime's top-level-id shortcut by construction.

Merged with #82 (jspi hop atomicity): its poison seam
(notifyInstancePoisoned marker) and the root release compose at
boundary.ts poison().

Still open on #89's related note: the executor never consumes
instantiate-module.instance (investigative, no known misbehavior).

Gates

build, test-rust (19/0), test-runtime (455/0), conformance (1395 cmds,
0 failed, no stale xfails), sched-seeds (seeds 1/4242), test-bundle,
test-wasi-shims, test-ct-runner, examples, test-translate — all green
post-merge with origin/main.

lann added 2 commits August 10, 2026 23:05
errorContextTables section (TypeComponentLocalErrorContextTableIndex ->
owning instance; closes v2 amendment 3(b), whose 'fails loudly' claim
is corrected — the resource-table reuse could silently mis-route in
composed components); task-return decls carry resultType (interned)
with results repurposed to the raw TypeTupleIndex the FACT path keys
on — result-type check enabled for FACT tasks, memory-identity half
stays a named open gap; v1 amendment 4 (instance tree) closed
runtime-side via the synthetic per-instantiation root, no wire form
(#101 adjudication: host entering sets always include the root and
guest-to-guest cycles are DAG-unreachable, so intermediate-ancestor
locking is unobservable; matches wasmtime's top-level-id shortcut).
…etic-root entering sets

formatVersion 3 (strict, same-commit bump). Shim emits
errorContextTables from ComponentTypes.error_context_tables and interns
each task-return tuple (results = raw TypeTupleIndex, resultType =
plan.types index); loader requires both and builds the raw->interned
dictionary; executor gains errorContextTableInstance (loud PlanError,
no ?? 0) and resultTypesForTuple; error-context-transfer routes through
the correct index space. canon_task_return's result-type check now
covers FACT tasks (definitions.py:2395) — mismatch traps; the
memory-identity half remains open contract friction, re-justified at
the site.

Synthetic per-instantiation root (v3 amendment 4): every instance's
parent is a per-Store root flowing through selfAndAncestors, so host
entries lock {leaf, root} per the reference while guest-to-guest stays
{leaf}; trap poisoning releases the root (named divergence: post-trap
re-entry support stays per-instance) at all three bracket-break sites.
Bindgen envelope fixtures regenerated; digests byte-identical.
@lann
lann enabled auto-merge August 11, 2026 03:07
# Conflicts:
#	runtime/src/exec/boundary.ts
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.

plan v3: error-context tables + task_return_type mapping (transfer intrinsic resolves the wrong index space; contract loudness claim false)

1 participant