Skip to content

Allow automated commits and fix C-API test instructions - #8468

Merged
youknowone merged 2 commits into
RustPython:mainfrom
moreal:agent/allow-update-lib-auto-commit
Aug 8, 2026
Merged

Allow automated commits and fix C-API test instructions#8468
youknowone merged 2 commits into
RustPython:mainfrom
moreal:agent/allow-update-lib-auto-commit

Conversation

@moreal

@moreal moreal commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

I've cleaned up the commit instructions in AGENTS.md so that automated tasks using standard git commit—like scripts/update_lib quick—can generate local commits without bypassing pre-commit hooks.

CONTRIBUTING.md already specifies that rustpython-capi should be excluded from workspace tests and tested within the crates/capi directory to ensure separate Cargo settings are applied. However, the test commands in AGENTS.md were missing the rustpython-capi exclusion, 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.md to align with CONTRIBUTING.md and 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-by trailer in commit messages.

Summary by CodeRabbit

Documentation

  • Updated contributor guidance for AI policy compliance and disclosure.
  • Clarified commit-hook installation, execution, automatic fixes, restaging, and retry behavior.
  • Expanded validation guidance to cover workspace, C-API, and change-specific tests.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

AGENTS.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.

Changes

Contribution guidance

Layer / File(s) Summary
Workflow and validation requirements
AGENTS.md
The instructions add AI disclosure requirements, require non-bypassed hook execution with restaging and commit retries, and define conditional validation commands. The workspace test command excludes rustpython-capi, which has a separate test command.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels: skip:ci

Suggested reviewers: shaharnaveh, leehanjeong, youknowone

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: allowing automated commits and correcting C-API test instructions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@moreal moreal self-assigned this Aug 8, 2026
@moreal
moreal marked this pull request as ready for review August 8, 2026 09:35
@moreal
moreal requested a review from ShaharNaveh August 8, 2026 11:38
@moreal moreal added the z-ca-2026 Tag to track Contribution Academy 2026 label Aug 8, 2026
@moreal
moreal marked this pull request as draft August 8, 2026 11:54
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
@moreal
moreal marked this pull request as ready for review August 8, 2026 12:29
@moreal moreal changed the title Allow automated commits through pre-commit hooks Allow automated commits and fix C-API test instructions Aug 8, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
AGENTS.md (1)

20-23: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Include 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

📥 Commits

Reviewing files that changed from the base of the PR and between 68bcb8c and be86d03.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@youknowone
youknowone merged commit 695dda4 into RustPython:main Aug 8, 2026
17 checks passed
kyokuping pushed a commit to kyokuping/RustPython that referenced this pull request Aug 9, 2026
)

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

z-ca-2026 Tag to track Contribution Academy 2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants