JS harness: only reports the unselected census as deselected - #91
Merged
Conversation
Runner parity with the reference runner's #90 behavior, closing the one gap the policy doc had to footnote: the shared case loop (js/viewer/harness.mjs, used by the deltic shard workers, the viewer's browser workers, and consumers' node legs) previously skipped emit entirely for cases outside `only`, so a subset run failed lockfile coverage instead of aggregating as a visible subset. Now the whole census is reported: capability first (a tags-excluded case stays not-applicable even outside the selection — aggregate's applicability policing on scheduled streams requires the precedence), then deselected for applicable-but-unselected cases (never executed, no provenance, detail naming the selection). The inventory drift check now covers the whole census too, filtered or not — same census-truth rule as the wasmtime runner's startup cross-check. Counts gain `deselected` and `selected` (census cases matching the filter, applicability aside); mergeCounts sums both and tolerates old-shape counts from downstream-bundled workers. The empty-selection rule lands at whole-census scope: runCases throws when unsharded and nothing matched; sharded stripes may legitimately match nothing, so the pooled coordinator (page-runner) applies the same guard over the merged counts. Downstream note: counts deepEquals will need the two new fields on the next pin bump. The policy doc's "tracked in #89" parenthetical is dropped — the rule is now true on both legs. Verified: just verify-imports (new stub legs: deselected event shape, precedence, instance economy, empty-selection rejection), just verify-deltic (new selftest leg drives the real deltic engine over the fixture suite: 8-event census with 5 deselected, precedence, empty selection), just all (all goldens byte-identical — nothing golden'd uses `only`).
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 #89 — the JS-leg half of the selection-vs-capability rule (#22/#90), removing the divergence the policy doc had to footnote.
What
js/viewer/harness.mjs(the shared case loop: deltic shard workers, viewer browser workers, consumers' node legs) now reports the whole census underonlyinstead of skipping emit:not-applicableeven outside the selection (the precedence aggregate's applicability policing requires of scheduled streams — same as the reference runner)deselectedfor applicable-but-unselected cases: never executed, no provenance, detail naming the selection — subset runs now fold and aggregate cleanly with the subsetting visiblerunCasesthrows when unsharded; sharded stripes may legitimately match nothing, so the pooled coordinator (page-runner) applies the same guard over merged countsdeselected+selected;mergeCountssums both and tolerates old-shape counts from downstream-bundled workers. DownstreamdeepEquals on counts will need the two new fields at the next pin bump (noted in the commit body).Verification
just verify-imports: new stub-suite legs — deselected event shape, precedence, instance economy (deselected cases spawn no fresh instance), empty-selection rejectionjust verify-deltic: new selftest leg drives the real deltic engine over the fixture suite — 8-event census (2 pass / 1 n/a / 5 deselected),fixture/hsm/atteststays n/a outside the filter,only zzzrejectsjust all: green, all goldens byte-identical (no golden path usesonly)The Deno CLI leg (
runner.ts) is unaffected: its loop is upstream@deltic/ct-runner, which has no selection option — if it grows one, it should mirror this.