Skip to content

fix(ai): detect Devin's default co-author line - #638

Merged
shenxianpeng merged 4 commits into
mainfrom
claude/project-thread-pofwgp
Oct 21, 2026
Merged

shenxianpeng merged 4 commits into
mainfrom
claude/project-thread-pofwgp

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Before: with ai_attribution = "forbid" (or "disclose"), the line Devin adds to its commits passed, and a person who signs with just the name "Devin" was reported as the tool:

$ cat devin.txt
feat: add flag

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
$ CCHK_AI_ATTRIBUTION=forbid commit-check -m devin.txt --compact
$ echo $?
0

$ cat person.txt
feat: add flag

Co-authored-by: Devin <[email protected]>
$ CCHK_AI_ATTRIBUTION=forbid commit-check -m person.txt --compact
[FAIL] CC013 ai-attribution: Devin
$ echo $?
1

After: the other way round:

$ CCHK_AI_ATTRIBUTION=forbid commit-check -m devin.txt --compact
[FAIL] CC013 ai-attribution: Devin
$ echo $?
1

$ CCHK_AI_ATTRIBUTION=forbid commit-check -m person.txt --compact
$ echo $?
0

The Devin pattern wanted an address right after "Devin", so Devin AI <…> never matched, and it took any address after a bare "Devin".

How: Devin now matches as Devin AI with any address, as a bare Devin only with no address or with Devin's app address, and as any name with the devin-ai-integration[bot] address. This is the same approach the Copilot and Cursor patterns use. The PR adds tests for each form and for the person named Devin.

The diff is only ai_signatures_data.py and tests. The merge commit on the branch drops a README wording commit left over from #637, so main's README is unchanged.

Summary by CodeRabbit

  • Bug Fixes
    • Improved recognition of Devin AI attribution signatures.
    • Human contributors named Devin are no longer incorrectly classified as AI signatures.
    • Devin AI co-author trailers are correctly rewritten and handled by attribution policies.
  • Tests
    • Added coverage for Devin AI co-author trailers, sign-offs, grouped scans, and forbidden attribution validation.

The App installs today and needs no workflow file, so the README offers it
right after the introduction, before the demo, and lists it first in the
"Everywhere else" table. PyPI shows the same README, so the line is plain
Markdown rather than a GitHub alert.
Take main's README: the wording note from 5a40411 is dropped here.
Devin credits itself as
`Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>`,
which the Devin pattern did not match: it wanted the address right after
"Devin". The same pattern accepted any address after a bare "Devin", so a
person who signs as `Devin <[email protected]>` was reported as the tool.

Match "Devin AI" with any address, a bare "Devin" only with no address or
the app's, and the app's address under any name, as for Copilot and Cursor.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner October 21, 2026 12:51
@github-actions github-actions Bot added the bug Something isn't working label Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 500abb25-52e1-45a7-9781-9a639241c51d
📥 Commits

Reviewing files that changed from the base of the PR and between 7b12450 and fe70f79.

📒 Files selected for processing: 4
  • commit_check/ai_signatures_data.py
  • tests/ai_policy_test.py
  • tests/ai_signatures_test.py
  • tests/engine_test.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The DEVIN signature registry now recognizes Devin AI identities associated with the official integration address and no longer treats every Devin identity as an AI signature. Tests cover detection, disclosure rewriting, policy rejection, and human Devin identities.

Changes: Devin AI signature recognition

Layer / File(s) Summary
Signature patterns and policy validation
commit_check/ai_signatures_data.py, tests/ai_signatures_test.py, tests/ai_policy_test.py, tests/engine_test.py
The DEVIN patterns recognize Devin AI by name or official bot address. Tests cover co-author and sign-off detection, grouped scans, human Devin false positives, disclosure rewriting, and rejection under the forbid policy.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to fe70f

The Devin attribution change is ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: detecting Devin's default co-author line.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7b12450) to head (fe70f79).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #638   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2429      2429           
=========================================
  Hits          2429      2429           

☔ 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.

@codspeed

codspeed Bot commented Oct 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 133 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

✅ 647 untouched benchmarks
🆕 2 new benchmarks
⏩ 126 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_bare_human_name_not_detected[Co-authored-by: Devin <[email protected]>] N/A 383.4 µs N/A
🆕 test_bare_human_name_not_detected[Signed-off-by: Devin <[email protected]>] N/A 382.2 µs N/A

Comparing claude/project-thread-pofwgp (fe70f79) with main (88ca3dc)2

Open in CodSpeed

Footnotes

  1. 126 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. ↩

  2. No successful run was found on main (7b12450) during the generation of this report, so 88ca3dc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@shenxianpeng
shenxianpeng merged commit 4917ea9 into main Oct 21, 2026
34 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-pofwgp branch October 21, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant