js: upstream the node suite-runner loop (#59's node half) - #70
Merged
Conversation
Four consumers carry near-identical copies of the same driver skeleton: load a transpiled suite's cores, read the tag inventory, instantiate, resolve the tests export across its spellings, run the case loop with fresh instances and a case timeout, and emit envelope/events/terminator as results JSONL. The loop moves upstream: - harness.mjs gains runSuiteJsonl — the sequential-driver shape, browser-safe, with the JSPI fresh-instance-per-case default and a Context override for drivers with their own diagnostic transport; pool topologies keep composing runCases + mergeCounts directly. - ./node-runner (node-only): loadCoreModules (prefix-filtered, name order, bytes + compiled modules), resolveTestsExport, and writeResultsFile. What stays per-consumer is the frame: argv, SUT and environment wiring, concurrency topology. Also documents the transpile-stamp convention next to the canonical recipes: the stamp must cover the jco package.json, where the flags and the pinned transpiler live — a wasm-only stamp has demonstrably shipped stale output across a flag change. Stub-driven unit tests join verify-imports; verify-node's goldens and the viewer selftest pin that the harness change is additive.
This was referenced Aug 7, 2026
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.
Partial for #59 (its node half; the browser page driver is the remaining half). The fourth consumer (polymorph-tls's jco leg) confirmed the seam: its driver re-wrote the same ~40-line skeleton websocket, webrtc, and webcrypto already carry. The loop moves upstream as composable functions, not a frame:
runSuiteJsonl(in./harness, browser-safe): census → tag-scheduled case loop → envelope/events/terminator through the caller'semit. Fresh instance per case by default (JSPI attempts cannot be cancelled; also contains trap poisoning),Contextoverride for drivers with their own diagnostic transport (webcrypto),shard/onlypassthrough. Pool topologies (webcrypto's workers) keep composingrunCases+mergeCountsdirectly — the helper is the sequential-driver shape, deliberately../node-runner(node-only export):loadCoreModules(dir, prefix?)(several suites can share one generated tree; returns bytes forinventoryLookup+ compiled modules forinstantiate),resolveTestsExport(the three export spellings, error names the keys),writeResultsFile.actions/README.md: the transpile-stamp convention documented next to the canonical recipes (stamp must cover the jcopackage.json— the flag-change staleness webcrypto hit is the motivating incident).Verification: stub-driven unit tests (
js/node-runner.test.mjs, inverify-imports) covering prefix filtering/ordering/empty-error, export spellings, envelope normalization + scheduling + fresh-instance counting + zero-case error, results-file shape;verify-nodebyte-for-byte goldens and the viewer selftest pin the harness change as additive. Adoption PRs on the four consumers follow (they are the integration gate, re-running full matrices on the slimmed drivers).