← 输入框|github.com|刷新
Skip to content

feat(ai): detect credit trailers, Warp, Crush and plain Claude Code notices - #672

Merged
shenxianpeng merged 1 commit into
mainfrom
feature/more-ai-signatures
Nov 8, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
feature/more-ai-signatures

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Why

Many projects (Nextcloud, neovim, xymon, LangChain docs, Solana Foundation and others) enforce their AI-attribution policy with hand-written grep steps. Their patterns catch marks that ai_attribution lets through today. xymon's workflow ships 29 test lines, so they make a good yardstick.

What changes

All data, no engine change:

  • Credit trailers: Reviewed-by, Suggested-by, Helped-by, Tested-by, Reported-by naming a known tool. They reuse every tool's identity pattern (so a person keeps passing) and count as a stamp: forbid rejects them, disclose asks for a disclosure beside them.
  • Claude Code: the notice without the robot emoji (Generated with [Claude Code](...), Generated with Claude Code), and a line that is only a https://claude.ai/code/session_... link.
  • Warp: its cloud agent's default identity Warp <agent@warp.dev> (author, co-author, sign-off; source: DEFAULT_GIT_EMAIL in Warp's git_credentials.rs).
  • Crush: 💘 Generated with Crush and Co-Authored-By: Crush <crush@charm.land> (its default Assisted-by: Crush:<model> was already read).

Before / after

xymon's 29 lines, CCHK_AI_ATTRIBUTION=forbid, human author:

main this PR
should pass (7) 7 pass 7 pass
should fail (22) 11 caught 17 caught

Newly caught, forbid:

