mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-18 09:06:53 +03:00
Skip the pointless final-attempt rebuild; stop misattributing push failures
Copilot's two review points: the fifth attempt performed a full reset + install + rebuild + 25s backoff that nothing would ever consume before the job failed, and the retry message blamed "main advanced" when the combined condition also fails on push errors (network, auth). The loop now breaks before recovery on the final attempt, and both the retry and terminal messages name the two possible causes. Prepared with AI assistance (Claude Code), directed by @pbakaus. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
dfd7f9636d
commit
bea601ac76
@@ -107,14 +107,19 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "main advanced during attempt $attempt; re-syncing and rebuilding."
|
||||
# The recovery work is pointless on the final attempt: nothing
|
||||
# would consume the rebuild, and the backoff would only delay
|
||||
# the failure.
|
||||
if [ "$attempt" = 5 ]; then break; fi
|
||||
|
||||
echo "Push did not land on attempt $attempt (main advanced, or the push itself failed); re-syncing and rebuilding."
|
||||
git reset --hard origin/main
|
||||
bun install --frozen-lockfile
|
||||
bun run build:release
|
||||
sleep $((attempt * 5))
|
||||
done
|
||||
|
||||
echo "::error::main kept advancing through 5 sync attempts; rerun this workflow on the latest main."
|
||||
echo "::error::Could not push generated output after 5 attempts (main kept advancing, or pushes kept failing); rerun this workflow on the latest main."
|
||||
exit 1
|
||||
|
||||
- name: Summarize generated output commit
|
||||
|
||||
Reference in New Issue
Block a user