Skip to content

fix(ci): rebase before pushing recorded baselines (push race) - #418

Merged
pftg merged 2 commits into
masterfrom
claude/fix-record-push-race
Jul 31, 2026
Merged

fix(ci): rebase before pushing recorded baselines (push race)#418
pftg merged 2 commits into
masterfrom
claude/fix-record-push-race

Conversation

@pftg

@pftg pftg commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

The second baseline-record dispatch (run 30632854418) got all the way through: pinned stack installed, full suite recorded, baselines committed — then failed at git push with a non-fast-forward rejection and discarded everything. Root cause: the record run takes ~17 minutes and master routinely moves underneath it (two merges landed mid-run).

Fix: in the commit step, git pull --rebase origin ${GITHUB_REF_NAME} before pushing, with 3 retries. Baseline PNGs cannot conflict with content commits, so the rebase is always clean.

One file, +9 lines. After merge, the third update-baselines dispatch should finally land the pinned-stack linux/ baselines.

Verification

  • YAML parses; the retry loop only runs in record mode (workflow_dispatch + update-baselines), which is the only path with contents: write usage.
  • End-to-end proof is the post-merge dispatch itself — success = chore: update screenshot baselines [ci skip] commit on master.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved automated baseline updates to handle concurrent changes more reliably.
    • Added automatic retries when publishing updated baselines, reducing failures caused by conflicting remote updates.

The ~17-min record run loses to any master push made while it runs:
run 30632854418 recorded and committed all baselines, then failed at
git push (non-fast-forward) and the work was discarded. Rebase onto
the moved ref and retry up to 3x - baseline PNGs cannot conflict with
content commits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@pftg, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 995fdca0-3220-4195-af35-3f0cb4a63d9a

📥 Commits

Reviewing files that changed from the base of the PR and between bf1b882 and cbac223.

📒 Files selected for processing (1)
  • .github/workflows/test.yml
📝 Walkthrough

Walkthrough

The workflow file test.yml changes the "Commit updated baselines" step. It replaces a single git push command with a retry loop. The loop runs git pull --rebase and git push up to 3 times, with a 5-second wait between attempts.

Changes

CI Workflow Retry

Layer / File(s) Summary
Push retry loop for baseline commit
.github/workflows/test.yml
The step replaces a single git push with a loop of up to 3 attempts. Each attempt runs git pull --rebase before git push, with a 5-second wait between failed attempts.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the CI fix: rebasing before pushing recorded baselines to prevent push races.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-record-push-race

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.

@coderabbitai coderabbitai 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.

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/test.yml:
- Around line 118-122: Update the retry loop around the git push in the workflow
to track whether any attempt succeeds, set that state when git pull and push
complete successfully, and exit with status 1 after the loop if all three
attempts fail. Preserve the existing retry logging and delay behavior.
🪄 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: CHILL

Plan: Pro Plus

Run ID: 0417e7f2-f659-40bf-a64b-50bcc1ac9bf8

📥 Commits

Reviewing files that changed from the base of the PR and between fa055c7 and bf1b882.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

Comment thread .github/workflows/test.yml
The retry loop's last command was 'sleep 5', so three failed push
attempts still exited 0 and the workflow reported success with nothing
pushed. Track the push outcome and exit 1 when all attempts fail.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXHeUErqoiyH9xN1mjC8cH
@github-actions

Copy link
Copy Markdown
Contributor

@pftg
pftg merged commit 4f2e1bc into master Jul 31, 2026
5 of 7 checks passed
@pftg
pftg deleted the claude/fix-record-push-race branch July 31, 2026 15:02
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.

2 participants