Repository navigation
Commit 6f75c2f
ci(gates): refuse a bare
* ci(gates): refuse a bare `--` between pnpm and vitest in committed commands
`pnpm --filter <pkg> test` with its arguments after a bare separator runs the
WHOLE package suite. pnpm forwards the separator verbatim into the child argv
and vitest's cac parser then discards everything after it, options and
positionals alike, in silence — the file pattern and `--maxWorkers` die
together, the suite passes, and it reads exactly like the narrow run that was
asked for.
#11425 landed the corrected spelling in the instruction files. That is
discipline; this is the mechanical half. Both mechanism layers were re-measured
on this tree rather than recalled, each with a control: pnpm and npx forward the
separator, npm and turbo strip it, and vitest 4.1.10 turns `CACError: Unknown
option` (exit 1) into no output at all (exit 0) when the same flag moves behind
the separator.
The violating population is EMPTY today, so the gate is built to say that out
loud rather than print a bare "0 violations": it reports how many separators it
JUDGED (6 on this tree), refuses a tree whose roots, corpus or workspace
derivation went blind, and carries its non-vacuity in `--self-test`, which
drives this same sweep RED over a temp tree on disk.
Five of those six judged separators are forms a naive bare-`--` selector would
have RED and every one is correct as written — this workflow's own turbo dogfood
shard and the three documented `pnpm dev -- --fresh` spellings — so the rule is
vitest-BOUND, with the vitest-backed script names derived from the workspace
instead of typed in.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
* ci(gates): declare this gate's bare roots so the dispatch derivation can see it
`INSTRUCTION_ROOTS` and `EXECUTED_ROOTS` spelled two of their four roots as bare
single-segment words. `extractWatchHints` builds no hint from a literal without
a separator, so a card touching `scripts/**` or `skills/**` derived this gate
NOWHERE — including the cards most likely to add the spelling it exists to
judge. `scripts/pm/bare-root-worklist.mjs --self-test` caught it on the commit
that introduced it.
Declared rather than refused, and the choice is measured from this gate's own
walker rather than taken from the shape: numerator is what `scannedFiles()`
admits, denominator the tracked files under the subtree the declaration names —
`skills/**` 50 of 50 (100%), `scripts/**` 239 of 242 (98.8%, the 3 misses are
`.txt`). This is the `subtree` case, not the `filtered` one: the walk descends
the whole of each root and the only losses are non-code files the extension
filter drops. Both precedents are already in this tree at the same or lower
coverage — `check-pnpm-filter-targets.mjs` declares `scripts/**` at 97.0%, and
`check-role-word.mjs` declares `skills/**`.
`AGENTS.md/**` and `CLAUDE.md/**` take the escapable repo-root-FILE case the
derivation's own residue names: a bare filename is refused as too generic and
reaches its file through the subtree spelling. Measured — `AGENTS.md/**` covers
`AGENTS.md` and does NOT cover `examples/AGENTS.md`, so it claims the one file
this gate reads at that root and does not overclaim the nested ones.
The workspace-manifest read stays UNDECLARED: the only spellable claim is
`packages/**` + `apps/**` + `examples/**`, which would name this gate for ~5200
files to reach ~80 manifests. Refused, and pinned in `--self-test`.
-- between pnpm and vitest in committed commands (#11667)1 parent c6a62d0 commit 6f75c2f
3 files changed
Lines changed: 1068 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2411 | 2411 | | |
2412 | 2412 | | |
2413 | 2413 | | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
2414 | 2456 | | |
2415 | 2457 | | |
2416 | 2458 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments