Skip to content

ci: draft PRs skip the heavy PR workflows (#5104) - #5105

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5104-draft-skip-ci
Oct 14, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5104-draft-skip-ci

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #5104. Workflow edits are allowed by the owner for this PR (queue item allow_workflows); please review the workflow diff carefully.

What changed

  • 21 heavy pull_request workflows: types: [opened, synchronize, reopened, ready_for_review] (det-sweep and rosetta-audit keep their own types, plus ready_for_review) and a job-level condition on every job that can run on a PR: github.event_name != 'pull_request' || github.event.pull_request.draft == false, ANDed with the job's existing if. A bare draft == false would be null-false on push/schedule/dispatch and disable those runs; the needs: chained and always() jobs (det, full-suite, the tested-tree gates) each carry it too, since a skipped tested-tree leaves outputs.skip empty and would let its dependents run.
  • Unchanged: ruff-audit, mypy-audit, small-audits, answer-key-guard (run on drafts); pull_request_target (shepherd-event.yml); full-suite-gate.yml.
  • Required checks (item 2): a skipped job reads as green, and the shepherd did ready + auto-merge in the same pass, so auto-merge could have fired before the ready_for_review runs existed. Now shepherd_gh.decide() only emits ready for a draft (auto-merge on the next pass, which shepherd-reconcile triggers when the real runs finish), and pr_check.merge() (also used by ci_shepherd.py) marks a draft ready without merging it. A draft itself can never merge.
  • tests/core_engine/test_workflow_draft_gate.py: guard test (cheap-audit allowlist, ready_for_review in types, every job gated, non-PR jobs allowlisted, pull_request_target untouched, self-tests).
  • docs/ci.md: one paragraph.
  • Pin/test updates: test_pipeline_pins.py line numbers, test_tested_tree_workflows.py (gate may carry only the draft condition), fake-PR defaults in test_pr_check / test_ci_shepherd.

Verification

pytest on the touched tests (311 pass); pr_gates.py --fast 6/6. Not proven in CI: this PR is a draft, so the heavy workflows should NOT start on it (only the four cheap audits); marking it ready should start the full set.

Cross-repo

None.

🤖 Generated with Claude Code

…em (#5104)

Every heavy pull_request workflow lists ready_for_review in types and gates every job on
github.event_name != 'pull_request' || draft == false. ruff/mypy/small-audits/answer-key-guard keep
running on drafts. Skipped checks read as green, so the shepherd only marks a draft ready (auto-merge
next pass) and pr_check --merge marks a draft ready without merging it. Guard test added.

Co-Authored-By: Claude Sonnet 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 14, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 14, 2026 11:48
@squid-protocol
squid-protocol enabled auto-merge (squash) October 14, 2026 11:48
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5105 @ fb7c9a8: 1 failed check(s)

== db2 3/4 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38559150273/job/115843923408
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --db2-only --cases --work /tmp/gitgalaxy-scratch/ci-digest/sweep
errors:
fail-on-cache-miss: false
Traceback (most recent call last):
RuntimeError: docker run -d --name: Unable to find image 'icr.io/db2_community/db2@sha256:2de8151713c261843868c5c3411b57be6ae79d99d70a5b3022337836776bfda6' locally
##[error]the background Db2 start did not finish
##[error]Process completed with exit code 1.
log tail:
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
GITGALAXY_ORACLE_PREBUILT: 1
DB2_JOBS: 4
GITGALAXY_DB2_POOL: 4
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.20-1/x64
MAVEN_ARGS: -ntp
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: det-sweep-db2-logs-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 689
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 8aa676d8fa8becd2f8f7a62e1d57d51958099b67544941e336fd9730c141a0d7
Finalizing artifact upload
Artifact det-sweep-db2-logs-2 successfully finalized. Artifact ID 11892558928
Artifact det-sweep-db2-logs-2 has been successfully uploaded! Final size is 689 bytes. Artifact ID is 11892558928
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/38559150273/artifacts/11892558928
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/2e4e2ebb-8d8f-4254-956d-2e51bc14d659' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 14, 2026
@squid-protocol squid-protocol removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 14, 2026
@squid-protocol
squid-protocol merged commit 61792ed into main Oct 14, 2026
147 of 149 checks passed
@squid-protocol
squid-protocol deleted the churn/5104-draft-skip-ci branch October 14, 2026 12:58
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.

ci: draft PRs skip the heavy PR workflows (free-tier runner pool saturated by churn WIP pushes)

1 participant