Skip to content

chore: strengthen AI disclosure review policy - #3065

Merged
M4n5ter merged 2 commits into
mainfrom
agent/improve-ai-disclosure-review
Aug 15, 2026
Merged

chore: strengthen AI disclosure review policy#3065
M4n5ter merged 2 commits into
mainfrom
agent/improve-ai-disclosure-review

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 15, 2026

Copy link
Copy Markdown
Member
English

Summary

Make AI-use disclosure explicit and reviewable without coupling the contributor policy to any review bot.

Add structured PR declarations, advisory CodeRabbit checks for missing or inconsistent disclosure, review-relevant risk flags, and native reviewer suggestions. CodeRabbit does not classify a PR as a fast-path candidate; the person performing the merge evaluates the final revision, and a maintainer makes the final determination.

Refs #3051

Verification

  • Validated .coderabbit.yaml against the current CodeRabbit schema.v2.json
  • npm run format:check
  • git diff --check
  • Confirmed CONTRIBUTING.md and its Chinese translation do not mention CodeRabbit or an automated review bot

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex researched CodeRabbit's documented capabilities and drafted the policy, PR template, review configuration, and review-follow-up revisions. The human contributor reviewed the scope and directed the policy boundary.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
简体中文

摘要

让 AI 使用披露变得明确且可审查,同时避免贡献政策依赖或提及任何 review bot。

增加结构化 PR 声明、用于发现披露缺失或矛盾的 CodeRabbit 提醒、与审查相关的风险提示,以及原生 reviewer 推荐。CodeRabbit 不再将 PR 分类为 fast-path candidate;由实际执行合并的人评估最终版本,并由维护者作出最终判断。

关联 #3051

验证

  • 使用当前 CodeRabbit schema.v2.json 校验了 .coderabbit.yaml
  • npm run format:check
  • git diff --check
  • 确认 CONTRIBUTING.md 及其中文版本均未提及 CodeRabbit 或自动 review bot

AI 使用

仅选择一项:

  • 没有生成式工具作出实质贡献
  • 生成式工具作出了实质贡献

工具及参与范围:Codex 调研了 CodeRabbit 的公开配置能力,并起草了政策、PR 模板、review 配置及后续 review 修订。人类贡献者审阅了范围并确定了政策边界。

检查清单

  • 测试覆盖该变更,且没有该变更时测试会失败
  • lint、format、typecheck 和受影响测试套件均在本地通过

本 PR 是否涉及行为变更?

  • 是——已在上述摘要中说明

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4891ab2d-5088-4ebd-b24e-a9a5cfd42fcb

📥 Commits

Reviewing files that changed from the base of the PR and between 820a47b and 8a0a072.

📒 Files selected for processing (4)
  • .coderabbit.yaml
  • .github/pull_request_template.md
  • CONTRIBUTING.md
  • CONTRIBUTING.zh-CN.md

📝 Walkthrough

What this PR solves

This PR standardizes disclosure of substantive generative-tool use. It requires contributors to identify the tool and scope, and to add matching Generated-by trailers to relevant commits.

It also adds advisory CodeRabbit checks for missing or inconsistent disclosures and reports concrete review-relevant risks. The merger evaluates the final review path, and a maintainer makes the final determination.

Source of truth

This PR extends the existing contribution policy and pull request template. It does not create a parallel application or review path.

The CodeRabbit configuration enforces the same disclosure rules in an advisory form. CONTRIBUTING.md remains the policy source of truth.

Solution scope and complexity

The changes form the smallest coherent solution for:

  • Collecting contributor declarations.
  • Checking declarations against commit trailers.
  • Highlighting review-relevant risks.
  • Preserving human ownership of review-path decisions.

The added configuration is necessary to detect inconsistent disclosures before merge. Automatic reviewer assignment remains disabled.

Simplification opportunities

No deletion or simplification is apparent without weakening disclosure enforcement or review guidance.

The configuration already removes redundant suggested_reviewers: true and limits failed-check guidance to the required correction and CONTRIBUTING.md.

Risks and validation

The changes affect contributor workflow and repository governance. They require explicit AI-use declarations, Generated-by trailers, and reassessment after later commits.

The PR reports CodeRabbit schema validation, formatting checks, whitespace checks, and confirmation that contributor policies do not mention CodeRabbit or automated review bots. The final status of these checks is not independently verified here.

Review-relevant risks

  • Governance: Contribution and review-path policies change. Material governance changes require independent human review under repository policy.
  • Contributor workflow: Pull requests and relevant commits must include new disclosure information. Material workflow changes require independent human review under repository policy.
  • External review tooling: CodeRabbit now performs advisory disclosure and risk checks. Material changes to automated review controls require independent human review under repository policy.
  • Security, licensing, releases, and user-visible product behavior: No protected-area effect was identified in the current diff.

The person performing the merge reviews the final diff. A maintainer makes the final determination.

Walkthrough

The PR adds AI-use disclosure requirements to templates and contribution guides. It adds a warning check for disclosure and commit-trailer consistency, disables automatic reviewer assignment, and updates fast-path approval rules in English and Chinese documentation.

Changes

AI disclosure governance

Layer / File(s) Summary
Disclosure contract and contribution policy
.github/pull_request_template.md, CONTRIBUTING.md, CONTRIBUTING.zh-CN.md
The template and contribution guides require substantive AI-use declarations, tool and scope details, and Generated-by trailers for relevant commits.
Automated disclosure validation
.coderabbit.yaml
The warning check validates pull request declarations and commit trailers, rejects ambiguous or inconsistent combinations, and provides corrective guidance.
Fast-path and reviewer assignment governance
.coderabbit.yaml, CONTRIBUTING.md, CONTRIBUTING.zh-CN.md
Automatic reviewer assignment is disabled. Fast-path approval now requires maintainer-determined criteria and reassessment after later commits.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 8a0a0

This PR updates contribution guidance, the pull request template, and review configuration for AI-use disclosure; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant PRDescription
  participant CommitMessages
  participant AIUseDisclosureCheck
  PRDescription->>AIUseDisclosureCheck: disclosure declaration and tool scope
  CommitMessages->>AIUseDisclosureCheck: Generated-by trailers
  AIUseDisclosureCheck-->>PRDescription: validation result and corrective guidance
Loading

Possibly related PRs

Suggested reviewers: astro-han, joob1n

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the PR's main change to strengthen AI disclosure review policy.
Description check ✅ Passed The description includes the required Summary, Verification, and Checklist sections, and documents the AI use and behavior change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Ai Use Disclosure ✅ Passed The PR description selects substantive generative use and names Codex and its scope; both introduced commits contain standalone, consistent Generated-by: Codex trailers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/improve-ai-disclosure-review

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

@M4n5ter
M4n5ter force-pushed the agent/improve-ai-disclosure-review branch from 7f161fd to 8c877d9 Compare August 15, 2026 10:45
Require explicit PR-level AI-use declarations while preserving the distinction between substantive assistance and material AI-authored content. Add advisory review triage for attribution and fast-path eligibility, with final authority remaining with maintainers.

Generated-by: Codex
@M4n5ter
M4n5ter force-pushed the agent/improve-ai-disclosure-review branch from 8c877d9 to e208db8 Compare August 15, 2026 10:53
@M4n5ter
M4n5ter requested a review from Astro-Han August 15, 2026 10:58
@M4n5ter

M4n5ter commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit plan requirement

This PR configures the custom pre-merge check AI use disclosure. This feature requires CodeRabbit Pro+ or Enterprise:

Because Maka is a public Apache-2.0 open-source project, CodeRabbit's current policy indicates that this repository receives the Pro+ feature set through the OSS tier, so the custom check should be available without a paid Pro+ subscription. OSS-specific review rate limits still apply, and this conclusion should be revisited if CodeRabbit changes its OSS policy.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the AI disclosure part is in good shape. The fast-path part can be simpler.

Right now the same decision appears in the PR template, the CodeRabbit summary, and the final maintainer action. Only the last one can be based on the final diff and checks. I suggest:

  • Keep the policy in CONTRIBUTING.md, with CONTRIBUTING.zh-CN.md as its translation.
  • Keep the AI-use declaration in the PR template, but remove the Review path section and Fast-path rationale.
  • Have CodeRabbit warn when a change appears to affect user-visible behavior, public contracts, security, licensing, releases, or governance. It should not classify a PR as a fast-path candidate.
  • For a fast-path merge, the person performing the merge should leave one comment after reviewing the final diff, explaining why the change is low impact, reversible, and outside the protected areas. If another commit is pushed afterward, the comment needs to be posted again. GitHub already records CI status, so the comment does not need to repeat it.
  • Keep the AI disclosure check focused on the selected declaration, named tools and scope, matching Generated-by trailers, and avoiding guesses based on writing or code style. Other policy reminders can stay in CONTRIBUTING.md.
  • Remove suggested_reviewers: true, since it is already the default. Keep auto_assign_reviewers: false as an explicit boundary so the bot cannot assign human reviewers.

