Commit 607c870
fix(ci): stop the ci-failure self-test minting a failure annotation on green runs (#12018)
`scripts/pm/ci-failure.mjs --self-test` printed a line of prose that named a
workflow-command token literally, inside backticks, documenting what the tool
anchors on. The Actions runner does not know a token is being quoted: it parsed
it and minted `annotation_level: failure` on a check run whose conclusion was
SUCCESS. Measured on `d63b01436` (check-run 97678882948, `Lint & Repo Gates`),
that artifact was the ONLY annotation the run carried, and the step has no `if:`
and the workflow no `paths:` filter, so it fired on every pull request.
Two facts measured on real runs shape the fix and the gate:
* the legacy `##[...]` form is parsed ANYWHERE in a printed line -- the token
sat at column 18 and was still consumed, with everything before it dropped
and the rest of the line taken as the message;
* the `::...::` form is parsed only at LINE START -- two mid-sentence ones
print on every PR from `check-prerelease-pin-watch` and mint nothing.
The prose is reworded so the printed bytes carry no token; splitting the JS
string would have changed nothing, because the runner reads the printed line.
`scripts/check-self-test-workflow-commands.mjs` closes the class rather than the
instance: it runs the self-tests CI runs and scans their real stdout, so the
question "is this token printed?" is answered by printing it rather than by a
rule about source. A static prefilter only selects which to run, which keeps the
step at ~14s against the ~4min the whole population costs. A sweep of all 128
found exactly one live site; the two inert ones redden the moment they move.
Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1318ba3 commit 607c870
3 files changed
Lines changed: 455 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
791 | 834 | | |
792 | 835 | | |
793 | 836 | | |
| |||
0 commit comments