ct-runner: only reports deselected rows; capability wins over selection (#286) - #287
Merged
Conversation
…tion (#286) `runSuite` applied `only` before tag gating with a bare `continue`, so a filtered-out case vanished from the row stream and a tags-excluded case outside the selection vanished too. The reference runner (polymorph-test js/viewer/harness.mjs `runCases`, docs/runner-policy.md "Selection is not capability") does the opposite: applicability is decided first and a non-applicable case is reported `not-applicable` regardless of `only`; then the unselected remainder is emitted as `{case, status: "deselected", detail: "only <filter>"}` rows — never executed, no provenance — so subset runs still fold with the subsetting visible. `RunCounts` gains `deselected` and `selected` (harness.mjs's counts), and the reference's empty-selection rule now holds for an unsharded `only` matching nothing (throws; sharded stripes may legitimately match nothing and their coordinator guards over merged counts). The CLI summary line reports deselected. README: the xfail-class list named the retired cm705-reentrance class and omitted the live cm707-cancel (#250). Closes #286.
lannbot
enabled auto-merge
September 5, 2026 18:13
lannbot
pushed a commit
that referenced
this pull request
Sep 6, 2026
…s own facts Five tests spelled out the identical full RunCounts tally for an unfiltered run of the fixture suite while testing something else (golden output, freshCases=false, shard-absent identity, bundle contents); every additive field meant editing all of them, and the one outside ct-runner broke CI on #287. The four ct-runner sites now share a constant in support.ts. The release-bundle test is about the tags inventory surviving bundling, so it asserts na and total — severing its coupling to the tally's shape. Tests whose subject IS the counts keep explicit literals.
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 #286.
What
runSuiteappliedonlybefore tag gating with a barecontinue(run-suite.ts:270-272), so a filtered-out case vanished from the row stream — and so did a tags-excluded case that also fell outside the selection. The reference runner it mirrors (polymorph-testjs/viewer/harness.mjsrunCases;docs/runner-policy.md§"Selection is not capability") does the opposite, and this PR aligns to it:not-applicableregardless ofonly.{case, status: "deselected", detail: "only <filter>"}(exact harness.mjs shape, no other fields), never executed, counted in the newRunCounts.deselected.RunCounts.selected: census cases matching the selection regardless of applicability (harness.mjs'sselected), so consumers stop deriving it.onlymatching nothing now throws (… matches no cases (empty selection is a run error)), as harness.mjs does; sharded stripes may legitimately match nothing.runSuite's doc comment already claimed this rule but only implemented the empty-census half.deselected.On the issue's own example (
missing: ["hsm"], only: "gen"on polymorph-test's fixture suite) this yields the reference runners' 8 rows /na: 1, deselected: 5, selected: 2.Also folded in (from this week's triage): README's xfail-class list named the retired
cm705-reentranceclass and omitted the livecm707-cancel(#250).Tests
just test-ct-runner: 24 passed / 0 failed / 1 ignored (pre-existing). New/rewritten:onlyreports the unselected remainder asdeselectedrows (row order, exact row shape, counts)onlymatching nothing is a run error (unsharded)RunCountsliteral gainsdeselected/selected; the shard partition-identity test now covers deselected rows.deno task checkclean;version-guard localPASS;deno.lockuntouched.Versioning
No
breaking/ct-runnerlabel:RunCountsgains fields (additive), rows gain a status value the L4 schema already has, and the behavior change is a conformance fix toward the policy the package documents itself as mirroring. Judgement call — the consumer-visible deltas are thatonlyruns now emit rows for every census case and a typo'd unshardedonlythrows instead of returning green; polymorph-test#106's selftest asserts the old behavior and is expected to flip. Relabel if you read that as caret-incompatible.