Skip to content

[#18688] Remove AI co-author trailers from commit history#18689

Merged
noob-se7en merged 4 commits into
apache:masterfrom
minwoo-jung:remove-ai-coauthor-trailer
Jun 5, 2026
Merged

[#18688] Remove AI co-author trailers from commit history#18689
noob-se7en merged 4 commits into
apache:masterfrom
minwoo-jung:remove-ai-coauthor-trailer

Conversation

@minwoo-jung
Copy link
Copy Markdown
Contributor

@minwoo-jung minwoo-jung commented Jun 5, 2026

@xiangfu0

Problem

Recent commits in the Pinot history contain AI tool trailers:

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

These appear in git log, GitHub commit pages, and blame views — making it look like AI merged or authored the code.

Cause

AI coding tools (Claude Code, GitHub Copilot, etc.) automatically append Co-authored-by trailers to commit messages by default. When PRs are squash-merged on GitHub, all trailers from individual commits are combined into the final merge commit. The result: AI attribution is permanently baked into the project's main branch history.

Fix

Two layers of defense:

  1. .claude/settings.json — adds "includeCoAuthoredBy": false so Claude Code never appends the trailer, regardless of individual user configuration. This is the enforced, deterministic fix.

  2. CLAUDE.md — adds a "Commit messages" section instructing AI tools (including non-Claude tools like Copilot, Cursor) not to include Co-authored-by trailers. This covers tools that don't read settings.json.

Changes

.claude/settings.json (new file):

{
  "includeCoAuthoredBy": false
}

CLAUDE.md (new section):

## Commit messages
- Do not include `Co-authored-by` trailers that reference AI tools (e.g., Claude, Copilot).
  - **Why**: These trailers propagate into squash-merge commits on GitHub, making the
    project history appear AI-authored rather than human-authored.
  - **Fix**: Omit the `Co-authored-by` line entirely when committing.

Fixes #18688

Add a "Commit messages" section to CLAUDE.md instructing AI tools
not to include Co-authored-by trailers. These trailers propagate
into squash-merge commits, making project history appear AI-authored.
Copy link
Copy Markdown
Contributor

@noob-se7en noob-se7en left a comment

Choose a reason for hiding this comment

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

:)

Comment thread CLAUDE.md
- Avoid deprecated APIs in new code. If you must reference one (e.g., for backward-compat serialization or to test the deprecated path), justify it with a comment.

## Commit messages
- Do not include `Co-authored-by` trailers that reference AI tools (e.g., Claude, Copilot).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For CoPilot and others, consider adding it to AGENTS.md as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion, thank you! Added the same rule to AGENTS.md in the latest commit.

Claude Code respects includeCoAuthoredBy in .claude/settings.json.
Setting it to false ensures the trailer is never appended, regardless
of individual user configuration.
… tools

Per review feedback from noob-se7en: AGENTS.md is read by Copilot and
other AI tools that don't consume .claude/settings.json. Adding the
same Co-authored-by rule here ensures coverage across all AI tools.
…oAuthoredBy

includeCoAuthoredBy is deprecated. Replace with the current attribution
setting which controls both commit and PR trailers.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.48%. Comparing base (fe761d2) to head (6e0af50).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18689      +/-   ##
============================================
- Coverage     64.48%   64.48%   -0.01%     
  Complexity     1291     1291              
============================================
  Files          3371     3371              
  Lines        208552   208552              
  Branches      32570    32570              
============================================
- Hits         134483   134475       -8     
- Misses        63273    63284      +11     
+ Partials      10796    10793       -3     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.48% <ø> (-0.01%) ⬇️
temurin 64.48% <ø> (-0.01%) ⬇️
unittests 64.47% <ø> (-0.01%) ⬇️
unittests1 56.89% <ø> (-0.02%) ⬇️
unittests2 37.11% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@noob-se7en noob-se7en added the AI Related to AI/ML features or integration label Jun 5, 2026
@noob-se7en noob-se7en merged commit f68057a into apache:master Jun 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Related to AI/ML features or integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove AI co-author trailers from commit history

3 participants