ci: keep the release-please PR rebased onto main (LAB-335) - #221
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 20 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe release workflow removes obsolete job outputs and replaces lockfile syncing with a concurrency-controlled job that discovers the open release PR, rebases its branch onto ChangesRelease PR synchronisation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant GitHubPRAPI
participant ReleasePRBranch
participant MainBranch
GitHubActions->>GitHubPRAPI: Find open release-please branch
GitHubActions->>ReleasePRBranch: Check out release branch
GitHubActions->>MainBranch: Fetch origin/main
GitHubActions->>ReleasePRBranch: Rebase onto origin/main
GitHubActions->>ReleasePRBranch: Regenerate lockfiles
GitHubActions->>ReleasePRBranch: Force-push with lease
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 24 minutes. |
release-please only regenerates its release PR when a releasable commit (feat/fix/perf/security/revert) lands on main. The hidden changelog types (chore/docs/test/ci, e.g. Renovate lockfile bumps) advance main without regeneration, so the release branch silently drifts behind until a human rebases it by hand (PR #214: four bot regenerations within ~30s of each releasable commit, none for test #206 / chore #188, manual force-push 8h later). Replace sync-lockfiles with a sync-release-pr job that runs on every push to main while a release PR is open (discovered at runtime; release-please outputs are empty on non-regenerating runs). It rebases the branch onto main and REGENERATES the lockfiles instead of rebasing them: the branch's own lockfile commit is dropped and rebuilt from the bumped manifests, so lockfile changes on main (LAB-64 Renovate bumps) can never conflict with it. On regeneration runs the rebase no-ops and the job reduces to the old sync-lockfiles behaviour. Pushes use the existing App token so the PR's required checks re-trigger; the push targets the release branch, so neither this workflow nor the wheel-build matrix (gated on release_created) re-fires. force-with-lease plus a job-level concurrency group keeps concurrent main pushes from racing the branch writers; an up-to-date branch is never pushed. Verified by simulation against the real #214 state: the drifted branch (reconstructed pre-rebase head 635c8d0+lockfile commit) converges to a clean mergeable state matching the human's manual rebase; a crafted same-line uv.lock conflict that breaks a plain rebase is absorbed by the drop-and-regenerate path; a fresh regeneration state gets exactly the old lockfile-sync commit; an already-current branch results in no push. Co-authored-by: multica-agent <github@multica.ai>
b5b097e to
64ef7bd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 @.github/workflows/release-please.yml:
- Around line 123-129: Update the “Checkout release PR branch” actions/checkout
step to set persist-credentials to false, then ensure authentication is
explicitly restored only on the final push step using the required token.
🪄 Autofix (Beta)
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.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1e9fb593-8f9c-467c-a52a-2a10b063802d
📒 Files selected for processing (1)
.github/workflows/release-please.yml
…e-PR checkout The App token no longer sits in .git/config while uv/cargo resolve third-party manifests; the final push re-supplies it via GIT_CONFIG_* env vars (ephemeral, off-disk, off-argv). Push behavior is unchanged. CodeRabbit-Resolved: release-please.yml:123:Disable persisted checkout cred Co-authored-by: multica-agent <github@multica.ai>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Closes LAB-335.
Root cause of #214's manual rebase (verified, not assumed)
strict_required_status_checks_policy: false— there is no "require branches up to date" rule.git merge-treeof the pre-rebase head (635c8d08+ its lockfile-sync commit, recovered from the force-push timeline) against main exits clean, and no lockfile-touching commit landed on main after the last bot regeneration.test:test: stop docs conftest leaking CACHEKIT_MASTER_KEY into the env (#205) #206 /chore:chore: benchmark suite — fix harness, one-folder consolidation, measurement integrity + GIL + unified runner #188 — after which the branch sat 2 commits behind for ~8 h until 27Bslash6 force-pushed a manual rebase at 2026-07-19T23:18Z. release-please compares its generated file content (changelog/version), which hidden commit types don't change, so it never notices the stale base.The lockfile-conflict scenario (LAB-64: a Renovate lockfile bump on main colliding with the branch's
chore: sync lockfilescommit) did not fire this time, but it is real — simulation below proves a plain rebase conflicts when a main-side lockfile edit overlaps the sync commit's hunks (e.g. the resolver-drift lines the sync commit carries).Change
sync-lockfilesbecomessync-release-pr, a superset:gh pr list, head prefixrelease-please--) because release-please only setsoutputs.pron runs where it regenerated — exactly the complement of the runs this job must cover. No open release PR → clean early exit before any checkout/toolchain setup.chore: sync lockfiles with releasecommit is dropped pre-rebase and rebuilt from the bumped manifests (uv lock+cargo update -p cachekit-rs, same commands as before). Lockfile changes on main can therefore never conflict with the branch — the conflict class is removed structurally, not handled.Guard rails (the issue's ACs)
release_created == 'true', the PR was merged away) and onworkflow_dispatch(force_release re-runs must not touch the open PR).needs: release-pleasekeeps it ordered after any same-run regeneration, andprs_created == 'true'runs skip the rebase by the is-ancestor guard.main/develop; a release-branch push triggers only the PR's ownpull_requestchecks (CI, Security Fast — the required ones), via the existing App token so they actually re-trigger (defaultGITHUB_TOKENpushes don't). The wheel matrix stays gated onrelease_created.force-with-lease(refuses to clobber anything that moved the branch since checkout) + a job-levelconcurrencygroup serializing overlapping main pushes.prs_created/prjob outputs are removed — the replaced job was their only consumer.Verification (faithful simulation against the real #214 state)
Local bare-origin replay using the exact
run:script extracted from the workflow YAML (actionlint+zizmorclean — zizmor finding count identical to the pre-change file):635c8d08+ cherry-picked lockfile commit, basea5a347c) with main at4962d9b. Script output: lockfile commit dropped, release commit rebased, lockfiles regenerated (cachekit/cachekit-rs→ 0.12.0), force-with-lease push. Result is a cleanmerge-treeagainst main and matches the tree of the human's actual manual rebase (8af4832b) except oneuv.lockresolver-marker line that is a local-uv-version artifact (CI'ssetup-uvproduces the canonical output, as the old job did).uv.lockedit on the same line the sync commit rewrites — a plaingit rebaseconflicts; the drop-and-regenerate path converges to a mergeable branch with no manual step.Scope
CI/release config only — no product code, crypto, protocol, wire-format, or branch-protection changes. Sibling repos (ts/rs/core/saas) are a follow-up per the issue's non-goals.
Summary by CodeRabbit