Skip to content

Commit 3f83820

Browse files
committed
Keep CI activation controller-only
1 parent c79ad10 commit 3f83820

3 files changed

Lines changed: 6 additions & 118 deletions

File tree

.github/workflows/evergreen.lock.yml

Lines changed: 2 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/evergreen.md

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
EXHAUSTED_LABEL: evergreen-exhausted
6767
REQUIRED_CHECKS_JSON: '["Test & Lint","Playground E2E (Playwright)","Build","Validate Python Examples"]'
6868
CHECK_GATE_MODE: configured
69-
CI_ACTIVATION_WAIT_SECONDS: "300"
7069
MANUAL_PR: ${{ github.event.inputs.pr || '' }}
7170
MANUAL_HEAD_SHA: ${{ github.event.inputs.head_sha || '' }}
7271
MANUAL_REASON: ${{ github.event.inputs.reason || '' }}
@@ -365,42 +364,6 @@ jobs:
365364
return 1
366365
}
367366
368-
wait_for_ci_activation() {
369-
local pr="$1"
370-
local head_sha="$2"
371-
local timeout="${CI_ACTIVATION_WAIT_SECONDS:-0}"
372-
local deadline payload current_head state
373-
374-
if ! grep -Eq '^[0-9]+$' <<<"$timeout" || [ "$timeout" -le 0 ]; then
375-
return 1
376-
fi
377-
378-
deadline=$((SECONDS + timeout))
379-
while [ "$SECONDS" -lt "$deadline" ]; do
380-
sleep 10
381-
payload="$(pr_json "$pr")"
382-
current_head="$(jq -r '.headRefOid' <<<"$payload")"
383-
if [ "$current_head" != "$head_sha" ]; then
384-
echo "PR #$pr head changed from $head_sha to $current_head while waiting for CI."
385-
return 0
386-
fi
387-
388-
state="$(evaluate_readiness "$payload")"
389-
case "$state" in
390-
waiting|needs_ci)
391-
echo "CI for PR #$pr is still $state; continuing to wait."
392-
;;
393-
*)
394-
echo "CI for PR #$pr settled to $state."
395-
return 0
396-
;;
397-
esac
398-
done
399-
400-
echo "CI for PR #$pr did not settle within ${timeout}s; a later Evergreen run will continue."
401-
return 1
402-
}
403-
404367
update_branch_if_needed() {
405368
# Deterministic branch freshness handling. Keep base-branch merges out
406369
# of agent patches so safe outputs only contain repair edits.
@@ -476,25 +439,7 @@ jobs:
476439
return 1
477440
;;
478441
needs_ci)
479-
if trigger_ci_if_needed "$pr" "$head_sha" &&
480-
wait_for_ci_activation "$pr" "$head_sha"; then
481-
payload="$(pr_json "$pr")"
482-
head_sha="$(jq -r '.headRefOid' <<<"$payload")"
483-
state="$(evaluate_readiness "$payload")"
484-
if ! reconcile_ready_label "$pr" "$state" "$payload"; then
485-
echo "Could not reconcile $READY_LABEL for PR #$pr after CI activation; refusing to dispatch the agent."
486-
set_result "false" "$pr" "$head_sha" "blocked" "$reason:ready_label_failed"
487-
return 1
488-
fi
489-
490-
if [ "$state" = "needs_repair" ]; then
491-
if ! claim_active_label "$pr" "$head_sha" "$reason:ci_failed_after_activation"; then
492-
return 1
493-
fi
494-
set_result "true" "$pr" "$head_sha" "$state" "$reason:ci_failed_after_activation"
495-
return 0
496-
fi
497-
fi
442+
trigger_ci_if_needed "$pr" "$head_sha" || true
498443
return 1
499444
;;
500445
needs_branch_update)

.github/workflows/shared/evergreen/repo-policy.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ readiness controller and the agentic orchestrator must both respect this file.
4848
- Pending check policy: `waiting` — do not repair pending or in-progress checks
4949
unless another configured gate has already failed.
5050
- Missing/stale check policy: `needs_ci` — reactivate the latest `CI` run for the
51-
head SHA once, wait briefly for a result, then dispatch repair in the same run
52-
if the gate fails (see CI/CD Activation). Never rerun green checks.
51+
head SHA once, then stop so a later reconciliation can classify the resulting
52+
checks (see CI/CD Activation). Never rerun green checks.
5353
- Branch freshness ready criterion: not required to be up to date with `main`;
5454
freshness is only enforced when the branch is conflicted (`DIRTY`/`UNKNOWN`).
5555
- Additional deterministic ready criteria: PR open, has `evergreen`, not
@@ -105,9 +105,7 @@ readiness controller and the agentic orchestrator must both respect this file.
105105
- Workflows/checks Evergreen may dispatch: none by name in v1; activation is
106106
rerun-based only.
107107
- Stale check policy: reactivate the latest `CI` run for the head SHA once per
108-
head; briefly wait for it to settle; dispatch repair immediately if a
109-
configured gate fails; never rerun green checks; never re-trigger an already
110-
in-progress run.
108+
head; never rerun green checks; never re-trigger an already in-progress run.
111109
- Missing check policy: if no `CI` run exists for the head SHA, wait for the
112110
normal `pull_request`/schedule CI to start rather than forcing activation.
113111
- Empty commit policy: empty trigger commits are a last resort only, requested

0 commit comments

Comments
 (0)