Skip to content

chore(code-tidying): run the comment lint at commit time in this repository - #16309

Merged
kyle-sexton merged 2 commits into
mainfrom
chore/lefthook-comment-lint-remote
Nov 15, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
chore/lefthook-comment-lint-remote

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Closes #15647
Siblings: #16297

Summary

Problem: issue 15647 asked for a no-comments posture, a default and a way to stop new comments. Intent: "That way, we're staged. We have all the tools, and then, going forward through PR reviews and additional changes, we'll slowly be removing these comments."

This is the last item of issue 15647: it turns the comment lint on at commit time in this repository.

The owner decided the two items this pull request was held for (2026-11-15):

  1. pygments on each machine that commits. Install it, then merge. The python3 on PATH now imports pygments 2.21.0 on all four lanes (the laptop's and the desktop's WSL and Windows lanes). Where it is missing, an agent's commit fails with FAIL: pygments missing and a person's commit gets a notice.
  2. The level. It stays report. Under block the dry run in ADR 0108 puts about 12 findings on an average pull request (631 over 50).

Two conditions on a later move to block were also decided. The CI gate keeps running the lint code from the pull request's own commit, so a pull request that changes the rules is checked by the rules it proposes; a change that weakens the judge is for review to catch. The generated-file marker will be narrowed in a following pull request, so a hand-written line such as "do not edit the order below" no longer skips a file.

Fix

  • lefthook.yml adds plugins/code-tidying/git-hooks/lefthook-remote.yml to the remote configs fetched from main.

Reach: every commit in a clone of this repository after lefthook install or the next remote refetch. Undo: remove the line.

Verification

  • git show origin/main:plugins/code-tidying/git-hooks/lefthook-remote.yml printed the config, so main holds it.
  • In a fresh clone of this branch, after lefthook install, a commit adding y=2 # sets y to two printed planted.sh:2: comment outside the necessary posture: ... and exited 0, as report should, with a python3 that imports pygments.
  • The same commit with a python3 that cannot import pygments printed FAIL: pygments missing. Install: python3 -m pip install pygments and exited 1 for an agent.
  • On each of the four lanes, python3 -c "import pygments; print(pygments.__version__)" printed 2.21.0.
  • lefthook's remotes page says nothing about a remote config that main does not hold, so this stayed a second pull request.
  • Left out: a commit on Windows.

Related

🤖 Generated with Claude Code

…sitory

lefthook fetches the code-tidying remote config from main beside the
guardrails one, so a commit here runs the comment lint on its staged
lines. The level stays report.

Closes #15647

Co-authored-by: Claude Fable 5.2 <[email protected]>
@kyle-sexton kyle-sexton added do-not-merge Hard merge gate: do not merge while applied. and removed do-not-merge Hard merge gate: do not merge while applied. labels Nov 15, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 15, 2026 13:44
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T13:45:52.178498Z ddee3e1 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 github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on ddee3e12fe4ff3c3886f94f5df854acffb042eb3; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lefthook.yml Resolved
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #16309 (incremental, ddee3e1 → 136dca9)

Since this lane reviewed the earlier head, it has already reviewed this PR once, so this pass reports only blocking findings. The only file in scope is lefthook.yml. I read its whole incremental diff and the file at head.

What changed. Only comments changed, and they fix this lane's earlier advisory finding (the owner settled that thread):

  • Line 2 now says lefthook install fetches "the git hooks named in remotes: below". Before, it said only the guardrails hooks.
  • Lines 32–35 now name both remotes: the guardrails hooks and the code-tidying comment lint. They also say the lint needs a python3 that imports pygments, and point to plugins/code-tidying/README.md, which exists at head.

No YAML keys or values changed, so lefthook behaves the same.

Closing issue #15647. The criterion "The commit-time hook is on in this repository (second pull request)" is still met by line 42, which was unchanged in this push. The issue's note that the hook "needs Python 3 with pygments on each machine that commits" is now written in the file. The pygments install on each machine is the author's claim; I did not check it.

Spend: none billed. This push changes comments only.

No findings.

Verifier dropped 0 of 0 candidates.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16309 (incremental, blocking only)

No security issues found in the change since ddee3e12.

This lane already reviewed an earlier head, so this review reported only blocking findings (CRITICAL or IMPORTANT). There were none.

What changed since the last review: Only YAML comments in lefthook.yml changed:

  • The header comment now says "the git hooks named in remotes:" where it used to say "the guardrails git hooks".
  • The comment above remotes: now names the code-tidying comment lint and says it needs a python3 that imports pygments.

What I checked:

  • No config change. No key or value changed. The remotes: entry still points at https://github.com/melodic-software/claude-code-plugins with ref: main, which the context lines show unchanged (lefthook.yml#L36-L38).
  • Comments match the code. The new comments describe what the config already does, which the previous review checked: the wrapper exits 0 when run from the work tree, so only main's fetched copy runs.
  • No guardrail removed. The edit narrows or removes no instruction. It also touches no trust control, token scope, kill switch or merge hold. No trusted-path glob matches lefthook.yml.
  • Billing and credits. The change cannot cause a charge and spends no API credits.

PR text: The PR context holds no instructions aimed at the review.

critical-findings: 0

…mments

The header and the remotes comment described only the guardrails
hooks. They now cover the code-tidying comment lint and its need for
a python3 that imports pygments.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head ddee3e12fe4ff3c3886f94f5df854acffb042eb3. What it wrote, as data:

Summary: Issue #15647 has one done-when item left: "the commit-time hook is on in this repository
  (second pull request)". Credited sibling #16297 delivered every other item. The diff adds
  plugins/code-tidying/git-hooks/lefthook-remote.yml to the remote configs in lefthook.yml, which
  turns the hook on. That part is correct and small, and every CI job that ran concluded success
  (run 43720573655). Lint Shell was skipped, but no shell file changed. Needing pygments on each
  machine that commits is a step a person takes, so it is not judged against the diff. The PR still
  has to fail because it closes the issue without delivering the issue's own Decision. Under "Level
  here", the issue says `report` belongs in the build pull request and `block` in the follow-up one.
  The owner last edited the issue on 2026-11-15 and that line is unchanged. This PR is that
  follow-up, but it leaves the level at `report`. The only support for keeping `report` is an owner
  decision quoted in the PR body. The PR body is context, not spec, so it cannot remove a part of
  the spec. The capture was not-applicable. No binary files are in the diff, and no file in the
  takeover set is touched.
- docs/conventions/code-tidying.yaml: issue #15647's Decision ('Level here') says the follow-up pull
  request sets `comment_lint: block`, and this PR closes the issue while leaving it at `report`.
  Either set `comment_lint: block` here, or change the PR body from `Closes #15647` to `Refs:
  #15647` and name the move to `block` as the remaining work (or have the owner edit the issue body
  to record the decision to keep `report`).

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 15, 2026
@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 15, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 87ad159 Nov 15, 2026
89 checks passed
@kyle-sexton
kyle-sexton deleted the chore/lefthook-comment-lint-remote branch November 15, 2026 14:23
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 15, 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.

Adopt the no-comments posture here and support it as a plugin setting

1 participant