Repository navigation
ci(lint): shrink lint.yml by 122,702 bytes (510,016 → 387,314), comment lines only - #23064
Merged
Merged
Conversation
lint.yml stood at 510,016 bytes, within a few KB of the size at which
GitHub stops accepting the workflow file (no jobs, no required contexts).
87% of those bytes were YAML comment lines.
This replaces 60 per-step rationale blocks with a one- or two-line pointer
to the script whose header already carries that rationale (every card
number a removed block cited is cited by that script and also kept on the
pointer line), and 29 verbatim duplicate copies of a lane note with a
pointer to the first copy, which stays. Five step notes from the removed
blocks are kept, one or two lines each, and the placement argument many
removed blocks repeated ("it lives in this job, unfiltered") is stated
once at the top of the file.
No key, value, job, step, name, if, run, env or trigger changes: the file
parses to identical YAML data before and after.
510,016 -> 387,314 bytes; 8,082 -> 6,358 lines.
Claude-Session: https://claude.ai/code/session_012zwsLMxQBwHUYJgPyrpEvx
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23044
Clause-②: no
What this does
.github/workflows/lint.ymlstood at 510,016 bytes onmain@df7a13792. The card measured GitHub rejecting this file at 513,738 bytes (a workflow-file run with zero jobs, and neither required context reporting), somainhad 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.df7a13792)fc9340b61)wc -l)#(19 of the
#-led lines are shell comments insiderun: |block scalars. This PR touches none of them.) Changed lines: +136 / −1,860 = 1,996, under the 3,000 human-merge line.# Rationale: SCRIPT header (#cards)., naming the script whose header already carries that rationale.Lint · *lanes or the fourType Check · *lanes) became a pointer to the first copy. The first copy stays verbatim.scripts/pm/bare-root-worklist.mjscites as "stated in the step comment".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
yaml2.9.1Lexer, 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 itsrun:invokes, through the root and packagepackage.jsonscripts. A block qualified only when both of these hold:#NNNN) is also cited by that script file.119 blocks qualified. The 60 largest were taken, minus two kept on purpose. The⚠️ sentences of each removed block were compared with the script text (3-gram overlap). Where a step-wiring warning was not stated in the script in the same words, it was kept on the pointer.
typecheck-debtNODE_OPTIONSblock stays because it argues the step's ownenv:coupling. The docs image-tag rewriter block (#9064) stays becausescripts/sync-template-versions.mjsquotes it. Every pointer line also carries every card number its removed block cited, so a search oflint.ymlfor 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 ⛔/The full prior text of every removed block remains at
df7a13792:.github/workflows/lint.yml.Proof of no behaviour change
yaml2.9.1 (parse, strict,uniqueKeys): deep-equal, sha256 of the JSON2b8d629828681750on both sides.safe_load): equal,e04c40c7a827bfbbon both sides.git diff -U0 df7a13792 fc9340b61has 0 changed lines that are not#-led.Lint & Repo GatesandTypeScript Type Check, and all eightLint · *lanes.Readers of
lint.ymlcomments (dispatch assumption 4)Searched: every file under
scripts/,packages/and.claude/hooks/with a code-level (non-comment) string literal naminglint.yml,.github/workflowsorworkflows. That is 89 files. They include the candidates the dispatch named:check-comment-mask-corpusanddocs-audit/check-drift-comment: these read JS/TS and the docs-drift workflow, notlint.ymlcomments.check-aggregator-roster,check-step-collectors,check-self-test-wired,check-self-test-workflow-commandsanddispatch-gates: these read step structure andrun:text.The scripts that literally read
lint.ymltext were found as well: the wiring self-tests thatincludes()the raw text, thecheck-changeset-no-majorjob slicer, andcheck-type-check-coverage's rawtypecheck:root/turbo run typecheckregexes.Measured: a copy of
lint.ymlwith all 6,247 YAML comment lines removed (66,120 bytes, parsed data still identical) was swapped in. 76 reader commands were run against it: 40 of the 43 dispatch-derived commands, the dispatch'scheck-ci-filter-parityandcheck:doc-authoring, and 34 commands for the other literal readers. The three derived commands left out werecheck:pm-dispatch-gatesandcheck:type-check-debt(both heavy, run on the final head below) andcheck-comment-mask-corpus(it reads JS/TS only). The swap was restored bygit checkout HEAD --and the restore was proved by blob hash.check-whole-set-label-write: mentions in comments, cleared, 12 → 9.check:agent-test-spelling: separators judged 11 → 10.check:pnpm-filter-targets: "more in comments" 62 → 54.check:pnpm-acquisition: line numbers.So no reader pins a
lint.ymlcomment, and nothing had to be kept for a reader.Pointer map
Line numbers are base (
df7a13792) lines. The table also carries each pointer's card count.scripts/check-nul-bytes.mjsheader, 267 linesscripts/check-gitlink-declared.mjsheader, 89 linesscripts/check-keyed-text-bounds.mjsheader, 204 linesscripts/check-bash32-floor.mjsheader, 206 linesscripts/check-closing-target-claim.mjsheader, 266 linesscripts/pm/check-prior-rulings.mjsheader, 203 linesscripts/pm/label-write.mjsheader, 183 linesscripts/pm/close-cards.mjsheader, 255 linesscripts/pm/board-snapshot.mjsheader, 309 linesscripts/pm/release-rehearsal-clone.mjsheader, 93 linesscripts/check-step-collectors.mjsheader, 197 linesscripts/check-self-test-wired.mjsheader, 150 linesscripts/check-doc-frontmatter.mjsheader, 252 linesscripts/check-platform-object-tenancy-census.mjsheader, 64 linesh1per docs pagescripts/check-docs-single-h1.mjsheader, 144 linesscripts/check-docs-redirects.mjsheader, 101 linesscripts/check-react-page-adapter-contract.mjsheader, 175 linesnamescripts/check-docs-section-name.mjsheader, 207 linesscripts/check-published-readme-links.mjsheader, 237 linesscripts/sync-release-index-currency.mjsheader, 118 linesscripts/check-corpus-claim-drift.mjsheader, 125 linesscripts/check-skill-identifier-liveness.mjsheader, 208 linesscripts/check-runtime-services-index.mjsheader, 240 linesscripts/check-auth-mount-ledger.mjsheader, 116 linesscripts/check-logger-receiver-detach.mjsheader, 141 linesscripts/bump-objectui.selftest.shheader, 50 linesscripts/release-verify-npm.mjsheader, 160 linesscripts/check-workflow-status-functions.mjsheader, 72 linesscripts/check-whole-set-label-write.mjsheader, 135 linesscripts/check-cross-repo-closer-outcome.mjsheader, 117 linesscripts/check-closing-keyword-parity.mjsheader, 133 linesscripts/check-merged-branch-reaper-outcome.mjsheader, 99 linesscripts/ci/scheduled-full-run.mjsheader, 45 linesscripts/check-aggregator-roster.mjsheader, 82 linesscripts/check-required-contexts.mjsheader, 182 linesscripts/check-cross-package-test-inputs.mjsheader, 371 linesscripts/check-live-db-isolation.mjsheader, 58 linesscripts/check-ci-filter-parity.mjsheader, 238 linesscripts/check-declaration-mirrors.mjsheader, 107 linesscripts/check-test-source-alias.mjsheader, 346 linesscripts/check-refd-timer-probe.mjsheader, 98 linesscripts/check-manifest-repository-directory.mjsheader, 171 linesscripts/check-driver-memory-census.mjsheader, 107 linesscripts/check-tenant-chokepoint.mjsheader, 108 linesscripts/pnpm-filter-targets.mjsheader, 83 linesscripts/check-agent-test-spelling.mjsheader, 174 linesscripts/check-workspace-manifest-cycles.mjsheader, 84 linespackages/spec/scripts/check-duration-unit-keys.tsheader, 271 linesscripts/check-object-def-param-keys.mjsheader, 134 linesscripts/check-stall-guard-budget.mjsheader, 195 linesscripts/measure-stall-guard-headroom.mjsheader, 147 linespackages/spec/scripts/build-export-origins.tsheader, 78 linesscripts/check-skill-frame-sync.mjsheader, 84 linesscripts/check-skill-compatibility-version.mjsheader, 83 linesscripts/check-agent-model-declared.mjsheader, 82 linesscripts/check-ratchet-remedy-authority.mjsheader, 172 linesscripts/check-skills-token-ratchet.mjsheader, 162 linespackages/spec/scripts/check-objectui-pin-citations.tsheader, 196 linespackages/lint/scripts/check-doc-formula-expressions.mjsheader, 148 linespackages/lint/scripts/check-doc-security-posture.mjsheader, 123 linesGates, run on
fc9340b61(git rev-parse --short HEADof the run)80 commands, 80 exit 0. Each exit code was captured before any pipe.
node scripts/pm/dispatch-gates.mjs --commandswas re-derived on this diff, with no paths given: 43 commands, the same 43 as the dispatch's lint.yml derivation.--ranreconciles them:✓ dispatch-gates --ran: 43 derived famil(ies) accounted for — 43 run, 0 NOT-MEASURED.docs/ci/lint-gates.md; this PR adds no such file. Its three extra commands ran anyway, all green:check-ci-filter-parity,check:doc-authoring, andcheck:doc-formula-expressions. The last one was run after building@objectstack/formulaand@objectstack/lintunder the verify lock (on base it exits 3 PREREQUISITE NOT MET without that build).lint.ymlreaders, listed below.check:pm-dispatch-gatesran detached:✓ dispatch-gates self-test (fast tier): 1833 cases pass.check:type-check-debtran under the verify lock:VERDICT command-exit 0,1 ledger entr(ies) re-measured in 661.7s, 26 raw tsc error(s) total, none above its recorded number.check-required-contexts.mjs --verify-required-setand thecheck-shard-attestation --emit/--verifylegs). They are CI's.Acceptance notes
None of these are filed: none is a reproducible defect, a contract violation or an authoring trap.
Stale lane wording in kept comments. Some kept comments still say "this job carries the whole
check:*gate family". That has not been true since the eight-lane split (ci(lint): measure whereLint & Repo Gates' 198 serial steps spend 14–37 minutes, and bring the maintainer a split plan (maintainer-directed) #22991). They were left alone because they are outside the blocks this PR measured."Same reason as the step above." Kept notes that say this now reach that reason through the step's pointer, one hop further.
Prose references to removed step comments. Two script headers still mention a lint.yml step comment:
scripts/check-nul-bytes.mjsnames "the.github/workflows/lint.ymlstep comment" as one prose statement of its byte set. That comment is now a pointer to that very header, which the header's own "cite this header, do not restate it" footing allows.scripts/check-whole-set-label-write.mjsrecords a historical measured verdict that counted "this gate's own wiring comment in lint.yml".Nothing reads either sentence. Who carries them: whoever next edits those headers; no one is assigned.
No mechanical size guard. Item 1 was not built, so nothing stops the margin from shrinking again. It is now about 122 KB under the last size measured valid (510,016). The ceiling itself is still unmeasured, and this PR did not probe it.
The other workflows are far from the ceiling.
ci.ymlis 175,786 bytes andrelease.ymlis 128,877.Dispatch assumption 1 re-measured on
df7a13792: it holds. 510,016 bytes, 8,083 lines counting the unterminated last one (wc -l8,082), and 445,409 bytes in#-led lines. The card body's "mainis 505,924 bytes at9f4b652e" is an older reading.维护者速读(草稿)
改了什么
把
.github/workflows/lint.yml里的 1,860 行注释换成了 136 行指针。删掉的主要是每个检查步骤前面大段"为什么要有这个检查"的说明。这些理由在对应检查脚本的文件头里本来就有,指针直接指过去。同一段说明被逐字复制进多个并行 lane 的,只保留第一份。文件从 510,016 字节降到 387,314 字节,少了约 24%。为什么改
GitHub 对单个 workflow 文件有大小上限。卡片实测:文件到 513,738 字节时,GitHub 判它无效,一个 job 都不跑,两个必需检查(
Lint & Repo Gates、TypeScript Type Check)都不上报。必需检查不上报,PR 和合并队列就会卡住。改之前,main 离这条线不到 4 KB,下一个往 lint.yml 里加检查的 PR 就可能踩线。现在,离最后一次实测有效的大小还有约 122 KB 余量。风险与代价(含回滚)
df7a13792)。席位意见
(留空)
你要做的
.github/workflows/**。这个路径可能随 governance:.github/workflows/**joins the governed-surface register (GOVERNED_SURFACES, Tier H) and the prose that enumerates it — a workflow PR waits for an authorised approval, as this round practised (ruled A) #23048 纳入受管面,届时须按受管面规则由人合并。本 PR 约 2,000 行改动,低于 3,000 行的人合线。lint.ymlsits within 4–8 KB of GitHub's workflow-file size ceiling — past it the file is invalid, both required contexts go silent, and no gate measures it #23044 上留一句话点名即可,席位会单独立卡。Generated by Claude Code