Allow automated commits and fix C-API test instructions - #8468
Conversation
📝 WalkthroughWalkthroughAGENTS.md adds AI policy and commit disclosure requirements. It updates hook instructions to require installation, execution, auto-fix restaging, and commit retries. It also documents task-specific validation, including separate workspace and C-API test commands. ChangesContribution guidance
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Exclude rustpython-capi from root workspace test commands and run its tests from the crate directory so its Cargo configuration applies. Document the project AI policy and required commit trailer. Assisted-by: Codex:gpt-5
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
AGENTS.md (1)
20-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winInclude the pull-request disclosure requirement.
The concrete disclosure bullet only covers commit messages. The linked AI Policy also requires disclosure in the pull-request description and a statement of the extent of AI assistance. Add those requirements here, or state that the linked policy is authoritative for the complete disclosure process. (github.com)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AGENTS.md` around lines 20 - 23, Update the AI Policy section in AGENTS.md to explicitly require disclosure of AI assistance in pull-request descriptions, including the extent of assistance, or clarify that the linked AI Policy governs the complete disclosure process. Preserve the existing commit-message trailer requirements.Source: MCP tools
🤖 Prompt for all review comments with AI agents
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 `@AGENTS.md`:
- Line 35: Clarify the testing guidance in AGENTS.md by rewriting the
interpreter test instruction so `<module>` is explicitly a placeholder for one
or more relevant test modules, without leaving “modules” as an apparent literal
command argument. Preserve the existing cargo command and conditions for changes
touching Lib/ or interpreter behavior.
---
Nitpick comments:
In `@AGENTS.md`:
- Around line 20-23: Update the AI Policy section in AGENTS.md to explicitly
require disclosure of AI assistance in pull-request descriptions, including the
extent of assistance, or clarify that the linked AI Policy governs the complete
disclosure process. Preserve the existing commit-message trailer requirements.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7a5daaa1-5eb1-4cd3-8093-d49a2de8bcfc
📒 Files selected for processing (1)
AGENTS.md
) * Allow automated commits through pre-commit hooks * Fix agent C-API test instructions Exclude rustpython-capi from root workspace test commands and run its tests from the crate directory so its Cargo configuration applies. Document the project AI policy and required commit trailer. Assisted-by: Codex:gpt-5
Summary
I've cleaned up the commit instructions in
AGENTS.mdso that automated tasks using standardgit commit—likescripts/update_lib quick—can generate local commits without bypassing pre-commit hooks.CONTRIBUTING.mdalready specifies thatrustpython-capishould be excluded from workspace tests and tested within thecrates/capidirectory to ensure separate Cargo settings are applied. However, the test commands inAGENTS.mdwere missing therustpython-capiexclusion, causing an inconsistency between the two documents.Running C-API tests from the repository root prevents crate-specific PyO3 settings from being applied, leading to a mix of CPython ABI and RustPython object layouts, which can cause SIGSEGV in C-API tests. Therefore, I've updated
AGENTS.mdto align withCONTRIBUTING.mdand run C-API tests separately.Finally, I've specified relevant links and formats to ensure that AI-assisted contributions and commits follow RustPython's AI Policy, including the use of the
Assisted-bytrailer in commit messages.Summary by CodeRabbit
Documentation