Skip to content

[ci] fix: keep pre-commit workflow lean - #194

Merged
Wangmerlyn merged 1 commit into
mainfrom
codex/precommit-lean-ci
Jun 30, 2026
Merged

[ci] fix: keep pre-commit workflow lean#194
Wangmerlyn merged 1 commit into
mainfrom
codex/precommit-lean-ci

Conversation

@Wangmerlyn

@Wangmerlyn Wangmerlyn commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Install only the pre-commit runner in pre-commit CI instead of installing KeepGPU with dev extras.
  • Add a regression test that keeps pre-commit CI from pulling runtime package dependencies.
  • Document the lean pre-commit CI guardrail in AGENTS and contributing docs.

Test Plan

  • PYTHONPATH=$PWD/src pytest tests/test_ci_workflows.py -q
  • pre-commit run --all-files --show-diff-on-failure
  • mkdocs build --strict (only upstream Material warning)

Review

  • Local subagent review found no must-fix issues.

Summary by CodeRabbit

  • Bug Fixes

    • Streamlined the pre-commit CI setup so it installs only the pre-commit runner, reducing unnecessary setup time and dependencies.
  • Documentation

    • Updated contributor guidance to clarify the preferred pre-commit CI installation approach.
  • Tests

    • Added workflow coverage to ensure the pre-commit CI setup stays limited to upgrading pip and installing pre-commit only.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa1deae5-d997-4fd6-9b6b-d9da8464f40c

📥 Commits

Reviewing files that changed from the base of the PR and between a10ce81 and d80039a.

📒 Files selected for processing (4)
  • .github/workflows/pre-commit.yaml
  • AGENTS.md
  • docs/contributing.md
  • tests/test_ci_workflows.py

📝 Walkthrough

Walkthrough

The pre-commit CI workflow is changed to install only pre-commit (after upgrading pip) instead of the full .[dev] extras. A new test asserts the workflow contains exactly those two pip install commands. AGENTS.md and docs/contributing.md are updated to document this policy.

Changes

Pre-commit CI slim install

Layer / File(s) Summary
Workflow change and enforcement test
.github/workflows/pre-commit.yaml, tests/test_ci_workflows.py
CI setup step replaced to install pre-commit directly; new test parses the workflow YAML and asserts exactly two pip commands (--upgrade pip and pip install pre-commit).
Policy documentation
AGENTS.md, docs/contributing.md
Quality Bar rule and contributing guide bullet added stating pre-commit CI must install only the pre-commit runner, not KeepGPU runtime dependencies.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Wangmerlyn/KeepGPU#62: Touches AGENTS.md with the same Pre-commit CI guideline to install only the pre-commit runner.

Poem

🐇 Hop hop, less is more,
No extra packages to install,
Pre-commit alone at the door,
Hooks bring their own tools — that's all!
Lean CI, fast and neat,
The rabbit's workflow is complete! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 matches the main change: making the pre-commit workflow install only the pre-commit runner.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/precommit-lean-ci

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates documentation in AGENTS.md and docs/contributing.md to specify that pre-commit CI should only install the pre-commit runner and avoid installing runtime dependencies. It also adds a test in tests/test_ci_workflows.py to enforce this rule. Feedback was provided to make the test more robust by handling both .yaml and .yml extensions and using regular expressions instead of exact string matching for pip install commands.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tests/test_ci_workflows.py Outdated
@Wangmerlyn
Wangmerlyn force-pushed the codex/precommit-lean-ci branch from 3c9c1f3 to ee6c89e Compare June 30, 2026 11:26
@Wangmerlyn
Wangmerlyn force-pushed the codex/precommit-lean-ci branch from ee6c89e to d80039a Compare June 30, 2026 11:30
@Wangmerlyn
Wangmerlyn merged commit 363ec25 into main Jun 30, 2026
6 checks passed
@Wangmerlyn
Wangmerlyn deleted the codex/precommit-lean-ci branch June 30, 2026 11:36
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.

1 participant