Repository navigation
ci(lefthook): run each hygiene hook once in standards - #1137
Conversation
The root lefthook.yml extended the lefthook-base, lefthook-shellcheck, lefthook-python and lefthook-typescript fragments and also listed the claude-code-plugins aggregate remote, so typos, markdownlint, ShellCheck, Ruff and Biome ran twice per commit. Drop the four extends, list this repository's own remote for Gitleaks and EditorConfig-checker, and carry the strict settings in the root file. The psscriptanalyzer and dotnet-format source-slice lanes stay. Owner decision Q298 (L3). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis 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 Security review (incremental, blocking only): no security issues foundThis review covers only what changed since
No trust control changes: the trusted-trigger check, the lane token, the kill switch, the token broker and the merge holds are all unchanged. The diff has no plugin manifest, nothing that could bill, and no path for untrusted text to reach a lane that holds credentials. The PR description contains no instructions aimed at this lane. critical-findings: 0 |
|
claude-review reviewed Code review, PR #1137 (incremental: e9af4bd → 2e0e983)The prior-findings file says This push fixes the earlier blocking finding. That finding was that the Python fragment
I found no new blocking findings in the incremental change. Not verified by me. These are the author's claims, unchecked because this lane has no shell and ran nothing:
Loosened checks would be marked: fail. This is the default, because the prompt gave no Verifier dropped 0 of 0 candidates. |
The root lefthook.yml no longer extends the component fragments, so the root `lefthook validate` step stopped loading them. A new test extends each components/lefthook-*/lefthook.yml alone from a scratch consumer and runs `lefthook validate`, with a self-check that a misspelled key fails. CI runs it in the lefthook job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No linked issue: owner decision Q298 (L3) (melodic-software/architecture
docs/owner-decisions.mdL426) authorizes this directly.Summary
In this repository, five hygiene tools ran twice on every commit. The root
lefthook.ymlextendedcomponents/lefthook-base/lefthook.yml,lefthook-shellcheck,lefthook-pythonandlefthook-typescript, and it also listed the claude-code-plugins aggregate remote. The duplicate pairs were:typosandspelling-remote-lint;markdownlintandmarkdown-format-remote-lint;shellcheckandbash-format-remote-lint;ruff-lint/ruff-formatandpython-format-remote-*;biomeandjavascript-format-remote-*.The ccp jobs read the same root configs (
_typos.toml,.markdownlint-cli2.jsonc,.shellcheckrc,ruff.toml,biome.jsonc). Q298 asks for each hook to run once. Now every hygiene tool runs once, from a remote.Fix
lefthook.yml:extendsentries;components/lefthook-base/lefthook-remote.ymlatmain) forstandards-gitleaksandstandards-editorconfig. It is a remote, not anextends, because the remote's scripts act only from the fetched copy underinfo/lefthook-remotes/. A localextendswould run them from.lefthook/pre-commit/, where they exit 0 (lefthook-base README, "Remote form");min_version: "2.0.5",assert_lefthook_installed: true,glob_matcher: doublestarandpre-commit.parallel: true;excludeand thepsscriptanalyzeranddotnet-formatsource-slice lanes unchanged.lefthook-base.test.sh,lefthook-merge-skip.test.sh,lefthook-shellcheck.test.sh,lefthook-typescript.test.shanddotnet-format-staged.test.mjs.docs/conventions/ecosystems/{bash,markdown,python,typescript}.yaml: the comments name the claude-code-plugins hook that runs each tool locally, in place of the dropped lane.pr-require-checks.yml:lefthook validatestep is renamed "Validate the root hook config", because the fragments are no longer merged into the root;components/lefthook-base/lefthook-fragments-validate.test.sh. That test extends eachcomponents/lefthook-*/lefthook.ymlalone from a scratch consumer and runslefthook validate, so the root no longer has to load the fragments for CI to check them.Verification
lefthook dump --format json, afterlefthook installfetched both remotes: every pre-commit job and command name appears once. Agroup_byover the names finds no duplicates.standards-gitleaksandstandards-editorconfigappear once each.typos,markdownlint,shellcheck,ruff-*,biome,gitleaksoreditorconfigappears as a local command.min_version 2.0.5,assert_lefthook_installed true,glob_matcher doublestar,parallel true.standards-gitleaks("no leaks found") andstandards-editorconfig. The hook took 0.60 s.lefthook-fragments-validate.test.sh: 9 assertions pass. Planting an unknown key (commands:renamed) in the realcomponents/lefthook-python/lefthook.ymlfails[4], and restoring the file makes it pass.lefthook validate: All good.harness/shell/run-tests.shon lefthook-base, lefthook-remote, lefthook-merge-skip, lefthook-shellcheck and lefthook-typescript: 5 passed.node --test components/lefthook-dotnet/dotnet-format-staged.test.mjs: 12 passed.Known overlap I left in place: the
psscriptanalyzerlane and ccp'spowershell-format-remote-lintboth run PSScriptAnalyzer withPSScriptAnalyzerSettings.psd1. The lane stays as a repo-specific adapter that dogfoodscomponents/lefthook-powershell/psscriptanalyzer-staged.ps1. Removing it would make PSScriptAnalyzer run once too.Related
docs/owner-decisions.mdL426, owner words "OK go w/ recommendations".🤖 Generated with Claude Code