Skip to content

Refuse AI-attribution lines in commit messages - #82

Merged
linuxnow merged 1 commit into
mainfrom
chore/ai-trace-commit-check
Oct 16, 2026
Merged

linuxnow merged 1 commit into
mainfrom
chore/ai-trace-commit-check

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

Part of FreeMixer/openmixer-ops#38.

Adds, as a self-contained copy (a public repository must not depend on a private one):

  • tools/ai-trace-commit-check.sh and tools/ai-trace-patterns.json: fail when a commit message carries an AI-attribution line. It takes a range, a message file (the hook) or a text file, and has a self-test with a sabotage run.
  • .githooks/commit-msg: runs the checker on each message. Enable once per clone with git config core.hooksPath .githooks.
  • an ai-trace job in ci.yml, on pull requests, on a hosted runner with full history: the self-test, then origin/..HEAD. Commits already on the base are not read.

Checked locally: the self-test is green and goes red with the co-author, email and session patterns removed; a commit carrying a trailer makes the range scan exit 1; the hook refuses a message with an attribution line and passes a plain one; the repository's own source and licence checks still pass.

… pull request check

The repository had no .githooks and no commit-message check. This adds
tools/ai-trace-commit-check.sh with its pattern list (a self-contained
copy, since a public repository cannot depend on a private one), a
commit-msg hook that runs it (git config core.hooksPath .githooks), and a
ci job that runs it over the commits of a pull request on a hosted
runner. The job also runs the checker's self-test, which goes red when the
patterns are removed.
@linuxnow

Copy link
Copy Markdown
Contributor Author

Tracked under umbrella #1609 (going public: AI-attribution refusal). Old parent: no parent. A pull request cannot be a sub-issue, so this comment is the link.

@linuxnow
linuxnow merged commit 92b2e23 into main Oct 16, 2026
22 checks passed
@linuxnow
linuxnow deleted the chore/ai-trace-commit-check branch October 16, 2026 10:04
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