chore(maint): make the PR merge drift guard advisory by default#100593
Conversation
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.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63ef0457d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ "${OPENCLAW_PR_STRICT_DRIFT:-}" = "1" ]; then | ||
| echo "Merge verify failed: mainline drift is relevant to this PR; run scripts/pr prepare-sync-head $pr before merge." | ||
| exit 1 | ||
| fi | ||
| echo "Merge verify: WARNING — mainline drift is relevant to this PR; proceeding (OPENCLAW_PR_STRICT_DRIFT=1 restores the hard gate)." |
There was a problem hiding this comment.
Preserve strict drift for release merges
Release-maintainer instructions still tell agents to run scripts/pr merge-run <PR> and only perform prepare-sync-head if merge-run requires it (.agents/skills/release-openclaw-maintainer/SKILL.md:107-109), but this new default makes relevant drift only warn unless the operator already knows to set OPENCLAW_PR_STRICT_DRIFT=1. For release-critical PRs with overlapping or merge-critical mainline drift, the documented flow now proceeds to merge with stale exact-head evidence instead of forcing the sync/retest that the commit message says release flows retain; wire the env into the release workflow or update the release path so strict mode is actually enforced there.
Useful? React with 👍 / 👎.
…claw#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.
…claw#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.
What Problem This Solves
The
scripts/prmerge-verify step hard-fails whenever mainline gained "relevant" files after a PR's prepare step, forcingprepare-sync-head+ a full fresh CI cycle. With more than one session landing concurrently, every merge invalidated every other in-flight landing: today this serialized ~15 PRs behind repeated 20-minute CI cycles, with several landings looping 3-5 times on drift alone (including drift triggered by the shared i18n inventory that every mobile PR touches).Why This Change Was Made
Maintainer decision (steipete): the relevant-drift check becomes advisory by default — it warns and proceeds. Required checks still gate at the prepared head, and GitHub's mergeable state still blocks true conflicts.
OPENCLAW_PR_STRICT_DRIFT=1restores the previous hard gate for release-critical flows. Provenance of the original gate: drift hard-fail introduced in 873dce1 (2026-04-23), exact-head evidence hardening in abb6f04 (2026-06-18) — flagging @vincentkoc for post-merge review as the release-controls owner.User Impact
Agent and maintainer landings stop serializing behind sibling merges; multi-session landing days become linear instead of quadratic. Release flows keep the strict gate via the env switch.
Evidence
bash -n scripts/pr-lib/merge.shclean; the change is a guarded early-exit around the existing message, default flipped, strict mode preserved.