Harness core: per-case fresh instances and case timeout - #52
Merged
Conversation
The gating jco adapters need two things the viewer's live page did not: a per-case wall bound (the runner grew one in #45; without it a wedged case burns the leg's whole outer timeout with no per-case attribution) and instance-per-case granularity (#22's wasmtime default; instantiation-mode transpiles can re-instantiate where module-mode singletons cannot). Both land as opt-in runCases options so the loop stays single-owner (#5): default behavior is unchanged. - freshCases: census and striping still come from `cases`; each execution re-enumerates through the factory and runs the matching case. A vanished case throws — drift is unsound, not a failing case. - caseTimeoutMs: on expiry the case fails with {"limit-exceeded":"case-timeout"} provenance (the schema's existing vocabulary) and the Rust runner's detail wording, and the loop moves on. JSPI attempts cannot be cancelled, so the doc comment requires pairing with freshCases: a timed-out shared instance may be wedged mid-suspension, poisoning every later case. Selftest grows a synthetic-case section (the loop only needs name()/run()): the hanging case produces the limit-exceeded row without stalling the loop, thrown payloads still map correctly under the race, enumeration is counted per case, and a vanished case throws. Facade version to 0.2.0. First consumer: component-websocket's driver-ct jco legs, replacing its local pre-facade harness copy. Verification: just verify-viewer (aggregate parity, sample 1/1/1, fixture 6/1/0/1na, striping partition equality, the new section).
lann
added a commit
to polymorph-components/polymorph-websocket
that referenced
this pull request
Aug 5, 2026
135a395 was polymorph-components/polymorph-test#52's head; the merge landed as a merge commit, so bump the three pins (both cargo entries, the npm dep) to 1917446 on main history — which also picks up the execution-budget rework (upstream #45) that landed ahead of the merge. Verification: conformance-ct::all green at the new rev (3 targets x 52 cases, 0 failing, matrix byte-identical); cargo test green.
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 #50. Two opt-in
runCasesoptions for the gating jco adapters, keeping the loop single-owner per the one-harness rule (#5); default behavior unchanged.freshCases— instance-per-case granularity (Runner execution-policy guidance #22's wasmtime default) for instantiation-mode transpiles: census/striping fromcases, each execution re-enumerates through the factory. Vanished case = throw (drift, unsound), mirroring the inventory-drift posture.caseTimeoutMs— the JS analog of the runner's--case-timeout(Runner: per-case execution budget and timeout (limit-exceeded provenance) #45): expiry fails the case with the schema's{"limit-exceeded":"case-timeout"}provenance and the Rust runner's detail wording, and the loop continues. Doc comment requires pairing withfreshCases: JSPI attempts cannot be cancelled, and a timed-out shared instance may be wedged mid-suspension.Selftest grows a synthetic-case section covering both (hang → limit-exceeded row without stalling; payload mapping intact under the race; per-case enumeration counted; vanished case throws). Facade version 0.2.0.
First consumer: component-websocket's driver-ct jco legs (conversion PR to follow), deleting its local pre-facade harness copy.
Verified:
just verify-viewergreen end-to-end.