Skip to content

[finding] lint.yml says check-half-states.mjs yields "exactly ONE hint"; it yields four, and one of them routes every card that adds a changeset #15537

Description

@os-steve

Found while adding a row to scripts/pm/check-half-states.mjs (PR #15536, card #14967). Pre-existing and untouched by that change — the hint set is byte-identical before and after it.

The claim

.github/workflows/lint.yml, on the PM half-state sweeper self-test step, states a measurement as its reason for pointing the gate straight at the script with no gate file in between, verbatim:

Measured here on the current tree, under the module-body masking that now blanks comments and self-tests before the scan: this script yields exactly ONE hint, the repo slug in its API base, which is not a repo path and covers no input path. […] So the pollution that forced a separate file there does not exist here.

The reading

On today's origin/main, extractWatchHints over that script returns four, not one:

["objectstack-ai/objectstack", ".changeset", "scripts/pm/check-half-states.mjs", "owner/name"]

Two of the three extra hints ARE repo paths, and one of them routes:

hintCovers(".changeset", ".changeset/foo.md")  =>  true

.changeset comes from the shared-file row's noise-floor constant (H36_SHARED_PREFIX_NOISE), where it is a spelling to EXCLUDE from pairing — not a surface the patrol watches. scripts/pm/check-half-states.mjs is the script's own path, which is harmless (it is the gate script anyway). owner/name is a placeholder in prose-shaped code and covers nothing real.

Why it matters, stated at the size it is

Every user-visible PR in this repo adds a .changeset/*.md file. If that hint is consulted when routing, pnpm check:pm-half-states is derived onto essentially every such card — which is precisely the "fabricate MATCHED leads across the tree" pollution the comment above says does not exist for this script, and the reason the neighbouring gate needs a file of its own. Nothing is broken and nothing goes red: the derived gate is cheap, offline and passes. What is wrong is that a documented measurement no longer describes the tree, and the argument resting on it ("the direct entry is safe here") is no longer supported by the reading it cites.

⛔ Not judged here: whether the remedy is to re-measure and correct the comment, to stop the noise-floor constant from being read as a hint, or to give this gate its own file like its neighbour. Filed as an observation, not a prescription.

Re-check

node -e "const m = await import('./scripts/pm/dispatch-gates.mjs'); const fs = await import('node:fs'); console.log(m.extractWatchHints(fs.readFileSync('scripts/pm/check-half-states.mjs','utf8'), 'scripts/pm/check-half-states.mjs'))" --input-type=module
node -e "const m = await import('./scripts/pm/dispatch-gates.mjs'); console.log(m.hintCovers('.changeset', '.changeset/foo.md'))" --input-type=module
grep -n "exactly ONE hint" .github/workflows/lint.yml

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