Skip to content

docs(guardrails): drop the stale one-stdin-job claim from hook comments - #9661

Merged
kyle-sexton merged 3 commits into
mainfrom
docs/lefthook-stdin-comments
Oct 24, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
docs/lefthook-stdin-comments

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: owner-approved follow-up from the git-hooks unify handoff (finding 4)

Summary

Two hook comments said lefthook gives stdin to at most one use_stdin job. Lefthook 2.2.2 caches stdin and replays it to every job (cached_reader.go, controller.go:55-57), so the claim is stale.

Fix

  • lefthook.yml: the check-affected comment now says the job reads no stdin, which is why it judges HEAD.
  • plugins/guardrails/git-hooks/reference-verify.sh: the parenthetical restating lefthook's stdin behaviour is gone; the fallback description stays.
  • No behaviour change.

Verification

  • Comment-only diff; pre-commit and pre-push hooks passed (check-affected, reference-verify).
  • Left out: test runs, since no executable line changed.

Related

N/A

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 24, 2026 11:16
Lefthook 2.2.2 caches stdin and replays it to every use_stdin job
(internal/run/controller/utils/cached_reader.go), so "only one job gets
stdin" no longer holds. The comments now state what each job does
without restating lefthook's stdin behaviour.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 24, 2026 15:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T15:24:50.230506Z 6215000 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 6215000511cc745a390964f539a363438704f4ae: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

The diff changes comments and docs only: lefthook.yml comment text, a header comment in plugins/guardrails/git-hooks/reference-verify.sh, the check-placement README paragraph, and a bump: none changelog entry. No executable line changed.

  • Instruction surface: nothing was deleted, narrowed, or softened. The removed text is a factual claim about lefthook's stdin behaviour, not a rule that prevented an action. The lefthook.yml comment about reviewing hook config before committing or pushing is untouched. The job still judges HEAD, and the fallback logic is unchanged. The instruction exception register was not consulted, since the change removes no rule.
  • Plugin manifests: no plugin.json or marketplace.json changed.
  • Trust-gate paths: no trusted-actors, check-trusted-trigger, CODEOWNERS, or .gitmodules file changed.
  • PR context: the description contained no embedded directives.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 6215000511cc745a390964f539a363438704f4ae: 0 finding(s), 0 as inline comments.

No findings. The diff only changes comments and docs.

  • Files changed: lefthook.yml, the reference-verify.sh header comment, the check-placement README paragraph, and a bump: none changelog fragment. No executable line changes.
  • Hash drift: the source reference-verify.sh carries no sha256: header. The hash is stamped onto installed copies, so the comment edit doesn't leave a stale header in the repo.
  • Changelog fragment: bump: none fits a comment-only change, and no manifest file is touched, so no manifest items apply.
  • Closing issue: the PR states no related issue, so there are no acceptance criteria to check.
  • Not verified: the README's new claims about lefthook 2.2.2, which are that it caches stdin and replays it to sequential use_stdin jobs, and that parallel jobs share one stream. They rest on the cached_reader.go upstream source, which I could not read. The PR's "hooks passed" statement is the author's claim and I did not run anything.
  • No hold: the change touches no cost, trust-gate or critical-security surface.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 40699ae Oct 24, 2026
67 checks passed
@kyle-sexton
kyle-sexton deleted the docs/lefthook-stdin-comments branch October 24, 2026 15:39
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.

1 participant