Repository navigation
Set Up uv in the Codegen Task for the Carried Pre-Commit Hook - #4656
Conversation
The codegen task's format step installs the caller's hooks, so the carried pre-commit hook runs when the pull request step commits. That hook runs the prose gate through uv, which the task never installed, so every codegen run failed with "uv: not found" and opened no pull request. Add the pinned setup-uv step at the prose gate's interpreter floor, matching validate-task.yml. Fixes #4641 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
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. |
There was a problem hiding this comment.
🟢 Approval recommended
No actionable review findings were identified in the workflow and documentation changes.
No open issues 🎉
What changed in this PR
Adds uv setup to the reusable codegen workflow so carried pre-commit hooks can run during generated pull request creation.
Changes:
- Pins
astral-sh/setup-uvwith Python 3.13 before formatting. - Documents the
uvrequirement. - No actionable findings identified.
| File | Description |
|---|---|
| docs/reusable-workflows.md | Documents the uv requirement for codegen tasks. |
| .github/workflows/run-codegen-pull-request-task.yml | Installs pinned uv with Python 3.13 before formatting and pull request creation. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4656 +/- ##
===========================================
- Coverage 81.60% 78.47% -3.14%
===========================================
Files 26 58 +32
Lines 9070 17873 +8803
===========================================
+ Hits 7402 14026 +6624
- Misses 1668 3847 +2179
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
…4657) ## Promoted pull requests - #4656: Set up uv in `run-codegen-pull-request-task.yml` before its format step, so a caller's carried pre-commit hook can run the prose gate through uv when the pull request step commits. Every codegen run in a repository carrying the current hook failed with `uv: not found` and opened no pull request. - #4646: Require `CODECOV_TOKEN` for HolidayLights in `registry/repos.json` ahead of its Python tests, and record its planned `python` type as a drift note. - #4654: Declare HolidayLights as `python` with `pythonDirectories: ["."]` now that its `main` carries the Python tool and tests, drop #4646's planned-drift note, and record its dropped CRLF pin in `docs/eol-lf-rollout.md`. Closes #4641 ## Promotion review findings - Local strict review against `main` on 23478c5, `run-codegen-pull-request-task.yml:66`: once uv is installed, the caller's pre-commit prose gate runs over the bot commit, so a generator emitting an added or edited comment line would abort it. Declined: the gate reads only lines the commit adds or edits. LanguageTags' generated C# carries a fixed set of 7 `///` summary lines in two of its four `*DataGen.cs` files, and a data refresh edits none of them. NxWitness generates only `Make/Version.json` and `Make/Matrix.json`. A generator template change arrives by a human pull request, whose own commit runs the same hook. The bot-commit hook was kept on deliberately, the first fix #4641 offers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Fixes the codegen task failure in #4641.
run-codegen-pull-request-task.ymlrunsdotnet husky installin its format step, so the caller's carried.husky/pre-commitruns whenpeter-evans/create-pull-requestcommits. That hook runs the prose gate, andhub_fetch_run.py, through uv. The task never installed uv, so every codegen run failed withuv: not foundand opened no pull request.astral-sh/setup-uvstep (the same SHAvalidate-task.ymluses) before the format step, at Python 3.13, the floorprose_lint.pydeclares.ignore-nothing-to-cache: truecovers a run where codegen changes nothing, the hook never runs, and the cache stays empty.docs/reusable-workflows.md.Refs #4641. The closing keyword goes on the develop -> main promotion.
Verification
tests/test_release_guards,tests/test_repo_gate,tests/test_audit_helpers: 490 tests pass.frontiertier: no findings.🤖 Generated with Claude Code