This leaves a simpler division of responsibility: the author reports facts, bots point out risks, and a human makes the review decision.

AI-assisted review: Codex checked the PR diff and current CodeRabbit schema and documentation. Claude and K3-256k provided independent read-only consultations. The human contributor approved posting this comment. This does not count as independent human review.

简体中文

我觉得 AI 披露部分已经比较完整,fast path 部分还可以再简单一些。

目前同一个决定分别出现在 PR 模板、CodeRabbit 摘要和维护者最终操作中。只有最后一个环节能基于最终 diff 和检查结果作出判断。建议:

  • 政策正文只放在 CONTRIBUTING.mdCONTRIBUTING.zh-CN.md 作为对应翻译。
  • PR 模板保留 AI 使用声明,删除 Review pathFast-path rationale
  • CodeRabbit 只在改动可能涉及用户可见行为、公开契约、安全、许可、发布或治理时提醒需要关注,不判断 PR 是否属于 fast-path candidate。
  • 采用 fast path 时,由实际执行合并的人在审阅最终 diff 后发一条评论,说明改动影响较低、容易回退且不涉及受保护领域。如果评论后又有新的 commit,需要重新评论。CI 状态由 GitHub 记录,评论中无需重复。
  • AI 披露检查只核对声明选项、工具及参与范围、匹配的 Generated-by trailer,并禁止根据写作或代码风格猜测是否使用 AI。其他政策提醒留在 CONTRIBUTING.md
  • 删除已经是默认值的 suggested_reviewers: true,保留 auto_assign_reviewers: false,明确机器人不能自动指派人工 reviewer。

这样职责更清楚:作者陈述事实,机器人提示风险,由人决定审查路径。

本次 Review 使用了 AI 辅助:Codex 核对了 PR diff、当前 CodeRabbit schema 和官方文档;Claude 与 K3-256k 分别进行了只读咨询。人类贡献者确认发送本评论。这不属于独立人工 Review。

Keep authors focused on factual AI-use disclosure while reserving fast-path decisions for the final revision. CodeRabbit now flags review-relevant risks without classifying or authorizing the review path.

Generated-by: Codex
@M4n5ter

M4n5ter commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Thanks — addressed in commit 8a0a072.

  • Removed Review path and Fast-path rationale from the PR template.
  • Replaced CodeRabbit's preliminary fast-path classification with concrete Review-relevant risks; it now flags apparent protected-area effects without authorizing a review path.
  • Made the fast-path record the responsibility of the person merging the final PR revision; a later commit requires a fresh determination and comment.
  • Kept the AI disclosure check focused on the declaration, named tools and scope, and matching Generated-by trailers. On failure it gives the smallest correction and points to CONTRIBUTING.md instead of repeating the full policy.
  • Removed the redundant suggested_reviewers: true, which is already the default, while retaining auto_assign_reviewers: false as an explicit boundary.

This leaves authors responsible for reporting facts, CodeRabbit responsible for surfacing risks and reviewer suggestions, and maintainers responsible for the final review path.

简体中文

感谢,已在 commit 8a0a072 中处理:

  • 从 PR 模板中删除了 Review pathFast-path rationale
  • 将 CodeRabbit 的 fast-path 初步分类改为基于具体证据的 Review-relevant risks;它只提示可能涉及受保护领域的风险,不再授权或判断审查路径。
  • fast path 理由改由合并者针对 PR 最终版本留言记录;后续如有新 commit,必须重新判断并留言。
  • AI 披露检查聚焦于声明选项、工具及参与范围,以及匹配的 Generated-by trailer。检查失败时只给出最小修正方式并指向 CONTRIBUTING.md,不再复述完整政策。
  • 删除了已是默认值的 suggested_reviewers: true,同时显式保留 auto_assign_reviewers: false 作为自动指派的边界。

现在的职责划分是:作者报告事实,CodeRabbit 提示风险并推荐 reviewer,维护者决定最终审查路径。

@M4n5ter
M4n5ter marked this pull request as ready for review August 15, 2026 11:35

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the latest revision and agree with the resulting policy and division of responsibilities. The previous concerns have been addressed: authors disclose AI use, CodeRabbit surfaces evidence-based risks without choosing the review path, and the merger evaluates the final revision.\n\nAI-assisted review: Codex compared the latest diff with the prior review findings. I reviewed the result and own this approval.

@M4n5ter
M4n5ter merged commit 8f4f040 into main Aug 15, 2026
13 checks passed
@M4n5ter
M4n5ter deleted the agent/improve-ai-disclosure-review branch August 15, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants