Repository navigation
ci(ci-status): pass a draft's skipped lanes instead of failing it - #7348
Conversation
A draft's ci-status failed so that a green draft-era ci-status, the
newest on the SHA for a few minutes after the flip to ready, could not
admit a merge. With the merge-queue ruleset's owner bypass removed
(github-iac#692), every merge to main waits for the merge-group run,
which runs every lane, so that hole is closed by the queue.
- ci-status: the `Fail a draft` step and its contract-only live-state
re-check go; a `Note a draft` step prints "draft: lanes not run; the
ready_for_review run lints and tests this SHA" as a notice and in the
step summary. The aggregate passes skips only on a draft
(`treat-skipped-as: ${{ github.event.pull_request.draft && 'pass' ||
'fail' }}`). Lanes still skip on drafts, and ready_for_review and
merge_group behave as before.
- check-docs-only-gate.sh property 11 accepts `fail` or exactly that
draft form; its tests allow the form and reject a flipped one.
- scripts/ci-fail-a-draft.test.sh and its suite-seconds entry go.
- The workflow header, docs/ci-runner-routing.md and the pr-pipeline
convention README say a draft passes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WVW9hAwnSBrnFsR3kzXcB4
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 6m 58s —— View job Security review: CI security review (
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WVW9hAwnSBrnFsR3kzXcB4
|
Claude finished @kyle-sexton's task in 5m 3s —— View job Code review complete
No correctness or maintainability issues found in this diff. What I checked:
Not independently verified: this sandboxed lane could not execute shell commands ( One pre-existing condition worth naming (not a defect in this diff, already called out in the PR body as a merge prerequisite): the workflow comment at claude-lane-summary: lane=claude-review sha=1146e72960c5855cf67e6d6988d1012ade8c7aa1 run=38331534957 |
|
claude-security-review has reviewed this pull request through 1146e72; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 1146e72; a later push is reviewed from there. |
No related issue: the owner approved retiring the "draft PRs fail ci-status" rule in session.
Merge only after all three prerequisites hold:
OrganizationAdminbypass from this repository'smerge-queueruleset. Until it is applied, a green draft-eraci-statuscould admit a direct bypass merge.ci-statusis green on its head after the ready flip.pr-review-hostedandpr-review-security-hostedtrigger only onpull_request(nevermerge_group), and their jobs skip on drafts. Right after a ready flip, the head can show this PR's green draft-eraci-statusbeside review checks COMPLETED as SKIPPED from the draft run. The guard today only requires each check namedreviewto be COMPLETED, so a SKIPPED one passes and an agent could enqueue a PR nobody reviewed. This PR does not touch dotfiles.Summary
A draft's
ci-statusnow passes, with the noticedraft: lanes not run; the ready_for_review run lints and tests this SHA, instead of failing. Lanes still skip on drafts, AI review lanes still skip drafts, andready_for_reviewandmerge_groupbehave as before.Why it was red: between the flip to ready and the
ready_for_reviewrun's ownci-status, the draft'sci-statusis the newest on the SHA, so a green one could let a merge through. The merge queue (ALLGREEN, squash) re-runs every lane on themerge_groupcommit, so once the queue has no bypass (prerequisite 1) no merge can rest on a draft-era result.Fix
.github/workflows/pr-require-checks.ymlci-status: removes theFail a draftstep, including its contract-only live-state re-check (994925b), which served only draft-red. AddsNote a draft, which writes the notice and a step-summary line.treat-skipped-as: ${{ github.event.pull_request.draft && 'pass' || 'fail' }}, the form f0ffaf3 replaced. Outside a draft a skip is still red, apart from the ordered-skip conversion.GovernedRepositories.cs; it is true once prerequisite 1 is applied.scripts/check-docs-only-gate.shproperty 11 acceptsfailor exactly the draft form.check-docs-only-gate.test.shnow allows the draft form and rejects the flipped formdraft && 'fail' || 'pass'.scripts/ci-fail-a-draft.test.shand itsscripts/suite-seconds.txtrow. No other registry or plan references it.docs/ci-runner-routing.mdanddocs/conventions/pr-pipeline/README.md(with CHANGELOG 1.10.5) say a draft passes.Unchanged:
rerun-contract-only-siblingsstays off on drafts.Verification
actionlint .github/workflows/pr-require-checks.yml: clean.scripts/check-docs-only-gate.test.sh: PASS=88 FAIL=0.check-docs-only-gate.sh --checkon the shipped workflow: all references in the sanctioned form.scripts/*.test.shthat readspr-require-checks.ymlpassed: affected-tests, check-conformance-registry, check-detector-eval-coverage, check-docs-only, check-hooks-description, check-lane-coverage, ci-hold-merge-group, ci-ordered-skips, lint-shell-filter, plan-test-lanes, post-merge-demotion-alert, workflow-self-paths. The exception is selection-audit, which failed 1 of 12 becausestraceis missing on this host (environmental, unrelated).ci-statusshould go green with the notice.Related
pr-require-checks.ymlis not synced into this repository; each repository owns its copy. melodic-software/architecture has its ownRefuse a draftstep. It should stay unless that repository gets a merge queue with no bypass.🤖 Generated with Claude Code
https://claude.ai/code/session_01WVW9hAwnSBrnFsR3kzXcB4