Conversation
…ime defects it exposed The polymorph-tls suite (the one family member never examined) is the first corpus with resource-bearing stream/future payloads and borrow-carrying composed calls through FACT prepare/start adapters. tools/smoke-tls runs it: translate-only over all 8 prebuilt artifacts (8/8 accepted) plus full execution of the three suite compositions via ct-runner + wasi-shims. Peeling the onion surfaced three runtime defects, each with fail-on-pre-fix pins (runtime/tests/tls_smoke_pins_test.ts): 1. Structural ValType equality JSON.stringify'd resource-bearing types (cycle via ResourceTypeInfo.impl -> live handle tables) — the C2-D task.return fix had two unfixed siblings: task/streams.ts sameElemType, and lowerStream/lowerFuture's EAGERLY-evaluated diagnostic strings (thrown even on the success path). The recursive walk moved to cabi/types.ts (valTypeEqual) with a cycle-safe fmtValType for messages. 2. ResourceTypeInfo minted per resource-TABLE, not per ResourceIndex — exactly the aliasing plan-format.md C2 amendment #1 warns about. In a wac-composed component the src/dst future tables of a FACT transfer resolve own<R> through different table indices, so identity comparison saw two tokens for one resource: "future: destination element mismatch" on every resource-bearing element type. Tokens now unify per resourceTables[n].resource, matching wasmtime's ResourceIndex-level identity (47.0.3 guest_transfer does no runtime element re-check at all). 3. resource.transfer-borrow asserted a sync-call bracket, but the prepare/start protocol has none: borrows through [async-start] now get a FactStartScope window — numBorrows on the callee Task (checked at task.return, definitions.py lower_borrow:1821), lenders on the caller Subtask / a sync scope released at resolve delivery (lift_borrow:1517, Subtask.deliver_resolve:904). The fixes turn 4 official-suite xfails green (async/drop-cross-task-borrow :305,307; async/passing-resources:175,176) — pruned, lane expectation totals 1250/99 -> 1254/95 (webkit updated arithmetically; not runnable on this host, post-merge lane is the check). Suite status under deltic: all applicable cases green on every composition. Named xfail residues, tracked: ct-runner tag-gating gap (#25, e.g. delegated/decline is !delegated-signer-tagged N/A on delegated targets) and a callback-invoked-with-null-context-slot scheduler defect on the webcrypto-composed target only (#24, wit-bindgen async_support.rs:578). Gates: runtime 323/323 (seeds unset/1/4242), harness 69/69 (x3 seeds), sm-pinned + chromium + firefox lanes, websocket 55/55, webcrypto 31, webrtc 9, iroh exam 5/5, cargo tests. smoke-tls itself PASSes across seeds.
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.
Closes #18.
tools/smoke-tls/run.ts— translate-only over all 8 prebuilt polymorph-tls artifacts (8/8 accepted, import surfaces pure WASI) and full execution of the three suite compositions via ct-runner + wasi-shims, with named-xfail + stale-xfail discipline. Wired into the AGENTS.md gate list.Three runtime defects found and fixed (pins in
runtime/tests/tls_smoke_pins_test.ts; details in the commit message):sameElemType+ eagerJSON.stringifydiagnostics in lowerStream/lowerFuture)ResourceTypeInfoidentity minted per resource-table instead of perResourceIndex→ FACT stream/future transfers trapped "destination element mismatch" in wac-composed componentstransfer-borrowrefused outside a sync-call bracket → newFactStartScopewindow for the prepare/start protocol, per definitions.py lift_borrow/lower_borrow/deliver_resolve4 official-suite xfails went green and are pruned (lane totals 1254/95; webkit updated arithmetically — post-merge lane confirms). Residues filed: #24 (callback null-context-slot on the webcrypto-composed target), #25 (ct-runner tag gating).
Gates: runtime + harness across seeds {unset,1,4242}, sm-pinned, chromium + firefox lanes, websocket 55/55, webcrypto, webrtc, iroh exam 5/5, cargo.