Skip to content

Adversarial conformance review follow-ups: runtime + translator (wave 1) - #103

Merged
lann merged 8 commits into
mainfrom
adversarial-review-runtime-translator
Aug 11, 2026
Merged

Adversarial conformance review follow-ups: runtime + translator (wave 1)#103
lann merged 8 commits into
mainfrom
adversarial-review-runtime-translator

Conversation

@lann

@lann lann commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Remediation for the 2026-08-10 adversarial conformance review (runtime +
translator vs component-model @ 73b7ad5 definitions.py; wasmtime-environ
47.0.3 trusted). Six parallel implementation tracks + orchestrator glue,
one commit per issue group.

Fixes #84, #85, #86, #87, #88, #90, #91, #92, #93, #94, #95, #96, #97, #99.

Blocking findings closed

Conformance/strictness

Follow-ups filed during the wave

#100 (teardown walk strands healthy mid-call caller peers — pre-existing
#66 hole), #101 (instance parent tree has no wire form; joins #89's v3),
#102 (sync-start JSPI park lender residual). #89 (plan v3) is wave 2.

Drive-by: just smoke-tls lost --allow-env in the wosh rename (fab5c2e).

Gates

Full local ladder green: build, test-rust, test-runtime (440/0),
sched-seeds, conformance (1395 cmds, 0 failed, no stale xfails),
wasi-shims, ct-runner, bundle, ports, webrtc, shells (sm-pinned OK;
jsc-pinned skipped, arm64), browsers (chromium+firefox OK),
websocket-conformance 55/55, smoke-tls PASS (post-fix), smoke-c0 PASS.

lann added 8 commits August 10, 2026 22:39
… note, transcoder defensive guards

Scalar storeInt now raises the host-precondition AssertionError on
out-of-range values (reference: int.to_bytes OverflowError); the bulk
path keeps wrap, with the posture split documented in the header.
utf8-to-compact-utf16 gains wasmtime's dst-capacity bound as a Trap;
utf16-to-latin1 gains an O(1) overlap check (the other 11 ops snapshot).
…pline; SuspensionPoint resume guard; race/failure pins

SITE 5 now mirrors SITE 4 (hasSyncWaiter set across the park, ready on
hasPendingEvent per definitions.py:786-790), so canon_waitable_join's
trap (:2463) fires where the reference mandates it instead of a late
internal assert. SuspensionPoint.resume gains the reference's
cancellable-resume assert (:367). The async-cancel determinacy park is
now a NAMED divergence (§6, #92) with a cross-seed regression pin; the
async-lower onResolve attribution asymmetry is documented at the site
and its hostFailure routing pinned by test (#93).
definitions.py:581's may_enter_from trap, reconstructed at the fused-
adapter bracket. A guest-to-guest sibling cycle is unreachable by
construction (instance imports form a DAG; wasmtime elides the check on
exactly that ground, concurrent.rs:1876-1886), so this asserts an
invariant that was previously assumed. Corpus stays green: idle-sibling
barge-in (sync-barges-in.wast) and the trap-on-reenter cases pin both
sides. The reachable residue (parent chain has no wire form) is #101.
…rop-before-write is abandonment; host buffer bound

The #66 poisoning walk delivered DROPPED to parked guest future readers
— a state definitions.py keeps unreachable (:1183-1184) and asserts
against (:2614); the walk aborted mid-table on the resulting internal
assert. Futures now carry an abandonReason: the reader observes a Trap
(poisonFailure as cause) at its rendezvous — parked event delivery,
JSPI resume, or a later read — never DROPPED/COMPLETED/a hang; streams
keep spec-shaped DROPPED. The walk is two-pass (mark before notify,
order-independent) and completes despite per-end failures.

Future.drop()/dispose on a lowered, never-written future becomes total
abandonment via the same mechanism (embedder-api.md amendment A8) —
never throws, idempotent. HostBuffer enforces the 2^28-1 spec bound;
host cancelRead-vs-EOS is documented as deliberate and pinned.

The mayEnter-as-poisoned-proxy counterexample found during the #84
audit is #100.
…der unwind on trap paths

canon_resource_drop routes the dtor through callDtorGated, the
reference's Store.lift bracket (definitions.py:2326-2333 -> :579-584):
may_enter_from trap with the entering-set same-instance exemption, and
a trapping dtor poisons the IMPLEMENTING instance (leave_to skipped,
#66 walk fired). JS-initiated drops (using, FinalizationRegistry) get a
suspension-legal entry: ResourceTypeInfo.dtorHost, promising-wrapped by
the executor in jspi mode for suspension-capable dtors only (a
non-suspendable dtor keeps the exact sync path — promising's mandatory
microtask hop would leave the instance entered for a turn after every
drop). Guest-initiated drops stay synchronous; a suspension there
remains a deterministic frame-rule trap (#85 scope note).

Host-held own wrappers track lends (the num_lends analogue,
definitions.py:890-892/:1516): drop and the GC backstop defer while
lent, run on last release; the backstop's swallowed catch {} becomes
impl-instance poisoning + hostFailure recording.

FACT start-call paths release lenders on every non-poisoning exit
(trap rethrow, NeedsJspi bail, async-start resume-trap) per
intrinsics.md v0.2 amendment 2 (scope-clarified with #91); the sync
post-return leg's bare bracket is verified against the reference and
pinned rather than changed. Residual JSPI-park window is #102.
…table accessors, deep schema checks, CM_VALUES tripwire

Duplicate (module,field) core import slots with non-identical resolved
values now fail with a typed PlanError at instantiation (the JS import
object cannot express per-slot values; wasmtime's args are per-slot,
info.rs:438-445). streamTableInstance/futureTableInstance throw instead
of defaulting ?? 0; streamTables/futureTables join the loader's
required arrays (the shim always emits them). loadPlan shape-checks
initializers/trampolines/options/coreDefs into typed PlanErrors.
The shim's features() documents the CM_VALUES panic tripwire
(unimplemented! in trusted translate.rs behind the flag; wasm32 build
is panic=abort so catch_unwind would be dead code) and pins the
validation-phase rejection of start-section/value components by test.
…s, CM-5 tracker entry

§6 gains the async subtask.cancel non-atomicity divergence record
(#92); §7's dtor bullet now describes the implemented gate (#85) and
downgrades the §5 pure-wasm dtor path to a known limitation; host lend
tracking recorded (#86). descriptor-ir.md v0.2 amendments retract the
s64/u64 range-check claim and close the stale map open item (#98).
embedder-api.md amendment A8: Future.drop abandonment semantics (#90)
and cancelRead-vs-EOS by design (#97). intrinsics.md amendment 2
scope-clarified to the prepare/start windows (#91). CM-5: the
SharedFutureImpl.drop pending-buffer assert looks internally
inconsistent upstream — deltic's omission is deliberate (#84/#98).
tools/smoke-c0/common.ts reads POLYMORPH_ROOT at module scope since
fab5c2e; the leg tasks always had env via deno task, the smoke-tls
recipe did not.
@lann
lann enabled auto-merge August 11, 2026 02:42
@lann
lann merged commit f3e0cb2 into main Aug 11, 2026
4 checks passed
lann added a commit that referenced this pull request Aug 11, 2026
main took A8 for the future-drop-abandonment amendment (deltic#90/#97,
c855b33), so the module-identity amendment renumbers A8 -> A9 everywhere
(contracts section + all code comments, messages, and test names; main's
A8 references untouched). Other resolutions: smoke-tls --allow-env fixed
on both sides — kept main's comment with the scoped flag variant; import
unions in resources.ts / task/streams.ts; cross_copy_test's WrapperState
literal gains #86's lends/pendingDrop fields.

Full just gates re-run on the merged tree: runtime 451/0/3, protocol
22/0, wasi-shims 52/0/1, ct-runner 17/0/1, bundle 2/0 (incl. the A9
dual-copy pin), conformance 69/0, sched-seeds x2, examples, translate,
ports, webrtc 10/0, sm-pinned OK (jsc skipped arm64), websocket 55/55,
smoke-tls PASS, smoke-c0 PASS, browsers chromium+firefox OK.
This was referenced Aug 11, 2026
@lannbot
lannbot deleted the adversarial-review-runtime-translator branch August 23, 2026 16:51
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.

task/streams: trap-poisoning walk delivers DROPPED to a parked guest future reader (internal assert; walk aborts)

1 participant