Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/context-relationship-backfill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading