Skip to content

shepherd: a dropped head goes back to draft, so fix rounds run cheap audits only (Part of #6278) - #6972

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6278-20261029T0222Z
Oct 29, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/6278-20261029T0222Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Part of #6278 (item 6: intermediate pushes run cheap gates only; heavy jobs run once the PR carries shepherd:merge).

Checklist: done [c:c1b5ac83]

What changes

The #5104 draft rule already keeps heavy pull_request workflows off drafts, and churn PRs stay drafts until the shepherd marks them ready on shepherd:merge. The hole: once a PR is ready, a fix-round push drops shepherd:merge, but the PR stays ready, so every later push runs the full heavy set (det, db2, ground-truth, equivalence-e2e, smoke, ...) on heads nobody can merge yet.

No required check is weakened. A draft cannot merge, and a ready PR (labelled or not) still runs everything. No workflow if: reads a label, so a hand-merged PR is never green on skipped checks. No shepherd-*.yml edits; the shepherd's app token already marks PRs ready and reruns runs, which are the same permissions convert-to-draft and cancel need.

Measurement (replay, 40 newest merged PRs)

Method: for each PR head, take the pull_request runs outside the cheap audits and sum job minutes, each rounded up. A head counts as approved if shepherd:merge was added while it was the head, or if it is the merged head.

Class / Sibling gaps

Class: heavy CI spent on a PR head nobody can merge yet.

Sibling gaps (not filed):

  1. Owner-opened ready PRs that are never labelled (CICS macro tables: HLASM syntax audit, DFHPLT/DSNCRCT, JCL join, era_tags CITE (#5154 #5218 #5195) #6918, CI shepherd: ci-gate status on every open PR, and a red check turns auto-merge off (#6919) #6920) run the full set on every push: 640 of the 1,026 min. The only safe lever is opening them as drafts. That is a habit, not a gate.
  2. After a drop, the cancelled heavy runs stay on the head as cancelled checks until the ready run supersedes them (pr_check.classify takes the newest deciding run per name). If a workflow does not fire on ready_for_review, its stale cancelled check would read as infra and be rerun once the PR is ready. test_workflow_draft_gate.py requires ready_for_review on every heavy workflow, so this is not reachable today.
  3. Workflows without cancel-in-progress on PR runs keep running a superseded head's jobs after a fresh push (separate CI cost: one change classifier so each PR runs only the jobs and tests it can affect (docs, ground-truth, det/db2, suite, re-runs) #6278 slice, not swept here).

Remaining slices

  • None for item 6 beyond the sibling gaps above. Owner checkbox only.

Gates

  • pytest tests/tools/test_shepherd_gh.py tests/core_engine/test_workflow_draft_gate.py: 201 passed (draft gate also run from /tmp: 32 passed)
  • audit_check.py: all clear (ruff baseline, format, mypy, dead-key, ast-accuracy)
  • pr_gates.py --fast (heavy-run, on the pushed HEAD): 9/9 gates pass

Cross-repo

None: engine-repo shepherd tooling only.

🤖 Generated with Claude Code

…audits only (Part of #6278)

When a push moves a labelled PR to an unapproved head, the shepherd now also
converts it to a draft and cancels that head's in-flight heavy pull_request
runs (everything outside CHEAP_ON_DRAFT, the #5104 allowlist, now shared with
test_workflow_draft_gate.py). Re-adding shepherd:merge marks it ready, which
starts the full set once. No infra/flake rerun while a draft (a rerun replays
draft=false). Replay over 40 merged PRs in docs/ci.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 29, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 29, 2026 02:56
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 29, 2026 02:57
@squid-shepherd
squid-shepherd Bot merged commit 57f7ff7 into main Oct 29, 2026
60 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6278-20261029T0222Z branch October 29, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant