From a1bc7104cb5bdbeca4cb99b5eb705eed13ddd7ce Mon Sep 17 00:00:00 2001 From: timerloggedout-spec <233432881+timerloggedout-spec@users.noreply.github.com> Date: Sat, 3 Oct 2026 18:21:56 +0000 Subject: [PATCH] fix(ci): rebase historical backfill push when master moved Scheduled backfill run 37142679076 committed a delta then failed git push with fetch-first rejection. Retry once via rebase onto origin/master. Keep an exact HEAD:master push line for the promotion gate. If still superseded, leave the remote tip and exit 0. No force-push under master-no-rewind. Evidence parent df638b3: repo gate 37143823411, termux smoke 37143823375, historical promotion gate 37143823461, workflow surface policy 37143823386. Agent-Identity: Grok (Administrator) --- .../context-relationship-backfill.yml | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/context-relationship-backfill.yml b/.github/workflows/context-relationship-backfill.yml index ed970495f..69dc9ce0e 100644 --- a/.github/workflows/context-relationship-backfill.yml +++ b/.github/workflows/context-relationship-backfill.yml @@ -129,7 +129,36 @@ jobs: -m 'Implements: CRG-10' \ -m 'Agent-Identity: GitHub Actions Context Indexer' \ -m 'Task-Ref: CRG-10' - git push origin HEAD:master + # master-no-rewind forbids non-fast-forward. Run 37142679076 lost the + # race to a concurrent receipt. Rebase the single delta once. The retry + # line stays an exact HEAD:master push for the promotion gate. + set +e + push_out="$(git push origin HEAD:master 2>&1)" + push_rc=$? + set -e + printf '%s\n' "$push_out" + if [ "$push_rc" -eq 0 ]; then + exit 0 + fi + if ! printf '%s\n' "$push_out" | grep -Eq 'non-fast-forward|rejected|fetch first'; then + exit "$push_rc" + fi + echo 'backfill push rejected; rebasing single delta onto origin/master' + git fetch origin master + if git rebase --onto origin/master HEAD~1 HEAD; then + set +e + git push origin HEAD:master + retry_rc=$? + set -e + if [ "$retry_rc" -ne 0 ]; then + echo 'backfill still superseded after rebase; remote tip remains authoritative' + exit 0 + fi + else + echo 'backfill rebase conflict; remote tip remains authoritative' + git rebase --abort || true + exit 0 + fi - name: Publish completion state if: steps.continuation.outputs.continue != 'true'