Skip to content

chore(comments): remove comments at the necessary posture in apply-patch, dependabot, dead-code-scan and notification scripts - #18983

Merged
kyle-sexton merged 2 commits into
mainfrom
chore/comment-sweep-F017
Nov 25, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
chore/comment-sweep-F017

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #18772

Summary

Batch F017. Removes 214 comment lines from 7 files under .github/, plugins/code-tidying, plugins/coupling and plugins/desktop-notification at the necessary posture (ADR 0110). Antigravity made the edits in one write job (425 lines deleted across 11 files); one Opus keep review and my floor gates restored the rest run by run (runs naming a git, GitHub or platform behavior, a measured number, a trust-boundary reason, a file-top contract, or a sync pointer; numbered and lettered dividers all-or-nothing per file). No code line changed (the diff has no added line outside one docs citation and three changelog fragments).

This is a small batch (214 lines); the orchestrator pairs it with another.

Fix

Comment-only deletions in .github/dependabot.yml, .github/scripts/apply-patch/{apply-patch.mjs,apply-patch.test.mjs}, plugins/code-tidying/scripts/commented-out-code.py, plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh, plugins/coupling/skills/reduce/scripts/value-sites.test.sh and plugins/desktop-notification/hooks/desktop-notification.sh. docs/upstream/mattpocock-sandcastle.md cites apply-patch.mjs:1444-1449 for failedAnswer; the function is now at lines 1599-1614, so the citation is re-pointed to 1608-1614. One bump: none fragment per touched plugin (code-tidying, coupling, desktop-notification).

Reasons moved from deleted comments

  • .github/scripts/apply-patch/apply-patch.mjs:196: Only unfixed and not-reproducible retry one model rung up; protected-path, weaken-required, and flaky stay with a person.
  • .github/scripts/apply-patch/apply-patch.mjs:944: A written patch proceeds even when the report escalated checks because the patch pushes a new head whose CI decides and the round cap bounds retries.
  • .github/scripts/apply-patch/apply-patch.mjs:1432: A thread-trailer row writes nothing without scanned replies because a commit naming no thread would land no reply.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2321: The docs row keeps the moved-head path because fix-docs runs once per PR, while review-threads skips moved heads because its replies judged the gated head.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:564: Pre-applied vulture --ignore-decorators list (@app.route,@*.route,@pytest.fixture,@property,@*.setter,@*.command,@*.task) covers measured false-positive classes; consumers extend via native whitelist.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:693: gopls health is decided before emitting any candidate so a degraded module never ships rows alongside an "emits no records" lane line.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:991: Untracked or unknown files default to $NOW (newest) so --max keeps oldest-untouched code.
  • .github/dependabot.yml:55: Biome and Claude Code are executable CI dependencies locked at the root lockfile.
  • .github/dependabot.yml:72: Minor and patch bumps are batched into one reviewed PR; majors stay individual PRs.
  • .github/scripts/apply-patch/apply-patch.mjs:770: Only a kept-threads row writes Lane-Thread lines, because they name kept threads.
  • .github/scripts/apply-patch/apply-patch.mjs:886: A stop routed to a failing status skips lane-stopped (escalation-routes.mjs).
  • .github/scripts/apply-patch/apply-patch.mjs:892: A clean merge commits with no patch, a conflicted merge needs the model's patch, and an empty patch leaves the conflicts as git left them. A clean-patch row takes a clean merge alone, with the producer's patch or with none when the producer's run was empty.
  • .github/scripts/apply-patch/apply-patch.mjs:1533: One refused entry refuses the whole patch before anything is written; a rename is checked as one entry first.
  • .github/scripts/apply-patch/apply-patch.mjs:1604: A hold set while the model worked stops the commit.
  • .github/scripts/apply-patch/apply-patch.test.mjs:494: Agent instructions, plugin hooks and manifests, MCP config and .claude reach review on every row past its optional refusals; settings files, submodules and CODEOWNERS stay refused on every row.
  • .github/scripts/apply-patch/apply-patch.test.mjs:691: The docs-naming.yaml tiers: reader throws on any other non-blank line in the block, so a path written another way cannot slip past the comparison.
  • .github/scripts/apply-patch/apply-patch.test.mjs:1346: The content rule refuses, before any API call, an in-scope manifest change that is more than a version: a script, a new file, a rename, or a lock resolved to another host.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2596: A patch that changes README.md and changes it back is invalid for fix-ci, because the producer said it wrote a change.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2667: Only unfixed and not-reproducible retry once, one model rung up. Flaky ends in a failing status the dispatcher retries on the head. A rung-1 run never retries again in the same run.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2693: The default row (fix-docs) reads no report, so it never selects rung-up: an empty patch escalates patch-empty and a written one pushes.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2768: A protected-path escalation beside a weaken-required one always goes to the session-builder queue, even when weakenRetry is set.
  • .github/scripts/apply-patch/apply-patch.test.mjs:2972: collect-patch.sh writes an exact move as a rename header, and the refusals read the built tree, so the old path and the new path each face them.
  • .github/scripts/apply-patch/apply-patch.test.mjs:3191: Zeros compress, so a patch well under the 1 MiB patch cap can carry many MiB of blobs; this is why the 20 MiB total-blob cap is tested separately.
  • .github/scripts/apply-patch/apply-patch.test.mjs:3504: In one merge, 400 base-side files the base already holds upload nothing; 2 clean two-sided merges and 1 resolved conflict upload one blob each; the patch is the resolution alone, so max-files counts 1 path.
  • .github/scripts/apply-patch/apply-patch.test.mjs:3773: The shared-copies row takes the base sync script's patch on a clean merge of the pinned base, and only for copies the base-tip registry lists.
  • .github/scripts/apply-patch/apply-patch.test.mjs:3838: When both sides regenerate one canonical's copy, git merges cleanly and regeneration is empty, yet pr-merge still refuses the head; the clean merge alone must push, or the head stays held.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:35: Caller-supplied targets are anchored to the invocation directory before the cd to the repo root, or they silently miss (repeated at :144).
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:465: knip ownership is computed before anything else, because it decides both what a root scans for and what it may report.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:723: A gopls diagnostic about a file this module does not own belongs to the nested owning module, and counts only when that module's run is healthy.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:803: unreferenced-file searches each basename and repo-relative path repo-wide (CI workflows, settings, manifests, docs). A hit inside the file itself does not save it. A computed path or glob never spells those keys, so a miss is only an uncertain candidate.
  • plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:939: The search spans every tracked file, so a C# member named by a Razor/cshtml view, or used by a partial type's other file, is saved.
  • plugins/desktop-notification/hooks/desktop-notification.sh:94: Non-actionable notification types exit with no telemetry (the same shape as a matcher miss); the default-message override applies only when the system sent the generic placeholder.

