Skip to content

refactor: rename ai_declaration_options to ai_declaration_checkboxes - #700

Merged
shenxianpeng merged 1 commit into
mainfrom
refactor/ai-declaration-checkboxes
Nov 16, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
refactor/ai-declaration-checkboxes

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Renames two names from #699 before they ship. Neither has been released.

Before

[pull_request]
ai_declaration_options = ["No AI tools were used", "If AI tools were used"]

Rule range: CC5xx Pull request description rules

After

[pull_request]
ai_declaration_checkboxes = ["No AI tools were used", "If AI tools were used"]

Rule range: CC5xx Pull request rules

Why

  • The entries are the texts of the template's checkboxes. Other list options name what they hold (ai_disclosure_trailers, allow_commit_types, prohibited_patterns); options does not, and in the docs "option" already means a config key.
  • The wider range name leaves room for rules about the pull request title.
  • The check name ai-declaration and the ID CC501 stay. "Declaration" stays apart from "disclosure", which means the commit trailers here (CC014, ai_disclosure_trailers); the README now says templates often head the section "AI disclosure".

Checked

ruff check, ruff format --check, and pytest: 1681 passed, coverage 100%.

Summary by CodeRabbit

  • Documentation
    • Updated configuration and usage guidance to use ai_declaration_checkboxes for the CC501 check.
    • Clarified that CC5xx rules apply to pull requests.
  • Updates
    • The pull request declaration setting now uses the ai_declaration_checkboxes name. Existing checkbox validation and rule behavior remain unchanged.

The entries are the texts of the template's checkboxes. Our other list
options name what they hold (ai_disclosure_trailers, allow_commit_types),
and "option" already means a config key in the docs. The CC5xx range is
renamed Pull request rules so title rules can join it later. Neither
name has been released.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 16, 2026 19:48
@shenxianpeng shenxianpeng added the enhancement New feature or request label Nov 16, 2026 — with Claude
@shenxianpeng shenxianpeng self-assigned this Nov 16, 2026
@github-actions github-actions Bot added the chore label Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The AI declaration configuration key changes from ai_declaration_options to ai_declaration_checkboxes. The rule builder, tests, README, CLI help, and code comments now use the renamed key. Existing checkbox parsing and validation remain unchanged.

Changes: AI declaration setting

Layer / File(s) Summary
Rule builder setting and tests
commit_check/rule_builder.py, tests/engine_test.py, tests/main_test.py, tests/rule_builder_test.py
The rule builder reads ai_declaration_checkboxes. The related tests use the renamed key and retain their existing validation coverage.
Documentation and setting references
README.md, commit_check/config_merger.py, commit_check/main.py, commit_check/rules_catalog.py
Configuration guidance, CLI help, and code comments refer to ai_declaration_checkboxes. The CC5xx catalog label changes to “Pull request rules.”

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

Change: Refactor

Merge Risk: Minimal · up to da632

This renames the AI declaration setting to ai_declaration_checkboxes and updates the related docs and tests. Nothing in the supplied summaries points to a merge-blocking problem.

Pre-merge checks: Passed 2

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: renaming the setting ai_declaration_options to ai_declaration_checkboxes. The raw summary shows this rename across README, config_merger, main, rule_builder, rules_cat…
Full details: Title check

Explanation

The title names the main change: renaming the setting ai_declaration_options to ai_declaration_checkboxes. The raw summary shows this rename across README, config_merger, main, rule_builder, rules_catalog, and the tests. The title is concise, specific, and matches the changeset.

  • 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

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9a00200) to head (da632c2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #700   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         2705      2705           
  Branches       536       536           
=========================================
  Hits          2705      2705           

☔ 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 914d74b into main Nov 16, 2026
33 checks passed
@shenxianpeng
shenxianpeng deleted the refactor/ai-declaration-checkboxes branch November 16, 2026 19:50
@shenxianpeng shenxianpeng removed the enhancement New feature or request label Nov 16, 2026
@codspeed

codspeed Bot commented Nov 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

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

✅ 685 untouched benchmarks
⏩ 131 skipped benchmarks1


Comparing refactor/ai-declaration-checkboxes (da632c2) with main (9a00200)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant