| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Sorry, something went wrong.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 70b8a1cd-0ee5-4d1e-9967-80cd49cd8985 📥 CommitsReviewing files that changed from the base of the PR and between 8fd6c1a and 94c2a23. 📒 Files selected for processing (2)
📝 Walkthrough WalkthroughThe change expands AI signature detection for Anthropic co-author trailers and space-separated Claude, GPT, and Gemini model names. Tests cover supported variants and reject a human-name false positive. ChangesAI signature detection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: shenxianpeng 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)tests/ai_signatures_test.py (1)🤖 Prompt for all review comments with AI agents60-69: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
Make the Claude case exercise the Generic AI pattern.
has_ai_signature only checks whether any pattern matches. The Claude fixture uses noreply@anthropic.com, so the Claude Code pattern makes this test pass even if the new space-separated Generic AI pattern is broken.
Use a non-Anthropic address for this case and assert that detect_ai_signatures returns tool == "Generic AI".
Proposed test adjustment🤖 Prompt for AI Agents- "Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>", + "Co-authored-by: Claude Sonnet 4.5 <claude@example.com>", ... - assert has_ai_signature(message), trailer + result = detect_ai_signatures(message) + assert any(s["tool"] == "Generic AI" for s in result), trailerVerify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/ai_signatures_test.py` around lines 60 - 69, Update test_space_separated_model_name_detected to use a non-Anthropic address for the Claude fixture, then call detect_ai_signatures and assert the matching result has tool == "Generic AI"; keep the existing coverage for the other space-separated model names.
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@commit_check/ai_signatures_data.py`: - Around line 240-241: Update the regex used by _trailer() so AI model signatures cannot span lines: replace newline-capable whitespace with horizontal whitespace and exclude newline characters from the model value, parenthesized metadata, and angle-bracket email portions. Preserve existing matching for valid single-line trailers such as GPT 4, optional annotations, and email values. --- Nitpick comments: In `@tests/ai_signatures_test.py`: - Around line 60-69: Update test_space_separated_model_name_detected to use a non-Anthropic address for the Claude fixture, then call detect_ai_signatures and assert the matching result has tool == "Generic AI"; keep the existing coverage for the other space-separated model names.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 5215b8df-8ba5-47d2-9c69-26df560d670f
📥 CommitsReviewing files that changed from the base of the PR and between 91c4a9f and 8fd6c1a.
📒 Files selected for processing (2)
Sorry, something went wrong.
|
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #506 +/- ##
=======================================
Coverage 97.36% 97.36%
=======================================
Files 12 12
Lines 1175 1175
=======================================
Hits 1144 1144
Misses 31 31 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for your PR!
Sorry, something went wrong.
Merging this PR will not alter performance✅ 390 untouched benchmarks Performance Changes
Comparing stasimus:fix-space-separated-model-names (94c2a23) with main (91c4a9f)2 Footnotes
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
With ai_attribution = "forbid", trailers using space-separated model names pass undetected:
The Claude pattern only matches Claude/Claude Code verbatim, and the generic pattern requires hyphenated ids (claude-sonnet-4). Claude Code emits such trailers in the wild (observed in our org).
Two new patterns:
Tests added for both, plus the ordinal false-positive case.
Summary by CodeRabbit