fix(ci): skip Draft admission for heavy PR workflows - #2376
seonghobae wants to merge 4 commits into
Conversation
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
OpenCode reviewed the current-head product diff. Coverage is a separate gate.
Changed files
.github/workflows/agent-review-runtime-quality-ci.yml— GitHub Actions review job.github/workflows/codeql-pr.yml— GitHub Actions review job.github/workflows/python-security.yml— GitHub Actions review job.github/workflows/sast-semgrep.yml— GitHub Actions review job.github/workflows/security-scan.yml— GitHub Actions review jobCHANGELOG.d/20260925-heavy-pr-workflow-draft-admission.md— repository behaviordocs/doctoring/heavy-pr-workflow-draft-admission.md— operator or user guidancedocs/doctoring/required-workflow-path-filter-boundary.md— operator or user guidancetests/test_docs_only_pr_runner_admission.py— regression suitetests/test_required_workflow_queue_contract.py— regression suite
Changed behavior
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: agent-review-runtime-quality-ci.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: agent-review-runtime-quality-ci.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Workflow: codeql-pr.yml"]
S2 --> I2["GitHub Actions review job"]
I2 --> R2["Review risk: Workflow: codeql-pr.yml"]
R2 --> V2["actionlint plus required checks"]
Evidence --> S3["Workflow: python-security.yml"]
S3 --> I3["GitHub Actions review job"]
I3 --> R3["Review risk: Workflow: python-security.yml"]
R3 --> V3["actionlint plus required checks"]
Evidence --> S4["Workflow: sast-semgrep.yml"]
S4 --> I4["GitHub Actions review job"]
I4 --> R4["Review risk: Workflow: sast-semgrep.yml"]
R4 --> V4["actionlint plus required checks"]
Evidence --> S5["Workflow: security-scan.yml"]
S5 --> I5["GitHub Actions review job"]
I5 --> R5["Review risk: Workflow: security-scan.yml"]
R5 --> V5["actionlint plus required checks"]
Evidence --> S6["Repository file: 20260925-heavy-pr-workflow-draft-admission.md"]
S6 --> I6["repository behavior"]
I6 --> R6["Review risk: Repository file: 20260925-heavy-pr-workflow-draft-admission.md"]
R6 --> V6["required checks"]
Evidence --> S7["Docs: heavy-pr-workflow-draft-admission.md (2 files)"]
S7 --> I7["operator or user guidance"]
I7 --> R7["Review risk: Docs: heavy-pr-workflow-draft-admission.md (2 files)"]
R7 --> V7["docs review"]
Evidence --> S8["Test: test_docs_only_pr_runner_admission.py (2 files)"]
S8 --> I8["regression suite"]
I8 --> R8["Review risk: Test: test_docs_only_pr_runner_admission.py (2 files)"]
R8 --> V8["targeted test run"]
Findings
No source-backed product finding is synthesized from the coverage gate. A coverage miss belongs in the status comment.
- Head SHA:
2633197d3ded3417c3acf97291a15a053d2b214b - Workflow run: 36199038763
- Workflow attempt: 1
- Coverage gate:
failure
Review outcome
Coverage is a gate, not the review. This body reviews the changed product files.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: agent-review-runtime-quality-ci.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: agent-review-runtime-quality-ci.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Workflow: codeql-pr.yml"]
S2 --> I2["GitHub Actions review job"]
I2 --> R2["Review risk: Workflow: codeql-pr.yml"]
R2 --> V2["actionlint plus required checks"]
Evidence --> S3["Workflow: python-security.yml"]
S3 --> I3["GitHub Actions review job"]
I3 --> R3["Review risk: Workflow: python-security.yml"]
R3 --> V3["actionlint plus required checks"]
Evidence --> S4["Workflow: sast-semgrep.yml"]
S4 --> I4["GitHub Actions review job"]
I4 --> R4["Review risk: Workflow: sast-semgrep.yml"]
R4 --> V4["actionlint plus required checks"]
Evidence --> S5["Workflow: security-scan.yml"]
S5 --> I5["GitHub Actions review job"]
I5 --> R5["Review risk: Workflow: security-scan.yml"]
R5 --> V5["actionlint plus required checks"]
Evidence --> S6["Repository file: 20260925-heavy-pr-workflow-draft-admission.md"]
S6 --> I6["repository behavior"]
I6 --> R6["Review risk: Repository file: 20260925-heavy-pr-workflow-draft-admission.md"]
R6 --> V6["required checks"]
Evidence --> S7["Docs: heavy-pr-workflow-draft-admission.md (2 files)"]
S7 --> I7["operator or user guidance"]
I7 --> R7["Review risk: Docs: heavy-pr-workflow-draft-admission.md (2 files)"]
R7 --> V7["docs review"]
Evidence --> S8["Test: test_docs_only_pr_runner_admission.py (2 files)"]
S8 --> I8["regression suite"]
I8 --> R8["Review risk: Test: test_docs_only_pr_runner_admission.py (2 files)"]
R8 --> V8["targeted test run"]
OpenCode Review Overview
Coverage evidence did not pass, so approval is blocked. The formal pull-request review is the source-backed diff review, not this status comment. |
Admission correction — exact head
|
Summary
Extend the runner-free Draft lifecycle with the corrected ruleset boundary:
changed-scope) — Draft skip only for native.githubrunssemgrep) — Draft skip only for native.githubrunsdetect-languages) — Draft skip only for native.githubrunsdetect-python) — direct-run Draft guard retained unchangedagent_review_runtime_quality) — direct-run Draft guard retained unchangedRuleset boundary
Organization ruleset-launched required workflows ignore their
typesfilter and do not re-trigger onready_for_review. Therefore Security Scan, SAST Semgrep, and CodeQL use:github.event.pull_request.draft == false || github.repository != 'ContextualWisdomLab/.github'In ruleset-targeted repositories, the guard always passes and the required scan still runs while Draft. In native
ContextualWisdomLab/.githubruns, Draft generations skip the first runner job and nativeready_for_reviewcreates the fresh scan. This avoids the security gap observed in newsdom-api#942.Behavior
opened,synchronize, andreopenednative.githubgenerations skip the first runner-consuming job.ready_for_reviewremains subscribed for native re-entry.converted_to_draftremains subscribed so existing PR concurrency cancellation retires prior Ready work.repository_dispatchbehavior remains unchanged.detect-languages, not matrix-consuminganalyze-head, preserving the existing matrix/check-name safety boundary.mainbranch and path filters remain unchanged.Documentation and contracts
docs/doctoring/required-workflow-path-filter-boundary.mdnow records that Draft skipping is.github-local only and that ruleset workflows cannot rely onready_for_review. Contract tests assert repository guards for the three ruleset-required workflows and assert the direct-run-only workflows remain unguarded by repository identity. The follow-up contract is placed after the stable merge-scheduler contract so applying this branch on top of #2374 does not collide with Strix's test insertion.Validation
GITHUB_ACTIONS=true—193 passed.go run github.com/rhysd/actionlint/cmd/actionlint@latestpassed for all five workflows.git diff origin/main...HEAD --checkpassed.Developer experience: native
.githubDraft PRs avoid expensive security runner admission without starving ruleset-targeted required checks.User experience: Draft-origin PRs in sibling repositories still receive Strix/Security/Semgrep/CodeQL coverage instead of waiting for an unrelated push.