Not changed

  • plugins/context-usage/scripts/context-zone.test.sh: a cluster canonical in scripts/cross-plugin-source-registry.txt (copied to plugins/plugin-quality/scripts/); reverted to main rather than sweep a shared source.
  • plugins/code-tidying/scripts/scope-code-files.test.sh, plugins/code-tidying/scripts/test_comment_census.py, plugins/debugging/skills/debug/scripts/hitl-loop.template.sh: every deletion was restored by the keep review (file-top contracts, git and platform behavior, numbered dividers kept all-or-nothing), so they have no net change.

Verification

  • change-shape: COMMENT-ONLY or DOCSTRING-ONLY for .mjs, .py and .yml; the three shell files it cannot parse (exit 21) show identical shfmt -ln bash -mn output for base and new.
  • The diff has no added line in a code file, so no code-line whitespace changed; floor markers intact.
  • scripts/selection-audit.sh trace --strict --jobs 3 --budget 720 over the 2 suites changed prints (apply-patch.test.mjs, value-sites.test.sh): no gap, 37 files read. Both suites pass on the branch (446 and 285 tests, 0 failed).
  • scripts/check-cross-plugin-source-drift.sh --check: clean. typos over the changed files: clean.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 24, 2026 22:18
…tch, dependabot, dead-code-scan and notification scripts

Comment-only deletions in 7 files; no behavior change. One docs citation re-pointed.

