Repository navigation
ci: make pre-commit.ci find the config, with no autofix and no system hooks - #143
Conversation
… hooks Adopt rsr-template-repo c4a8d63 (#480): add the ci: block (autofix_prs false; skip the three language: system hooks), and replace the deleted a2ml-pre-commit and unclonable k9-pre-commit remotes with local validate-deed and validate-k9 hooks. validate-deed honours the existing A2ML ledger; validate-k9 calls this repo's own .githooks/validate-k9.sh. SPDX line unchanged (AGPL-3.0-or-later). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J4QvDjakBFMBtGbfcWm3NQ
|
Review these changes at https://app.gitnotebooks.com/catachresis-colloquium/enaction-engine/pull/143 |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f298eaf9a
ℹ️ 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".
| entry: .github/hooks/validate-deed.sh | ||
| language: system |
There was a problem hiding this comment.
Fail the DEED hook when its validator is unavailable
In local pre-commit runs without Bun or the sibling standards checkout, this new hook invokes .github/hooks/validate-deed.sh, which explicitly exits 0 when the linter is unavailable (lines 67–70) and also skips the A2ML ledger check when its canonical gate is missing (lines 50–58). Consequently, malformed DEED files or ledger violations can be committed while the hook reports success; add a fail-closed prerequisite check or make the invoked validator fail when its required tooling is absent.
AGENTS.md reference: AGENTS.md:L84-L88
Useful? React with 👍 / 👎.
| entry: bash .githooks/validate-k9.sh | ||
| language: system | ||
| pass_filenames: false | ||
| files: '\.k9(\.(ncl|lock))?$' |
There was a problem hiding this comment.
Validate the
.k9.lock files selected by the hook
When a .k9.lock file changes, this regex schedules the hook, but .githooks/validate-k9.sh only discovers *.k9 and *.k9.ncl files (lines 294–322), so the changed lock file is never inspected and the hook can report success regardless of its contents. Either include *.k9.lock in the validator's discovery or remove it from this selector so the configured check does not falsely claim coverage.
AGENTS.md reference: AGENTS.md:L84-L88
Useful? React with 👍 / 👎.
| name: Validate DEED manifests (and legacy A2ML ledger) | ||
| entry: .github/hooks/validate-deed.sh | ||
| language: system | ||
| files: '\.(a2ml|A2ML|deed)$' |
There was a problem hiding this comment.
Run the DEED hook when the legacy ledger changes
When a commit changes only .machine_readable/a2ml-legacy-allow.txt, this files pattern does not match, so pre-commit never invokes the validator even though the hook is responsible for enforcing that ledger's shrink-only and no-stale-entry invariants. Include the ledger path in the selector; otherwise an invalid ledger-only edit passes the local check even when Bun and the standards checkout are available.
AGENTS.md reference: AGENTS.md:L84-L88
Useful? React with 👍 / 👎.
Adopts the fix made at source, hyperpolymath/rsr-template-repo #480 (c4a8d63).
Why. pre-commit.ci errored on every PR before running any hook: the config named
hyperpolymath/a2ml-pre-commit(deleted upstream) andhyperpolymath/k9-pre-commit(not clonable), and allowed autofix commits (unsigned, refused by main's ruleset).Changes (
.pre-commit-config.yamlonly)ci:block:autofix_prs: false,skip: [validate-deed, validate-k9, validate-claude-md].a2ml-pre-commit/k9-pre-commitreplaced by localvalidate-deedandvalidate-k9hooks (files:+pass_filenames: false).validate-claude-mdalready hadfiles:andpass_filenames: false; unchanged (its verify.sh and file pattern are this repo's, not the template's deed-based ones).AGPL-3.0-or-later). Config stays at repo root (noci/symlink).Choices
.a2mlfiles:validate-deed.sh(identical to the template's) already checks against the shrink-only ledger.machine_readable/a2ml-legacy-allow.txtwhen present, so it does not refuse them; no script change. It stays inci.skip..github/hooks/validate-k9.shdoes not exist here, and the template's copy is MPL-2.0 (header would have to differ), so it was not copied. The hook calls the repo's existing.githooks/validate-k9.sh(AGPL, already run by CI).Local run (not mass-fixed)
pre-commit run --all-files: pass: trailing-whitespace, end-of-file, yaml, merge-conflict, private-key, large-files, validate-deed, validate-k9. Fail on pre-existing content: check-json, check-toml, shellcheck, editorconfig-checker (309 errors), gitleaks (config.gitleaks-estate.tomlmissing). validate-claude-md needsnickel(not installed here).Generated by Claude Code