#110: runSuite shard option — census-index striping + suite-order index on emit - #113
Merged
Conversation
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.
What
Closes #110.
shard?: { index: number; count: number }onRunSuiteOptions, mirroringrunCases' established striping semantics, so a consumer worker pool can cut the serial case loop's CI tail (polymorph-webcrypto's 267s leg → the issue's ~90–120s at 4 workers).i(the full enumerated list),i % count === index; a case outside the stripe is neither executed nor emitted. Membership is decided BEFOREonly/tag filtering — the interpretation that keeps the invariant union of every shard's rows, in suite order, == the unsharded run's rows (pinned by the partition-identity test).emit: the callback gains an optional second argumentcaseIndex(the samei) on per-case rows —undefinedfor envelope/terminator — so the parent merges stripes back into suite order. The L4 row schema is untouched (goldens byte-identical); single-argumentemitcallers are unaffected.runSuitecannot see sibling shards; the parent discards all but one envelope, merges rows bycaseIndex, and writes the single terminator (the issue's stated topology). ReturnedRunCountsare per-shard; the parent sums.count >= 1,0 <= index < count.shardabsent is byte-identical to today.Worker pool stays consumer-side, as the issue argues (imports are live functions and cannot cross
postMessage).Tests
ct-runner/tests/shard_test.ts(5): partition identity (union == unsharded, disjoint), suite-order restoration from merged stripes, param validation, shard ×only-filter interaction, shard-absent byte-identity.Gates
just test-ct-runner— 22 passed / 0 failed (goldens unchanged). Full runtime/conformance lanes ran green on the same tree under PR #112's gate pass.Implemented by a coder subagent against the issue contract; reviewed by the orchestrator (one review addition: the per-shard
RunCountssentence). One flag from the track, for the record:runCases/harness.mjslive in the external polymorph-test repo, so the mirrored semantics come from the issue text rather than a locally cross-checked source.