Repository navigation
feat(guardrails): install the commit-msg entry as a git config hook under an includeIf, from git 2.54 - #11166
Conversation
Lane-Activity: work-resolve-issue/resolve-issue
Lane-Activity: pr-unblock/fix-ci
Lane-Activity: pr-unblock/address-feedback Lane-Thread: PRRT_kwDOTCGFQM6xy0gm
…5-config-hook-install
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security findings in the incremental change since 53f7a6e. The change touches
No spend, so no cost hold. critical-findings: 0 |
|
claude-review reviewed Incremental review of
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53f7a6e6b2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…es below their floor configHookEvents reads hook.<name>.event with --null, so the empty value a repository sets to clear the events survives git()'s trim and verify no longer reports ok for a hook git does not run. config-hook refuses a worktree: or worktree/i: condition on a git older than 2.56, whose conditional includes lack that keyword. Synced the ten installer copies. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #9775
Replaces #11082 (lanes App PR). The pr-unblock resolver ran two address-feedback rounds on its head
63674424a2and could not settle the pr-verify findings, so this owner-login PR carries the same change: origin/main with that head merged, no other edits.Summary
The shared git-hook installer gains a
config-hook --include-if <condition>action. It writes a stable copy of each commit-msg entry and an include file with one[hook "<plugin>-<entry>"]block under$XDG_CONFIG_HOME/git/checks/<plugin>/, and returns the globalincludeIf.<condition>.pathline as a decision./guardrails:setup apply install-git-hooks scope=userroutes to a new context doc covering the git 2.54 floor, the location, the friendly nameguardrails-commit-msg-convention, andchecks.skipmissingas the only skip.verifyreports a config-hook install by its stable copy, and reportsmissingwhen the repository disables the hook or overrides its command.Fix
lib/git-hooks/install.mjsand its ten synced plugin copies: theconfig-hookaction and its decisions (include-if,include-if-unmatched,git-too-old,modified);verifyreads an entry's config hook before its copies.lib/git-hooks/install.test.mjs: config-hook tests (idempotent second run,git hook list, verify after a repo override,checks.skipmissing, lefthook coexistence), gated on git 2.54 with a visible SKIP below it.plugins/guardrails/skills/setup/context/install-commit-msg.md(new) andplugins/guardrails/skills/setup/SKILL.md: thescope=userinstall..changes/*/feat-9775-config-hook-install-a3c9e517.md: guardrailsminor; the nine plugins that carry only the synced installerpatch, because their shippedinstall.mjschanged.Verification
Hold: a human merges thisline is left out. Owner decisions Q15/Q16 (2026-10-29) removed person-approval holds on agent PRs, so the human-merge hold no longer applies.lib/git-hooks/git-hook-decisions.mddocuments only the kindsinstall.mjs planreturns (its line 3). Only guardrails can return the config-hook kinds, andplugins/guardrails/skills/setup/context/install-commit-msg.md:42-44documents them. Adding them to the nine synced copies would describe kinds those plugins never return.patch, as stated under Fix.Related
do-not-merge)🤖 Generated with Claude Code