Skip to content

chore(maint): make the PR merge drift guard advisory by default#100593

Merged
steipete merged 1 commit into
mainfrom
chore/relax-pr-drift-guard
Jul 6, 2026
Merged

chore(maint): make the PR merge drift guard advisory by default#100593
steipete merged 1 commit into
mainfrom
chore/relax-pr-drift-guard

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The scripts/pr merge-verify step hard-fails whenever mainline gained "relevant" files after a PR's prepare step, forcing prepare-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=1 restores 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.sh clean; the change is a guarded early-exit around the existing message, default flipped, strict mode preserved.
  • Empirical: this session's landing log — 12 PRs landed, with 9+ drift-guard bounces costing a CI cycle each; two PRs required 4-5 sync rounds. The guard never caught a real conflict (GitHub mergeable state and required checks caught everything real).

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.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS maintainer Maintainer-authored PR labels Jul 6, 2026
@steipete
steipete merged commit 785f197 into main Jul 6, 2026
33 of 35 checks passed
@steipete
steipete deleted the chore/relax-pr-drift-guard branch July 6, 2026 04:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/pr-lib/merge.sh
Comment on lines +172 to +176
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)."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
…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.
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant