Skip to content

Set Up uv in the Codegen Task for the Carried Pre-Commit Hook - #4656

Merged
ptr727 merged 1 commit into
developfrom
fix/4641-codegen-setup-uv
Dec 6, 2026
Merged

ptr727 merged 1 commit into
developfrom
fix/4641-codegen-setup-uv

Conversation

@ptr727

@ptr727 ptr727 commented Dec 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the codegen task failure in #4641. run-codegen-pull-request-task.yml runs dotnet husky install in its format step, so the caller's carried .husky/pre-commit runs when peter-evans/create-pull-request commits. That hook runs the prose gate, and hub_fetch_run.py, through uv. The task never installed uv, so every codegen run failed with uv: not found and opened no pull request.

  • Adds the pinned astral-sh/setup-uv step (the same SHA validate-task.yml uses) before the format step, at Python 3.13, the floor prose_lint.py declares. ignore-nothing-to-cache: true covers a run where codegen changes nothing, the hook never runs, and the cache stays empty.
  • Updates the task's description in docs/reusable-workflows.md.

Refs #4641. The closing keyword goes on the develop -> main promotion.

Verification

  • Prose gate (diff-scoped, comments allowed), actionlint, and the eol check pass.
  • tests/test_release_guards, tests/test_repo_gate, tests/test_audit_helpers: 490 tests pass.
  • Local strict review at the frontier tier: no findings.

🤖 Generated with Claude Code

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>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Dec 6, 2026
Copilot AI lite review requested due to automatic review settings December 6, 2026 20:58
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Dec 6, 2026
@ptr727

ptr727 commented Dec 6, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head c7428c758b64ba7008af484392da75e4cdea4289, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b512351 and c7428c7.

Files selected for processing: 2

  • .github/workflows/run-codegen-pull-request-task.yml
  • docs/reusable-workflows.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copilot AI 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.

🟢 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-uv with Python 3.13 before formatting.
  • Documents the uv requirement.
  • 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

codecov Bot commented Dec 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.47%. Comparing base (b38e084) to head (c7428c7).
⚠️ Report is 433 commits behind head on develop.

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     
Flag Coverage Δ
python-3.13 78.47% <ø> (-3.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Dec 6, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Dec 6, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited. More included reviews will be available in 52 minutes.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 312a635 into develop Dec 6, 2026
18 checks passed
@ptr727
ptr727 deleted the fix/4641-codegen-setup-uv branch December 6, 2026 21:23
ptr727 added a commit that referenced this pull request Dec 6, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants