state_store_unittest.py is enumerated nowhere and never runs; the #1017 membership guard cannot see python suites #1341

Open
opened 2026-08-20 22:41:19 +00:00 by fred · 0 comments
Collaborator

Finding

packages/mosaic/src/lease-broker/state_store_unittest.py exists on disk and is enumerated nowhere. It is therefore never run, in CI or locally.

Measured:

$ grep -rn "state_store_unittest" packages/mosaic/package.json .woodpecker/ci.yml package.json
(no matches)

Every other src/lease-broker/*_unittest.py is enumerated in test:framework-shell, which pnpm test chains: daemon_deadline, normative_fragments, promotion_binding, promotion_trigger, receipt_challenge, context_recovery, recovery_runtime, recovery_b1_adversarial, receipt_observer_client, invariant_r, framework_skill_portability. That is 11 of the 12 on disk. state_store_unittest.py is the twelfth.

Why the #1017 guard does not catch it

check-test-enumeration.sh is the membership guard built precisely to make this failure impossible to do silently. It cannot see this one. Its population predicate is:

in_population() {
    local base; base="$(basename "$1")"
    [[ "$base" == *test*.sh ]]
}

Shell suites only, under framework/tools/. Python unittests under src/ are outside the population on both sides of the comparison, so an unenumerated python suite is invisible to the guard that exists to find unenumerated suites.

The guard reports population 62, enumerated (in-population) 47, excluded (signed) 16 and passes. Those numbers are correct for what it measures. They just do not describe the python suites at all.

Two separable problems

  1. state_store_unittest.py is not run. Someone should establish whether it passes before enumerating it, since it has had no CI pressure on it for however long it has been there. Enumerating a suite that fails turns a silent gap into a red trunk.
  2. The guard's population excludes python suites. Extending it to src/**/*_unittest.py would make gap (1) impossible to repeat. That is a change to a security-adjacent guard and should be reasoned about on its own terms, not bolted on.

Provenance

Found while landing #1339, where the same gap would have shipped a new test that CI never ran. That one is closed in the PR. This one is pre-existing and was deliberately left out of scope.

## Finding `packages/mosaic/src/lease-broker/state_store_unittest.py` exists on disk and is enumerated nowhere. It is therefore never run, in CI or locally. Measured: ``` $ grep -rn "state_store_unittest" packages/mosaic/package.json .woodpecker/ci.yml package.json (no matches) ``` Every other `src/lease-broker/*_unittest.py` is enumerated in `test:framework-shell`, which `pnpm test` chains: `daemon_deadline`, `normative_fragments`, `promotion_binding`, `promotion_trigger`, `receipt_challenge`, `context_recovery`, `recovery_runtime`, `recovery_b1_adversarial`, `receipt_observer_client`, `invariant_r`, `framework_skill_portability`. That is 11 of the 12 on disk. `state_store_unittest.py` is the twelfth. ## Why the #1017 guard does not catch it `check-test-enumeration.sh` is the membership guard built precisely to make this failure impossible to do silently. It cannot see this one. Its population predicate is: ```bash in_population() { local base; base="$(basename "$1")" [[ "$base" == *test*.sh ]] } ``` Shell suites only, under `framework/tools/`. Python unittests under `src/` are outside the population on both sides of the comparison, so an unenumerated python suite is invisible to the guard that exists to find unenumerated suites. The guard reports `population 62, enumerated (in-population) 47, excluded (signed) 16` and passes. Those numbers are correct for what it measures. They just do not describe the python suites at all. ## Two separable problems 1. **`state_store_unittest.py` is not run.** Someone should establish whether it passes before enumerating it, since it has had no CI pressure on it for however long it has been there. Enumerating a suite that fails turns a silent gap into a red trunk. 2. **The guard's population excludes python suites.** Extending it to `src/**/*_unittest.py` would make gap (1) impossible to repeat. That is a change to a security-adjacent guard and should be reasoned about on its own terms, not bolted on. ## Provenance Found while landing `#1339`, where the same gap would have shipped a new test that CI never ran. That one is closed in the PR. This one is pre-existing and was deliberately left out of scope.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1341