Commit f4847a6
The #4167 unknown-authoring-key lint saw all nine offending
`scripts/i18n-extract.config.ts` files that #4736 later cleaned. It printed
`stack.name: 'name' is not a declared stack key, so its value is dropped at
load` once per package, on every run — inside a fully green `check:i18n`, so it
read as noise nine times running. #4736 removed the symptom; nothing stopped the
tenth copy.
Two things made the warning unenforceable, and both are fixed here:
1. The lint writes to **stderr**, and the gate used `execFileSync`, which
surfaces stderr only on the throw path. On a zero-exit run the stream went
straight to the terminal — seen by nobody, judged by nothing. Now
`spawnSync`, so both streams are read on both paths; stderr lines that are
not the lint signature are re-emitted, so capturing costs no diagnostics.
2. The gate judged bundle drift only. It now also fails on the
unknown-authoring-key signature, in its own verdict.
Option A per the issue: the failure lands in the gate script. `os i18n extract`
keeps its exit code (B would write an internal hygiene rule into the public CLI
contract) and `ObjectStackDefinitionSchema` stays non-strict (C would silence
the lint itself — see `metadata-authoring-lint.ts`).
The two verdicts never merge. Drift keeps its section and its remedy
(`--write`); the new class gets its own, naming the package, the config path,
the key, and the consequence that matters — the value is dropped at load, so
whatever it was meant to configure is not in effect and never was. Regenerating
bundles does not fix it, and the message says so. Coverage needs no manifest:
`findConfigs` walks `packages/`, so the tenth config is gated the day it lands.
Proven able to go red, not merely observed green — the failure mode of #4690.
`--self-test` (now wired into `check:i18n` ahead of the real run) drives both
classifiers over recorded CLI output, asserts the drift text produces no key
finding and the key text produces no drift finding, and pins the exact
ffab803^ stderr line so a reworded message breaks the test rather than
disarming the gate. A reworded signature that still matches the weak pattern
fails as `unattributed` instead of passing. Reverse-verified against the nine
configs restored from ffab803^: all nine reported, exit 1.
Fixes #4804
Claude-Session: https://claude.ai/code/session_018iARDqtrhQgz6fVHDeDkbQ
Co-authored-by: Claude <noreply@anthropic.com>
1 parent fa94b2c commit f4847a6
3 files changed
Lines changed: 328 additions & 37 deletions
File tree
- .changeset
- scripts
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments