Skip to content

chore: cut the comment blocks over the file-size check's caps to what the code cannot show - #479

Merged
Vivswan merged 3 commits into
mainfrom
chore/comment-block-caps
Oct 6, 2026
Merged

Vivswan merged 3 commits into
mainfrom
chore/comment-block-caps

Conversation

@Vivswan

@Vivswan Vivswan commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What this changes

block                                                   before  after  cap
.github/scripts/release-pipeline.ts  file header            34     21   25 (header)
.github/scripts/release-pipeline.ts  movePointer            14      8   10
.github/scripts/gen-inputs-table.ts  LEADING                11      2   10
src/discovery/discover.ts            EXCLUDE_GLOB_OPTIONS   11     10   10
src/github/secret-scan.ts            normalizePlainData     11      8   10
src/sections/contract/errors.ts      SectionFailure         14     10   10
src/sections/shared/roles.ts         PERMISSION_PATTERN     13      7   10
src/flows/settings-write.ts          file header            11     11   25 (header; one nine-sentence paragraph, reshaped to a tell and rows)

How

  • Each block was read against its code: a sentence the function body, a neighbouring docblock, or a workflow file already shows was deleted.
  • Rows stayed only where facts share a shape the code does not spell out: the release topology, the failure kinds, the writer's guarantees, the picomatch option reasons.
  • Every kept fact was re-checked against the code after the cut, so nothing reads as less true than before.
  • No code line moved, and no neighbour under the cap was re-wrapped.

Proof

  • Census: every named block under its cap, counted by a script that reproduces the check's comment-block walk (the table above).
  • Comments only: the diff filtered to its non-comment lines is empty.
  • Gates: typecheck and biome clean on the seven files. The release-pipeline, generators, inputs-page, and discovery tests pass (359 tests, 6 files).
$ git diff -U0 origin/main...HEAD | grep '^[-+]' | grep -vE '^(\+\+\+|---)' | grep -vE '^[-+]\s*(//|\*|/\*|\*/)'
$
Technical details
  • Line accounting (git diff --numstat origin/main...HEAD): 32 added, 74 removed, every one a comment line, across seven files.
  • Files: .github/scripts/{release-pipeline.ts,gen-inputs-table.ts}, src/discovery/discover.ts, src/github/secret-scan.ts, src/sections/{contract/errors.ts,shared/roles.ts}, src/flows/settings-write.ts.
  • Cut from the release-pipeline header: the subcommand-to-workflow-to-env table, which main()'s switch and the workflows' run lines carry.
  • Kept in that header: the one fact of the table no file showed, that prerelease-version runs by hand, as one sentence.
  • Cut from movePointer: the decision rows, which the branches, the return reasons, and the thrown messages carry.
  • Cut from gen-inputs-table: the rendered-line list and the blank-region case, which the LEADING array and regionProblem carry.
  • Kept in gen-inputs-table: why LEADING opens with an empty line, and the "|" invariant row's four-cell split relies on, with test/docs/inputs.test.ts named as the test that pins it.
  • Cut from discover.ts: the option values repeated as labels and the prose linking the seven reasons, which the EXCLUDE_GLOB_OPTIONS literal carries.
  • Corrected in discover.ts: the windows row now says only picomatch's main callable follows the host OS and makeRe does not, so the option is a pin rather than a change in behaviour.
  • Cut from secret-scan: two sentences the file header and NotPlainData's docblock already carry.
  • Cut from errors.ts: the rows naming the request and duplicate kinds, which PlainFailureKind lists.
  • Cut from roles.ts: the refused-input rows, which permissionError's messages carry, and the prose paraphrase of the regex.
  • Cut from settings-write: the staging-name sentence, which the inline comment in writeReplacing carries.
  • Not in this change: test/e2e/generators.ts, whose over-cap block was recut on main already.
  • Left to its owner: test/e2e/generators.ts is 2641 lines against the 2560-line warn cap for tests.
  • Reviewer note (Copilot): no behaviour changed, so a finding about a comment's wording is in scope and a finding about code is not.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 05:58
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

File size check

0 over a hard cap (fails), 1 warning(s).

File Size Tier Cap
test/e2e/generators.ts 2641 lines warn 2560

Split the file, wrap the line, shorten or exempt the comment, or list the path in .file-size-allow.local with a # reason.

5 managed file(s) skipped; repo-platform owns them.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The release-pipeline header inaccurately describes embedded subcommands as individual workflow steps.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

This comments-only PR shortens oversized documentation blocks while retaining code-relevant design constraints.

Changes:

  • Trims comments to meet file-size check caps.
  • Reshapes retained release, validation, and file-writing guarantees.
File Description
.github/​scripts/​release-pipeline.ts Condenses release topology and pointer documentation.
.github/​scripts/​gen-inputs-table.ts Condenses rendered-table format documentation.
src/​github/​secret-scan.ts Removes redundant normalization details.
src/​sections/​contract/​errors.ts Condenses failure-kind documentation.
src/​sections/​shared/​roles.ts Condenses permission-pattern documentation.
src/​flows/​settings-write.ts Reshapes writer guarantees into concise rows.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/scripts/release-pipeline.ts Resolved
@Vivswan Vivswan added the merge-when-green Owner approved: merge once every gate is green label Oct 6, 2026
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The PR description's scope and line-count proof omit the changed discovery file.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

Comment thread src/discovery/discover.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:34
@Vivswan
Vivswan force-pushed the chore/comment-block-caps branch from 08d49d3 to 9300660 Compare October 6, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes are comment-only, remain consistent with the implementations, and meet the stated size limits.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

Copilot AI balanced review requested due to automatic review settings October 6, 2026 06:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The comment-only changes remain accurate and introduce no behavioral changes.

Review effort: Balanced
Findings: None

Resolved since last review (2)

@Vivswan
Vivswan marked this pull request as ready for review October 6, 2026 06:54
@Vivswan
Vivswan merged commit fa06cbf into main Oct 6, 2026
29 checks passed
@Vivswan
Vivswan deleted the chore/comment-block-caps branch October 6, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-green Owner approved: merge once every gate is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants