fix(#409): fetch before force-with-lease retry in post-scripts - #414
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#409): fetch before force-with-lease retry in post-scripts#414fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The push retry logic in post-fix.src.sh and post-code.src.sh used
--force-with-lease after a non-fast-forward rejection but did not
run git fetch first. Without a fetch, the local tracking ref is
stale from clone time, so the lease check rejects the push even
when the agent's changes don't conflict with a concurrent push.
Add git fetch origin "${BRANCH}" between the non-fast-forward
detection and the --force-with-lease retry in both scripts. This
ensures the tracking ref is current so force-with-lease accurately
distinguishes a safe rebase divergence from a genuinely conflicting
concurrent push.
Note: pre-commit could not run in sandbox (network blocked, exit 3).
The post-script runs an authoritative pre-commit on the runner.
Closes #409
Member
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 6:43 AM UTC · Completed 6:59 AM UTC |
ReviewFindingsMedium
Labels: PR modifies both fix-agent and code-agent post-scripts and is a bug fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
git fetch origin "${BRANCH}"before the--force-with-leaseretry in the push logic of bothpost-fix.src.shandpost-code.src.sh.Without the fetch, the local remote-tracking ref is stale from clone time. When another process pushes to the branch during a long agent run, the subsequent
--force-with-leaseretry compares against this stale ref and rejects the push — even when the agent's changes don't conflict with the concurrent push. This wastes entire agent runs and can cause multi-hour delays before a manual retry succeeds.Changed files:
scripts/post-fix.src.sh— Addedgit fetchbefore force-with-lease retry in section 4 (push branch). Updated inline comment to describe the new behavior.scripts/post-code.src.sh— Addedgit fetchbefore force-with-lease retry in section 7b (push branch).scripts/post-fix.sh,scripts/post-code.sh— Rebuilt bundled scripts viamake script-build.scripts/post-fix-test.sh,scripts/post-code-test.sh— Added grep-based test verifying the bundled script contains thegit fetchcall.Testing
post-fix-test.shpass (13/13), including the newbundled-script-fetches-before-force-with-leasetest.post-code-test.shpass (66/66), including the newbundled-script-fetches-before-force-with-leasetest.make check-bundleconfirms bundled scripts match source.post-triage-test.sh(prerequisites-creates-allowed-issue) is unrelated — confirmed it fails identically on the base branch.Closes #409
Post-script verification
agent/409-fetch-before-force-with-lease)e7a3660d8d2dffb418d747883540f78588c8c60f..HEAD)