Reasons moved from deleted comments:
- .github/scripts/apply-patch/apply-patch.mjs:196: Only `unfixed` and `not-reproducible` retry one model rung up; `protected-path`, `weaken-required`, and `flaky` stay with a person.
- .github/scripts/apply-patch/apply-patch.mjs:944: A written patch proceeds even when the report escalated checks because the patch pushes a new head whose CI decides and the round cap bounds retries.
- .github/scripts/apply-patch/apply-patch.mjs:1432: A `thread-trailer` row writes nothing without scanned replies because a commit naming no thread would land no reply.
- .github/scripts/apply-patch/apply-patch.test.mjs:2321: The `docs` row keeps the moved-head path because `fix-docs` runs once per PR, while `review-threads` skips moved heads because its replies judged the gated head.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:564: Pre-applied vulture `--ignore-decorators` list (`@app.route,@*.route,@pytest.fixture,@Property,@*.setter,@*.command,@*.task`) covers measured false-positive classes; consumers extend via native whitelist.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:693: `gopls` health is decided before emitting any candidate so a degraded module never ships rows alongside an "emits no records" lane line.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:991: Untracked or unknown files default to `$NOW` (newest) so `--max` keeps oldest-untouched code.
- .github/dependabot.yml:55: Biome and Claude Code are executable CI dependencies locked at the root lockfile.
- .github/dependabot.yml:72: Minor and patch bumps are batched into one reviewed PR; majors stay individual PRs.
- .github/scripts/apply-patch/apply-patch.mjs:770: Only a kept-threads row writes Lane-Thread lines, because they name kept threads.
- .github/scripts/apply-patch/apply-patch.mjs:886: A stop routed to a failing status skips lane-stopped (escalation-routes.mjs).
- .github/scripts/apply-patch/apply-patch.mjs:892: A clean merge commits with no patch, a conflicted merge needs the model's patch, and an empty patch leaves the conflicts as git left them. A clean-patch row takes a clean merge alone, with the producer's patch or with none when the producer's run was empty.
- .github/scripts/apply-patch/apply-patch.mjs:1533: One refused entry refuses the whole patch before anything is written; a rename is checked as one entry first.
- .github/scripts/apply-patch/apply-patch.mjs:1604: A hold set while the model worked stops the commit.
- .github/scripts/apply-patch/apply-patch.test.mjs:494: Agent instructions, plugin hooks and manifests, MCP config and .claude reach review on every row past its optional refusals; settings files, submodules and CODEOWNERS stay refused on every row.
- .github/scripts/apply-patch/apply-patch.test.mjs:691: The docs-naming.yaml `tiers:` reader throws on any other non-blank line in the block, so a path written another way cannot slip past the comparison.
- .github/scripts/apply-patch/apply-patch.test.mjs:1346: The content rule refuses, before any API call, an in-scope manifest change that is more than a version: a script, a new file, a rename, or a lock resolved to another host.
- .github/scripts/apply-patch/apply-patch.test.mjs:2596: A patch that changes README.md and changes it back is invalid for fix-ci, because the producer said it wrote a change.
- .github/scripts/apply-patch/apply-patch.test.mjs:2667: Only unfixed and not-reproducible retry once, one model rung up. Flaky ends in a failing status the dispatcher retries on the head. A rung-1 run never retries again in the same run.
- .github/scripts/apply-patch/apply-patch.test.mjs:2693: The default row (fix-docs) reads no report, so it never selects rung-up: an empty patch escalates patch-empty and a written one pushes.
- .github/scripts/apply-patch/apply-patch.test.mjs:2768: A protected-path escalation beside a weaken-required one always goes to the session-builder queue, even when weakenRetry is set.
- .github/scripts/apply-patch/apply-patch.test.mjs:2972: collect-patch.sh writes an exact move as a rename header, and the refusals read the built tree, so the old path and the new path each face them.
- .github/scripts/apply-patch/apply-patch.test.mjs:3191: Zeros compress, so a patch well under the 1 MiB patch cap can carry many MiB of blobs; this is why the 20 MiB total-blob cap is tested separately.
- .github/scripts/apply-patch/apply-patch.test.mjs:3504: In one merge, 400 base-side files the base already holds upload nothing; 2 clean two-sided merges and 1 resolved conflict upload one blob each; the patch is the resolution alone, so max-files counts 1 path.
- .github/scripts/apply-patch/apply-patch.test.mjs:3773: The shared-copies row takes the base sync script's patch on a clean merge of the pinned base, and only for copies the base-tip registry lists.
- .github/scripts/apply-patch/apply-patch.test.mjs:3838: When both sides regenerate one canonical's copy, git merges cleanly and regeneration is empty, yet pr-merge still refuses the head; the clean merge alone must push, or the head stays held.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:35: Caller-supplied targets are anchored to the invocation directory before the cd to the repo root, or they silently miss (repeated at :144).
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:465: knip ownership is computed before anything else, because it decides both what a root scans for and what it may report.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:723: A gopls diagnostic about a file this module does not own belongs to the nested owning module, and counts only when that module's run is healthy.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:803: unreferenced-file searches each basename and repo-relative path repo-wide (CI workflows, settings, manifests, docs). A hit inside the file itself does not save it. A computed path or glob never spells those keys, so a miss is only an uncertain candidate.
- plugins/code-tidying/skills/audit-dead-code/scripts/dead-code-scan.sh:939: The search spans every tracked file, so a C# member named by a Razor/cshtml view, or used by a partial type's other file, is saved.
- plugins/desktop-notification/hooks/desktop-notification.sh:94: Non-actionable notification types exit with no telemetry (the same shape as a matcher miss); the default-message override applies only when the system sent the generic placeholder.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 25, 2026 03:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T03:43:16.443929Z b9af951 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b9af951ba002a35b718c79b7344231cf89908c2d: read 11 of 11 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18983, comment sweep F017

