Automate dist regeneration for Rolldown updates - #825
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e8338ac7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fi | ||
|
|
||
| git commit -m "Regenerate dist for Rolldown update" | ||
| git push origin "HEAD:$HEAD_BRANCH" |
There was a problem hiding this comment.
Trigger CI after committing the generated bundle
Whenever Rolldown changes dist/, this push uses the persisted repository GITHUB_TOKEN; GitHub documents that events caused by that token do not create new workflow runs (Triggering a workflow from a workflow). Consequently, the runs from check-dist.yml, lint.yml, and especially the Android matrix in test.yml remain associated with the pre-generation SHA, so the newly committed production bundle is never tested and required latest-head checks may remain missing. Push with credentials that trigger workflows, or run the complete downstream validation against the generated commit before updating the branch.
Useful? React with 👍 / 👎.
Summary
dist/files automatically for Rolldown Renovate updatesWhy
Rolldown updates can change bundled output even when application source files do not change. Renovate updates
package.jsonandpnpm-lock.yaml, but it does not regeneratedist/, socheck-distfails and requires a manual build commit.A commit pushed with the repository
GITHUB_TOKENdoes not trigger the normal pull request workflows. Without an explicit follow-up, checks remain associated with the pre-generation commit and the production bundle is not tested.Flow
pull_request_targetworkflow accepts only same-repository pull requests created by the Renovate GitHub App account on arenovate/rolldown-*branch.package.jsonchange, then rebuildsdist/without persisted Git credentials.dist/, and pushes it with the repositoryGITHUB_TOKEN.check-dist.yml,lint.yml, andtest.ymlfor the updated branch. Those runs test the dispatch event SHA, and shared per-PR concurrency cancels checks for the pre-generation commit.No personal access token or additional repository secret is required.
Security
package.json,pnpm-lock.yaml, and generateddist/files are accepted.contents: read; the write job never executes it.contents: read, do not persist checkout credentials, and always test their owngithub.shainstead of accepting a caller-selected commit SHA.The remaining trust boundary is the Rolldown package and its resolved lockfile. The generated bundle therefore remains visible for human review before merge.
Validation
actionlint1.7.12zizmor1.29.0 with online audits: no unsuppressed low-or-higher findings in the affected workflowspnpm run allwith Node.js 24.19.0 and pnpm 11.20.0git diff --checkThe live dispatch path can only be exercised after these workflow definitions are present on the default branch, as required by
workflow_dispatch.