Line main this PR
Reviewed-by: Claude Code <noreply@anthropic.com> pass CC013
Suggested-by: GitHub Copilot <198982749+Copilot@users.noreply.github.com> pass CC013
Reviewed-by: Codex <bot@example.com> pass CC013
Generated with [Claude Code](https://claude.com/claude-code) pass CC013
Generated with Claude Code pass CC013
https://claude.ai/code/session_016y2DnP4kiXgy (own line) pass CC013
💘 Generated with Crush pass CC013
author Warp <agent@warp.dev> pass CC017

Still passing on purpose: Reviewed-by: Alice <alice@anthropic.com>, Reviewed-by: Claude Dubois <claude@example.org>, a sentence that mentions Claude Code or cites a session link mid-line, Co-authored-by: Warp <warp@example.com>, Jane Dev <jane@warp.dev>, "crush" as a word. The 5 xymon lines still not caught are a bare first name or company with any address (Claude <bot@example.com>, Devin <devin@example.com>, Anthropic <bot@example.com>, GPT4 <bot@example.com>), left alone because Claude and Devin are also people's names.

disclose: Reviewed-by: Claude Code <noreply@anthropic.com> alone fails CC014 with "Disclose the tool with Assisted-by: Claude Code"; with that trailer added it passes.

Checks

pytest 1582 passed (the one failure, test_load_config_file_permission_error, fails only when run as root, same on main); coverage 100%; ruff 0.17.1, mypy, codespell clean.

…otices

Projects that write their own AI-attribution checks reject marks the
built-in detection let through:

- Reviewed-by, Suggested-by, Helped-by, Tested-by and Reported-by naming
  a known tool. They reuse each tool's identity patterns and count as a
  stamp: forbid rejects them, disclose asks for a disclosure beside them.
- Claude Code's "Generated with [Claude Code](...)" notice without the
  robot emoji, and a line that is only a claude.ai/code/session link.
- Warp's cloud agent identity, agent@warp.dev, as author or co-author.
- Crush's "Generated with Crush" notice and its co-author address
  crush@charm.land (its default Assisted-by trailer was already read).

A person reviewing under their own name, a sentence that mentions Claude
Code or cites a session link, and "Warp" or "Crush" as names still pass.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 8, 2026 20:09
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f8363fbc-9e7f-4fd3-9490-17fd05c45c4b
Commits

Reviewing files that changed from the base of the PR and between 654872a and 788962a.

Files selected for processing: 2

  • commit_check/ai_signatures_data.py
  • tests/ai_signatures_test.py
  • 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

@github-actions github-actions Bot added the enhancement New feature or request label Nov 8, 2026
@shenxianpeng shenxianpeng self-assigned this Nov 8, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (654872a) to head (788962a).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #672   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2495      2498    +3     
  Branches       484       484           
=========================================
+ Hits          2495      2498    +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shenxianpeng
shenxianpeng merged commit 1cf5b53 into main Nov 8, 2026
33 checks passed
@shenxianpeng
shenxianpeng deleted the feature/more-ai-signatures branch November 8, 2026 20:19
@codspeed

codspeed Bot commented Nov 8, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.99%

1 warning

⚠️ 129 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
❌ 27 regressed benchmarks
✅ 633 untouched benchmarks
🆕 14 new benchmarks
⏩ 131 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_claude_code_variant_detection 935.1 µs 1,164.9 µs -19.72%
❌ test_bare_human_name_not_detected[Co-authored-by: Jane Dev <12345+jane@users.noreply.github.com>] 441.6 µs 516.9 µs -14.58%
❌ test_all_patterns_compile 291.5 µs 338.2 µs -13.8%
❌ test_bare_human_name_not_detected[Co-authored-by: Continue <noreply@continue.dev.evil.com>] 436.4 µs 505.1 µs -13.6%
❌ test_bare_human_name_not_detected[Co-authored-by: Qwen Li <qwen@example.com>] 415.5 µs 479.6 µs -13.35%
❌ test_bare_human_name_not_detected[Co-authored-by: Jules Verne <jules@example.com>] 425 µs 490.1 µs -13.28%
❌ test_bare_human_name_not_detected[Co-authored-by: Gemini Rossi <gemini@rossi.it>] 440.1 µs 507.3 µs -13.26%
❌ test_bare_human_name_not_detected[Co-authored-by: Copilot Fan <copilot@example.com>] 431.8 µs 497.8 µs -13.26%
❌ test_bare_human_name_not_detected[Co-authored-by: Jane Dev <jane@mistral.ai>] 413.6 µs 476.6 µs -13.23%
❌ test_bare_human_name_not_detected[Co-authored-by: gpt <someone@example.com>] 416.6 µs 479.2 µs -13.06%
❌ test_bare_human_name_not_detected[Co-authored-by: Claude <claude.dubois@gmail.com>] 435 µs 500.2 µs -13.03%
❌ test_bare_human_name_not_detected[Signed-off-by: Jane <jane@continue.dev>] 406.2 µs 466.8 µs -12.98%
❌ test_bare_human_name_not_detected[Co-authored-by: Graham Neubig <graham@all-hands.dev>] 434.3 µs 498.7 µs -12.92%
❌ test_bare_human_name_not_detected[Co-authored-by: Claude Monet <claude@monet.fr>] 440.7 µs 506 µs -12.9%
❌ test_bare_human_name_not_detected[Co-authored-by: Alex Continue <alex@example.com>] 429.8 µs 491.9 µs -12.62%
❌ test_multiple_ai_tools_detected 390.5 µs 445.9 µs -12.43%
❌ test_bare_human_name_not_detected[Co-authored-by: Devin <devin@example.org>] 419 µs 478.4 µs -12.4%
❌ test_bare_human_name_not_detected[Co-authored-by: Vibe Smith <vibe@example.com>] 423.8 µs 483.5 µs -12.35%
❌ test_bare_human_name_not_detected[Co-authored-by: Continue <dev@example.com>] 421.9 µs 480.7 µs -12.23%
❌ test_bare_human_name_not_detected[Co-authored-by: Jules <jules@example.com>] 414.2 µs 471.8 µs -12.21%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feature/more-ai-signatures (788962a) with main (654872a)

Open in CodSpeed

Footnotes

  1. 131 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant