Skip to content

check-self-test-workflow-commands declares no scripts/** population, so it is derived onto no card that edits the scripts whose self-test output it scans #15509

Description

@claude

Found while implementing #15414 (PR #15506), out of that card's scope: closing it changes which gates are derived onto every scripts/** card, which is a dispatch-cost decision, not a population fix.

The gap

scripts/check-self-test-wired.mjs declares its population to the dispatch derivation:

const ROOT_DIR_WATCH_HINTS = ['scripts/**/*.mjs', 'scripts/**/*.mts', 'scripts/**/*.sh'];

Its own comment explains why it must: the corpus root arrives as join(ROOT, 'scripts'), a bare single-segment word, so extractWatchHints recovers no scripts/ literal from the file and the family "walks all of scripts/ and appeared on no card that edited any of it".

scripts/check-self-test-workflow-commands.mjs has the identical dependency — its verdict is the real stdout+stderr of self-tests under scripts/ — and carries no such declaration.

Measured on a06faebbe

$ node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack scripts/check-nul-bytes.mjs
node scripts/check-self-test-wired.mjs
node scripts/check-self-test-wired.mjs --self-test
(check-self-test-workflow-commands: absent)

A card that edits a script under scripts/ and changes what its --self-test prints does not get the gate whose whole subject is what those self-tests print.

Why it was not fixed in #15506

That PR made the workflow-commands gate consume the shared population instead of walking for itself, and preserved its existing .github/workflows derivation exactly (verified byte-identical). Adding scripts/** hints would newly place this gate — roughly 14s of spawned self-tests — on every scripts/** card in the tree. That is a real per-dispatch cost and a policy call, not a silent rider on a population repair.

The counter-argument is worth recording: check-declared-population-live's own doctrine says an inherited population "belongs to the module it was declared in and is judged there", which reads as an argument that the scripts/ half is correctly declared once, by the module that owns the read. Whoever takes this should settle that first, because it decides whether there is a defect here at all.

Related: #15414, PR #15506.


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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions