fix(#2489): retry scaffold push on non-fast-forward (auto_init race) - #2491
Conversation
PR Summary by QodoRetry scaffold ref update with force on GitHub non-fast-forward (422) Description
Diagram
High-Level Assessment
Files changed (2)
|
Site previewPreview: https://dfdcdb6e-site.fullsend-ai.workers.dev Commit: |
Code Review by Qodo
1.
|
|
🤖 Finished Review · ✅ Success · Started 9:45 AM UTC · Completed 9:59 AM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runLooks good to me Previous run (2)Looks good to me FindingsLow
Previous run (3)Looks good to me Previous run (4)Looks good to me Previous run (5)Looks good to me Previous run (6)ReviewFindingsLow
Previous run (7)ReviewFindingsMedium
Low
Labels: PR fixes a bug in the forge/github install scaffold flow, directly addressing e2e test flakiness Previous run (8)ReviewFindingsMedium
Low
Previous run (9)ReviewFindingsHigh
Medium
Low
Labels: PR fixes a bug in the forge/github install scaffold flow, directly addressing e2e test flakiness |
de388e8 to
a2348de
Compare
|
🤖 Finished Review · ✅ Success · Started 11:14 AM UTC · Completed 11:27 AM UTC |
a2348de to
e17e485
Compare
|
🤖 Finished Review · ✅ Success · Started 11:34 AM UTC · Completed 11:47 AM UTC |
ralphbean
left a comment
There was a problem hiding this comment.
I think this needs a change before we can merge. See inline.
waynesun09
left a comment
There was a problem hiding this comment.
Multi-Agent Review — 6 agents (Claude, Gemini, Codex)
5 of 6 agents independently confirmed @ralphbean's inline finding: the force-retry path is unreachable in the actual failing scaffold flow. Three additional unique findings below (HIGH, 2x MEDIUM) that are not covered by existing review comments.
Assisted-by: Claude (review), Gemini (review), Codex (review)
waynesun09
left a comment
There was a problem hiding this comment.
3 new findings (1 HIGH, 2 MEDIUM) from multi-agent review — unique issues not covered by existing comments. See inline.
Assisted-by: Claude (review), Gemini (review), Codex (review)
e17e485 to
2404f44
Compare
|
🤖 Finished Review · ✅ Success · Started 7:56 AM UTC · Completed 8:08 AM UTC |
|
Applied more feedback before merging. Thanks for the reviews. |
|
🤖 Finished Review · ✅ Success · Started 7:09 AM UTC · Completed 7:21 AM UTC |
Superseded by updated review
e1274ea to
8bba718
Compare
CommitFiles now detects 422 "Update is not a fast forward" errors during scaffold pushes and retries with `force: true`. Fixes race where GitHub's async auto_init creates a commit between ref fetch and ref update. Root cause: CreateRepo sets auto_init: true. GitHub materializes initial commit async — can complete after commitFilesTo fetches current ref SHA (line 658) but before updating ref (line 795). Tree built from stale parent → non-fast-forward. Force push safe for scaffold — repo just created, we own only commit. Separate from branch protection errors (still rejected). Closes #2489 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
Patch coverage was below 80% threshold because these new code paths were only exercised from other packages' tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
8bba718 to
5a5d9ed
Compare
|
🤖 Finished Review · ✅ Success · Started 9:59 AM UTC · Completed 10:11 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 10:22 AM UTC · Completed 10:28 AM UTC |
Retro: PR #2491 — fix(#2489): retry scaffold push on non-fast-forwardTimelineThis human-authored PR (by rh-hemartin, co-authored with Claude Opus 4.6) fixed a flaky e2e test caused by a race between GitHub's
Review quality gapThe review bot had the key clue — it noted Existing issues checked
One proposal filed for the distinct gap: verifying fix reachability via call-chain tracing. Proposals filed
|
Fixes #2489
Summary
Scaffold pushes now retry once when hitting "Update is not a fast forward" errors. Resolves race where GitHub's async auto_init materializes a commit between ref fetch and ref update.
Root cause
CreateReposetsauto_init: true(line 377 of github.go). GitHub creates initial commit async — can complete aftercommitFilesTofetches current ref SHA (line 658) but before updating ref (line 899). Scaffold commit built from stale parent → non-fast-forward rejection.Impact
Should eliminate most common e2e flake — appeared in nearly every failed run.
TestVendorFromSubdirectoryandTestAdminInstallUninstallhit this repeatedly.