Repository navigation
Commit e448d3c
ci(lint): shrink lint.yml by 122,702 bytes (510,016 → 387,314), comment lines only (#23064)
Fixes #23044
Clause-②: no
## What this does
`.github/workflows/lint.yml` stood at **510,016 bytes** on `main` @
`df7a13792`. The card measured GitHub rejecting this file at 513,738
bytes (a workflow-file run with zero jobs, and neither required context
reporting), so `main` had under 3.7 KB of margin. 87% of the file's
bytes were YAML comment lines. This PR removes comment lines only and
leaves every key and value untouched.
| | before (`df7a13792`) | after (`fc9340b61`) |
|---|---|---|
| bytes | 510,016 | **387,314** (−122,702, −24.1%) |
| lines (`wc -l`) | 8,082 | 6,358 |
| lines whose first non-blank char is `#` | 6,266 | 4,542 |
| bytes in those lines / share of the file | 445,409 / 87.3% | 322,707 /
83.3% |
(19 of the `#`-led lines are shell comments inside `run: |` block
scalars. This PR touches none of them.) Changed lines: **+136 / −1,860 =
1,996**, under the 3,000 human-merge line.
- **60 per-step rationale blocks** became a pointer of one or two lines:
`# Rationale: SCRIPT header (#cards).`, naming the script whose header
already carries that rationale.
- **29 verbatim duplicate copies** of a lane note (the same note pasted
into each of the eight `Lint · *` lanes or the four `Type Check · *`
lanes) became a pointer to the first copy. The first copy stays
verbatim.
- **5 step notes** from the removed blocks are kept on the pointer, one
or two lines each: three ⛔ "self-test only" warnings (prior-ruling
reader, release-index currency rewriter, stall-guard headroom), the
export-origins ordering note, and the skills-liveness "unfiltered" note
that `scripts/pm/bare-root-worklist.mjs` cites as "stated in the step
comment".
- **One file-level note added** (9 lines, after the GATE ORDER note).
Many removed blocks repeated "it lives in this job because it has no
paths filter". That argument is now stated once, at the top of the file.
- **No new `docs/` file.** Every removed rationale already lives in a
script header, so nothing had to move there.
Item 1 of the card (a new `check:*` size gate) is not built: the
dispatch scoped this PR to item 2, because the seat's instrument rule
requires the maintainer's words on the card for a new gate and the card
quotes none.
## How the blocks were chosen (measured)
Every YAML comment block was found with the `yaml` 2.9.1 `Lexer`, so a
`#` line inside a block scalar is never treated as a comment. Each block
was then resolved to the step it precedes, and the step to the scripts
its `run:` invokes, through the root and package `package.json` scripts.
A block qualified only when both of these hold:
1. the invoked script has a header (its leading comment) of at least 40
lines, and
2. **every card number the block cites (`#NNNN`) is also cited by that
script file.**
119 blocks qualified. The 60 largest were taken, minus two kept on
purpose. The `typecheck-debt` `NODE_OPTIONS` block stays because it
argues the step's own `env:` coupling. The docs image-tag rewriter block
(`#9064`) stays because `scripts/sync-template-versions.mjs` quotes it.
Every pointer line also carries every card number its removed block
cited, so a search of `lint.yml` for a card still lands on its step. In
58 of the 60 the cards are cited in the script's **header**. In the
other two (`check-closing-target-claim.mjs`, `build-export-origins.ts`)
they are cited in the script body. The ⛔/1 parent 1e44436 commit e448d3c
1 file changed
Lines changed: 136 additions & 1860 deletions
0 commit comments