No security issues found.

I read all 11 changed files in full in .claude-lane/pr.diff. Every hunk in a code or config file deletes only comment or docstring lines. No executable line, YAML key, regex, refusal rule or gate condition changes. The only added lines are:

  • three bump: none changelog fragments;
  • one re-pointed line citation in docs/upstream/mattpocock-sandcastle.md.

Trusted paths:

  • .github/scripts/apply-patch/apply-patch.mjs and apply-patch.test.mjs. These decide which model patches the lanes push, so I read their whole change. Every removed line is a // comment. The code beside each deletion is unchanged, including:

    • the ROW_PATH_RULES, RUNG_UP_REASONS, firstRefusal and ALWAYS refusal sets;
    • the checkRow merge and thread-trailer checks;
    • the held check before commit;
    • failedAnswer's token and credential redaction;
    • the test assertions.

    Two catch {} blocks lose their only comment and are now empty; their behavior is the same.

  • docs/upstream/mattpocock-sandcastle.md. The new citation apply-patch.mjs:1608-1614 matches the token split and CREDENTIAL_SHAPES redaction in failedAnswer (L1608-L1614).

Other files:

  • .github/dependabot.yml. Seven comment lines are removed. No ecosystem, directory, cooldown, exclude or group entry changes, so dependency update scope and pins are unchanged.
  • plugins/desktop-notification/hooks/desktop-notification.sh. Only comments are removed. The case "$TYPE" dispatch and the C0 stripping above it are unchanged.
  • dead-code-scan.sh, commented-out-code.py and value-sites.test.sh. These are comment or docstring removals only. Path anchoring (dc_anchor_path) and the vulture ignore list are unchanged.

Instruction surfaces: no CLAUDE.md, AGENTS.md, rules file, skill or agent body, or hook allow or block list is deleted, narrowed or softened. The removed text is developer commentary in code files, so the instruction-exception register lens does not apply.

PR context: the description matches the diff, and it contains no text addressed to this lane.

No plugin manifest is touched. No trust control, token scope, kill switch or merge hold changes. Nothing in this change spends API credits or incurs a charge.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed b9af951ba002a35b718c79b7344231cf89908c2d: read 11 of 11 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This pull request only deletes comments (batch F017 of the ADR 0110 comment sweep). It touches .github/dependabot.yml, apply-patch.mjs and its test, commented-out-code.py, dead-code-scan.sh, value-sites.test.sh and desktop-notification.sh. It also re-points one docs citation and adds three bump: none changelog fragments. I read every hunk of all 11 changed files.

What I checked

  • Comment-only deletions. Every - line in a code file is a comment or docstring. No shellcheck/lint directive was removed: the # shellcheck source= lines are kept as context. No code line changed.
  • Empty catch {} blocks. Two catch bodies in apply-patch.mjs now hold no comment (failedAnswer and fixedThreadsFrom). Bare catch {} is already used in 12 files under .github/scripts, so this is not a new pattern.
  • Docs citation (trusted path docs/upstream/**). The new range apply-patch.mjs:1608-1614 points at the token split, the credential-shape redaction and the control-character strip in failedAnswer (permalink). That matches what the table row claims.
  • Trusted-path files. apply-patch.mjs and docs/upstream/mattpocock-sandcastle.md got extra scrutiny. Neither changes behavior, and nothing they gate changes.
  • Changelog fragments. All three are bump: none, which fits a change with no behavior change.
  • Closing issue. The PR context has only Refs: #18772 and no closing-issue section, so there are no acceptance criteria to check.
  • Path rules. consumer-agnostic-plugins, mod-authoring and ruff-pin match changed files. Deleting comments breaks none of them.
  • Not verified. The author reports that change-shape, selection-audit, the drift check, typos and both test suites passed. I could not run any of these, so those results are unverified.
  • Embedded text. The PR text contains no instructions aimed at this lane.

Loosened checks. The prompt had no loosened_check_* lines, so I used verdict fail with no consumer entries. I did not check the citation requirement because no decision-record line was given. The change edits no check configuration, so nothing is loosened.

Loosened checks would be marked: fail (default); patterns: 0

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit c634f43 Nov 25, 2026
87 checks passed
@kyle-sexton
kyle-sexton deleted the chore/comment-sweep-F017 branch November 25, 2026 04:07
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant