Skip to content

check-pnpm-filter-targets' self-test has no verdict handshake: an early return prints nothing and exits 0, while the green line claims 40 assertions held #15614

Description

@claude

Found while repairing the self-test floor probe's placement (#15515), out of that card's scope. Filed unassigned.

The reading

scripts/check-pnpm-filter-targets.mjs dispatches its self-test as

if (flag === '--self-test') process.exit(selfTest());

and selfTest() carries no verdict handshake: nothing checks that the function reached the line that prints its verdict. An early return anywhere above that line yields undefined, process.exit(undefined) is exit 0, and the run prints zero bytes.

Measured

On fd79ecc76, through measure-self-test-floor's probe (which injects return; as the first statement of selfTest and runs the copy):

DEFEATED  scripts/check-pnpm-filter-targets.mjs  entry=selfTest
          baselineExit=0  mutatedExit=0  mutatedBytes=0

Unmutated, the same self-test says

✓ check-pnpm-filter-targets --self-test: 40 assertions — a dead filter observed RED in all four
  carriers (workflow, package.json, shell, JS) and the same fixtures observed SILENT with a real
  name; 181 live occurrence(s) swept.

So "40 assertions held" and "the 40 assertions never ran" are, to the CI wrapper that reads result.status, the same green.

This row was invisible until #15515 landed: the probe wrote its mutated copy into scripts/, this gate's own sweep found the near-duplicate and refused, and the row read NOT MEASURED · baseline run failed (exit 1) for that reason alone. Moving the copy outside the walked tree is what made the reading available; the defect it reveals is this gate's, and older than the probe.

Boundary

Not chosen here

Which of the three landed handshake spellings this gate should carry (the module-level ...ReachedVerdict sentinel, the returned-verdict comparison, or the requireReachedVerdict helper) is the repairing card's call, not this one's.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions