Skip to content

ci: make pre-commit.ci find the config, with no autofix and no system hooks - #143

Merged
hyperpolymath merged 1 commit into
mainfrom
ci/pre-commit-ci-config
Nov 23, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
ci/pre-commit-ci-config

Conversation

@hyperpolymath

Copy link
Copy Markdown
Contributor

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) and hyperpolymath/k9-pre-commit (not clonable), and allowed autofix commits (unsigned, refused by main's ruleset).

Changes (.pre-commit-config.yaml only)

  • ci: block: autofix_prs: false, skip: [validate-deed, validate-k9, validate-claude-md].
  • Remote a2ml-pre-commit / k9-pre-commit replaced by local validate-deed and validate-k9 hooks (files: + pass_filenames: false).
  • validate-claude-md already had files: and pass_filenames: false; unchanged (its verify.sh and file pattern are this repo's, not the template's deed-based ones).
  • SPDX line unchanged (AGPL-3.0-or-later). Config stays at repo root (no ci/ symlink).

Choices

  • .a2ml files: validate-deed.sh (identical to the template's) already checks against the shrink-only ledger .machine_readable/a2ml-legacy-allow.txt when present, so it does not refuse them; no script change. It stays in ci.skip.
  • .github/hooks/validate-k9.sh does 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.toml missing). validate-claude-md needs nickel (not installed here).


Generated by Claude Code

… 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
@gitnotebooks

gitnotebooks Bot commented Nov 23, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 23, 2026 22:35
@hyperpolymath
hyperpolymath merged commit ef8eca1 into main Nov 23, 2026
32 of 36 checks passed
@hyperpolymath
hyperpolymath deleted the ci/pre-commit-ci-config branch November 23, 2026 22:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T22:39:08.591850Z 9f298ea Draft marked ready
🔒 Security Review ✅ Completed 2026-11-23T22:38:12.236447Z 9f298ea 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread .pre-commit-config.yaml
Comment on lines +50 to +51
entry: .github/hooks/validate-deed.sh
language: system

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread .pre-commit-config.yaml
entry: bash .githooks/validate-k9.sh
language: system
pass_filenames: false
files: '\.k9(\.(ncl|lock))?$'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread .pre-commit-config.yaml
name: Validate DEED manifests (and legacy A2ML ledger)
entry: .github/hooks/validate-deed.sh
language: system
files: '\.(a2ml|A2ML|deed)$'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

3 participants