Skip to content

docs: describe check:file-size PR mode accurately - #15345

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.52from
woodsonl:docs/quality-gates-file-size-pr-mode
Oct 6, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.52from
woodsonl:docs/quality-gates-file-size-pr-mode

Conversation

@woodsonl

@woodsonl woodsonl commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #15306. The base also fails Merge integrity's "Agent-skills generator sync" step: the generated skills/omni-providers/SKILL.md is out of date with its catalog, and unrelated PRs on the same base fail that step too (for example run 37006580278). This PR touches no skill or catalog file.

What

docs/architecture/QUALITY_GATES.md now describes check:file-size accurately in two places:

  1. New-code mode section: the sentence about scripts/check/newCodeMode.mjs (merge-base worktree, only the files the PR touched) now names the two gates that use it, check:complexity-ratchets and check:dead-code. A new paragraph describes the PR mode of check:file-size.
  2. ci.yml lint job table: the check:file-size row states the actual rule: one cap for source .ts/.tsx files, testCap for test files, and frozen files must not grow past their recorded size.

Why

The doc grouped check:file-size with the new-code mode, but scripts/check/check-file-size.mjs never imports newCodeMode.mjs. With --base-ref it checks the whole tree: it reads each file's line count at the PR base with git show and fails a file only when it grows past the larger of its baseline ceiling and its base size (#8522). The table row named a per-extension cap the script does not have and left out the test-file gate.

The test-file half of the new paragraph matches #15298, which gives the test-file gate its own base line counts, so this should merge after #15298.

Validation

  • Each claim was checked against scripts/check/check-file-size.mjs (evaluateFileSizes, getBaseLoc, collectLoc, collectTestLoc) and the callers of newCodeMode.mjs (check-complexity-ratchets.mjs, check-dead-code.mjs, complexityEslintReport.mjs).
  • npm run check:docs-all: pass, including check:fabricated-docs --strict.
  • Translations: check-fabricated-docs.mjs skips docs/i18n, and check:docs-sync validates only the llm.txt and CHANGELOG.md translations, so the 66 translated copies of this page are left to the translation workflow.

QUALITY_GATES.md grouped check:file-size with the new-code mode of
complexity-ratchets and dead-code, which diff only the files a PR
touched through newCodeMode.mjs. check-file-size.mjs does not use that
helper: it reads each file's line count at the PR base and fails a
file only when it grows past max(baseline ceiling, base size) (diegosouzapw#8522).

Scope the newCodeMode sentence to the two gates that use it, add a
file-size paragraph, and fix the gate table row, which named a
per-extension cap and left out the test-file gate.
@woodsonl
woodsonl requested a review from diegosouzapw as a code owner October 2, 2026 12:50
@diegosouzapw
diegosouzapw merged commit de762dc into diegosouzapw:release/v3.8.52 Oct 6, 2026
52 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants