WIP: make CCA finalize push resilient to non-fast-forward and local h…#19
Draft
belaltaher8 wants to merge 1 commit into
Draft
WIP: make CCA finalize push resilient to non-fast-forward and local h…#19belaltaher8 wants to merge 1 commit into
belaltaher8 wants to merge 1 commit into
Conversation
…ooks The Engine SDK finalize push (commitAndPush -> finalizeChanges) ran a bare "git push --set-upstream origin HEAD" with no rebase/retry and surfaced only Node's generic "Command failed" message, dropping git's rejection reason. On follow-up CCA jobs the runner can check out a base behind the live branch tip, so the finalize push is rejected non-fast-forward and fails silently. This change: - rebases the agent's commit onto origin/<branch> and retries the push when a push is rejected non-fast-forward (fetch first / behind); - surfaces git's captured stdout/stderr so the real reason is logged instead of a bare "Command failed"; - adds --no-verify to commit/push as defense-in-depth so automated CCA pushes are not blocked by the repository's local git hooks (matches the runtime error path, which already pushes with noVerify). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
…ooks
The Engine SDK finalize push (commitAndPush -> finalizeChanges) ran a bare "git push --set-upstream origin HEAD" with no rebase/retry and surfaced only Node's generic "Command failed" message, dropping git's rejection reason.
On follow-up CCA jobs the runner can check out a base behind the live branch tip, so the finalize push is rejected non-fast-forward and fails silently.
This change: