File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -605,6 +605,26 @@ prepare_sync_head() {
605605 return 1
606606 fi
607607
608+ if [ " ${OPENCLAW_TESTBOX:- } " != " 1" ] && [ " $prep_head_sha " != " $lease_sha " ]; then
609+ local gates_cover_prep=false
610+ if [ -e .local/gates.env ] || [ -L .local/gates.env ]; then
611+ require_artifact .local/gates.env
612+ # shellcheck disable=SC1091
613+ source .local/gates.env
614+ if [ " ${LAST_VERIFIED_HEAD_SHA:- } " = " $prep_head_sha " ]; then
615+ gates_cover_prep=true
616+ fi
617+ fi
618+ if [ " $gates_cover_prep " != " true" ]; then
619+ prepare_gates " $pr "
620+ checkout_prep_branch " $pr "
621+ if [ " $( git rev-parse HEAD) " != " $prep_head_sha " ]; then
622+ echo " Prepare gates changed the synced head; restart prepare-sync-head."
623+ return 1
624+ fi
625+ fi
626+ fi
627+
608628 if [ " ${OPENCLAW_PR_PUSH_MODE:- graphql} " != " git" ] && ! require_graphql_push_preserves_ancestry " $lease_sha " " $prep_head_sha " ; then
609629 echo " Retry prepare-sync-head with the explicit git/unsigned overrides for this content-changing head."
610630 return 1
You can’t perform that action at this time.
0 commit comments