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

fix(ai): detect Cursor's Made-with trailer - #643

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-kpdcsf
Oct 23, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-kpdcsf

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Cursor marks the commits it writes with a Made-with: Cursor trailer (Cursor forum). Every policy let it through. It now counts as Cursor's own mark, the same way Copilot's Agent-Logs-Url does: forbid rejects it, and disclose asks for the project's disclosure trailer next to it. Other Made-with values (Made-with: love) are left alone.

Before vs after

Message:

feat: add flag

Made-with: Cursor
Policy Before (2.19.3) After
forbid passes, exit 0 CC013 ai-attribution check failed ==> Cursor
disclose passes, exit 0 CC014 ai-disclosure check failed ==> Made-with: Cursor
Suggest: Disclose the tool with "Assisted-by: Cursor"
fix under disclose nothing to fix appends Assisted-by: Cursor

Changes

  • commit_check/ai_signatures_data.py: a Made-with: Cursor stamp trailer on the Cursor entry.
  • Tests: the trailer's role, false positives (Made-with: love, Made-with: Cursors and arrows), the grouped scan, the disclose fix, and forbid in the validator.

Testing

  • pytest: 1448 pass. One failure, test_load_config_file_permission_error, comes from running as root locally and is unrelated.
  • Coverage stays at 100% lines and branches; ruff check and ruff format --check are clean.

The site's CC013 description ("Amp's Amp-Thread-ID: trailer or the Agent-Logs-Url: trailer…") can name Made-with: Cursor once this ships in a release.

Summary by CodeRabbit

  • New Features
    • Cursor attribution now recognizes the Made-with: Cursor trailer, including in grouped attribution scans.
    • The AI attribution policy now flags commits containing this trailer.
  • Bug Fixes
    • Cursor-assisted commit messages retain the Made-with: Cursor trailer and append Assisted-by: Cursor.
    • Similar phrases such as Made-with: love and Made-with: Cursors and arrows are not incorrectly detected as AI signatures.

Cursor marks the commits it writes with a `Made-with: Cursor` trailer,
which every policy let through. It now counts as Cursor's own mark, like
Copilot's Agent-Logs-Url: forbid rejects it, and disclose asks for the
project's disclosure trailer next to it. Other Made-with values are left
alone.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner October 23, 2026 17:47
@github-actions github-actions Bot added the bug Something isn't working label Oct 23, 2026
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ 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: b39b1114-345a-4d43-b580-8a614a3fb6df
📥 Commits

Reviewing files that changed from the base of the PR and between 5b3d98f and 0b6f14a.

📒 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 Cursor signature catalog now recognizes Made-with: Cursor as a stamp. Tests cover signature detection, false-positive inputs, grouped scans, propose-fix behavior, and forbid-policy validation.

Changes: Cursor stamp recognition

Layer / File(s) Summary
Cursor stamp recognition and policy coverage
commit_check/ai_signatures_data.py, tests/ai_signatures_test.py, tests/ai_policy_test.py, tests/engine_test.py
The Cursor signature catalog adds a stamp pattern for Made-with: Cursor. Tests cover signature detection, false positives, grouped scans, trailer preservation when proposing a fix, and forbid-policy rejection.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0b6f1

The Cursor trailer is recognized consistently across detection, disclosure, and forbid-policy behavior, with no remaining merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 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 Cursor's Made-with trailer.
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

@shenxianpeng shenxianpeng self-assigned this Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5b3d98f) to head (0b6f14a).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #643   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2429      2429           
  Branches       470       470           
=========================================
  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.

@shenxianpeng
shenxianpeng merged commit bd0a8c1 into main Oct 23, 2026
33 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-kpdcsf branch October 23, 2026 18:24
@codspeed

codspeed Bot commented Oct 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

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

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

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_bare_human_name_not_detected[Made-with: Cursors and arrows] N/A 359.4 µs N/A
🆕 test_bare_human_name_not_detected[Made-with: love] N/A 344.2 µs N/A

Comparing claude/project-thread-kpdcsf (0b6f14a) with main (e8389e5)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 (5b3d98f) during the generation of this report, so e8389e5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

shenxianpeng added a commit to commit-check/commit-check.com that referenced this pull request Oct 29, 2026
Brings the site in step with v2.19.4, published 2026-10-29
([release](https://github.com/commit-check/commit-check/releases/tag/v2.19.4),
on PyPI).

## Before / After

`python -m pytest tests/ -q` with `commit-check==2.19.4` installed:

| | Result |
|---|---|
| Before (`main`) | ❌ 2 failed, 16 passed:
`test_pinned_revisions_match_the_released_version`,
`test_documented_defaults_match_the_runtime` |
| After (this branch) | ✅ 18 passed |

What a reader sees:

| Page | Before | After |
|---|---|---|
| pre-commit snippets (configuration, example, pre-commit guide ×3) |
`rev: v2.19.3` | `rev: v2.19.4` |
| Configuration → `allow_branch_types` default | `… "copilot", "cursor",
"dependabot", "renovate"` | `… "copilot", "cursor", "agents",
"dependabot", "renovate"`, and the description names `agents` (the
prefix VS Code's Agents window uses) |
| Rules → CC201 options | default list without `agents` | names `agents`
among the defaults |
| Rules → CC013, Policy guides | trailers listed up to Copilot's
`Agent-Logs-Url:` | also Cursor's `Made-with: Cursor` |
| Changelog | latest entry v2.19.3 | v2.19.4 (2026-10-29) entry and a
Highlights row |

## Changes

- Pins: `docs/configuration.md`, `docs/example.md`,
`docs/guides/pre-commit.md` (blog posts untouched, as AGENTS.md asks).
- `agents` in the default branch types, from
commit-check/commit-check#645: `docs/configuration.md` (Every option)
and `docs/rules.md` (CC201). The spec-strict config on CC201 is
unchanged: the Conventional Branch spec does not list `agents` yet.
- Cursor's `Made-with: Cursor` trailer, from
commit-check/commit-check#643, which noted the site could name it once
released: `docs/rules.md` (CC013) and `docs/guides/policies.md`.
- `docs/changelog.md`: v2.19.4 entry with its release date, and a
Highlights row, since the release changes what passes.

`mkdocs build --strict` passes locally (no warnings).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Updated the changelog and policy guidance to describe recognition of
Cursor’s `Made-with:` trailer. It is rejected when the `forbid` policy
is enabled and corrected to `Assisted-by: Cursor` under `disclose`;
other `Made-with:` values are unaffected.
* Updated configuration and rule documentation to show `agents` as an
accepted default branch prefix.
  * Updated pre-commit examples to use Commit Check v2.19.4.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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