Skip to content

JS harness: only reports the unselected census as deselected - #91

Merged
lann merged 1 commit into
mainfrom
js-only-deselected
Aug 12, 2026
Merged

JS harness: only reports the unselected census as deselected#91
lann merged 1 commit into
mainfrom
js-only-deselected

Conversation

@lannbot

@lannbot lannbot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

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 under only instead of skipping emit:

  • capability wins: tags-excluded cases stay not-applicable even outside the selection (the precedence aggregate's applicability policing requires of scheduled streams — same as the reference runner)
  • deselected for applicable-but-unselected cases: never executed, no provenance, detail naming the selection — subset runs now fold and aggregate cleanly with the subsetting visible
  • inventory drift checking covers the whole census (filtered cases no longer dodge it) — parity with the wasmtime runner's startup cross-check
  • empty selection is a run error at whole-census scope: runCases throws when unsharded; sharded stripes may legitimately match nothing, so the pooled coordinator (page-runner) applies the same guard over merged counts
  • counts gain deselected + selected; mergeCounts sums both and tolerates old-shape counts from downstream-bundled workers. Downstream deepEquals 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 rejection
  • just 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/attest stays n/a outside the filter, only zzz rejects
  • just all: green, all goldens byte-identical (no golden path uses only)

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.

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`).
@lann
lann merged commit 3608371 into main Aug 12, 2026
3 checks passed
@lann
lann deleted the js-only-deselected branch August 12, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JS-leg only filter omits unselected cases instead of emitting deselected

2 participants