Skip to content

Commit 785f197

Browse files
authored
chore(maint): make the PR merge drift guard advisory by default (#100593)
The relevant-mainline-drift check in scripts/pr merge-verify hard-failed any landing whose prepared head predated a sibling merge, serializing all agent landings behind a fresh CI cycle per merged PR. Required checks still gate at the prepared head and GitHub mergeable state still blocks real conflicts. OPENCLAW_PR_STRICT_DRIFT=1 restores the previous hard gate for release-critical flows.
1 parent 37f96bd commit 785f197

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

scripts/pr-lib/merge.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,19 @@ merge_verify() {
164164
"${PREP_MAINLINE_BASE_SHA:-${LOCAL_PREP_HEAD_SHA:-$PREP_HEAD_SHA}}" \
165165
"$PREP_HEAD_SHA"
166166
then
167-
echo "Merge verify failed: mainline drift is relevant to this PR; run scripts/pr prepare-sync-head $pr before merge."
168-
exit 1
167+
# Relevant drift is advisory by default: required checks are already
168+
# green at the prepared head and GitHub's mergeable state still blocks
169+
# true conflicts. The hard fail serialized every landing behind a full
170+
# CI cycle per merged sibling, which collapses under multi-session
171+
# traffic. Set OPENCLAW_PR_STRICT_DRIFT=1 to restore the hard gate.
172+
if [ "${OPENCLAW_PR_STRICT_DRIFT:-}" = "1" ]; then
173+
echo "Merge verify failed: mainline drift is relevant to this PR; run scripts/pr prepare-sync-head $pr before merge."
174+
exit 1
175+
fi
176+
echo "Merge verify: WARNING — mainline drift is relevant to this PR; proceeding (OPENCLAW_PR_STRICT_DRIFT=1 restores the hard gate)."
177+
else
178+
echo "Merge verify: continuing without prep-head sync because behind-main drift is unrelated."
169179
fi
170-
echo "Merge verify: continuing without prep-head sync because behind-main drift is unrelated."
171180
fi
172181

173182
echo "merge-verify passed for PR #$pr"

0 commit comments

Comments
 (0)