Adversarial conformance review follow-ups: runtime + translator (wave 1) - #103
Merged
Conversation
… 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
enabled auto-merge
August 11, 2026 02:42
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
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remediation for the 2026-08-10 adversarial conformance review (runtime +
translator vs component-model @ 73b7ad5
definitions.py; wasmtime-environ47.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
instance or host
drop()) now trap their reader at its rendezvous(never DROPPED/hang/internal assert); the host streams: a guest trap strands parked host read/write promises #66 retirement walk is
two-pass and completes despite per-end failures;
Future.drop()becomes total abandonment (embedder-api.md amendment A8); HostBuffer
enforces the 2^28-1 bound.
resource.dropdtors run through the reference'sStore.liftbracket (may_enter_fromtrap, same-instance exemptionvia
entering_set, impl-instance poisoning on trap); JS-initiateddrops get a
promisingentry for suspension-capable dtors(
ResourceTypeInfo.dtorHost); host own-wrappers track lends (drop/GCbackstop defer while lent; backstop traps poison instead of
catch {}); FACT start-call lender scopes unwind on everynon-poisoning exit.
Conformance/strictness
subtask.cancelpark takes thehas_sync_waiterdiscipline (join-trap now reachable per definitions.py:2463).
enter-sync-callcarries the reference reentrance gate(unreachable-by-construction today — instance imports form a DAG;
adjudication in the issue). Reachable residue: plan/task: component instance tree has no wire form — host-entry reentrance gate locks only the leaf #101.
?? 0table-instance defaults; deep schema gaps yield raw TypeError #94/translator-shim: enabling CM_VALUES would convert upstream unimplemented!() into a wasm32 abort — add tripwire #95 duplicate-import guard, loud table accessors +deep plan schema checks, CM_VALUES panic tripwire.
resume guard, attribution comment + pins, contract corrections, CM-5
upstream-tracker entry.
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-tlslost--allow-envin 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.