Skip to content

ci: skip workflow runs on draft PRs (saves runner-minutes)#300

Merged
lusoris merged 2 commits intomasterfrom
chore/workflows-skip-drafts
May 3, 2026
Merged

ci: skip workflow runs on draft PRs (saves runner-minutes)#300
lusoris merged 2 commits intomasterfrom
chore/workflows-skip-drafts

Conversation

@lusoris
Copy link
Copy Markdown
Owner

@lusoris lusoris commented May 2, 2026

Summary

no docs needed: pure CI-infrastructure fix. provided_features, scores, and public C API are unchanged.

Adds a draft-skip guard to every job in the 7 workflows that fire on `pull_request` events:

```yaml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
```

For jobs that already had an `if:`, the guard is conjoined (both must hold). The `ready_for_review` event re-triggers CI when a PR is undrafted; push to master and workflow_dispatch are unaffected.

Why

Today's GPU-dedup wave + tiny-AI training + sync-upstream + HIP scaffold opened ~10 PRs in parallel as drafts per the single-active CI policy. But pushing the draft branch still triggered all 7 workflows because none filtered on the draft flag — burning ~70 runner-jobs on PRs explicitly NOT meant to race CI yet.

Workflows touched

  • lint-and-format: +6 new, 1 merged
  • tests-and-quality-gates: +8 new, 3 merged
  • libvmaf-build-matrix: +3 new
  • ffmpeg-integration: +3 new
  • security-scans: +5 new, 1 merged
  • docker-image: +1 new
  • rule-enforcement: +3 new

33 jobs guarded total.

Test plan

  • yaml.safe_load on all 7 workflows parses clean (no duplicate `if:` keys)
  • pre-commit run `check-yaml` passes

Six deep-dive deliverables (ADR-0108)

  • (1) Research digest: no digest needed: trivial CI infrastructure fix
  • (2) Decision matrix: no alternatives: only-one-way fix (workflow-level filter is the canonical solution)
  • (3) AGENTS.md invariant note: no rebase-sensitive invariants
  • (4) Reproducer / smoke-test command: see Test plan above
  • (5) CHANGELOG fragment: no changelog fragment needed: CI-infrastructure-only PR (no user-facing surface change)
  • (6) Rebase note: no rebase impact: fork-local CI workflows only

@lusoris lusoris marked this pull request as ready for review May 3, 2026 04:51
Copilot AI review requested due to automatic review settings May 3, 2026 04:51
Adds a draft-skip guard to every job in the 7 workflows that fire
on pull_request events:
  if: github.event_name != 'pull_request' || github.event.pull_request.draft == false

For jobs that already had an 'if:' condition, the guard is conjoined
(both must hold). The 'ready_for_review' event re-triggers CI when
a PR is undrafted; push to master and workflow_dispatch are
unaffected.

Today's GPU-dedup wave + tiny-AI training + sync-upstream + HIP
scaffold opened ~10 PRs in parallel as drafts per the single-active
CI policy. But pushing the draft branch still triggered all 7
workflows because none filtered on the draft flag — burning ~70
runner-jobs on PRs explicitly NOT meant to race CI yet.

Workflows touched: lint-and-format (+6 new, 1 merged),
tests-and-quality-gates (+8 new, 3 merged),
libvmaf-build-matrix (+3 new), ffmpeg-integration (+3 new),
security-scans (+5 new, 1 merged), docker-image (+1 new),
rule-enforcement (+3 new). 33 jobs guarded total.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lusoris lusoris force-pushed the chore/workflows-skip-drafts branch from a051d31 to dfddac5 Compare May 3, 2026 04:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR prevents CI jobs from running on draft pull requests to reduce wasted runner minutes while preserving behavior for pushes to master and manual workflow dispatch.

Changes:

  • Adds a draft-PR guard if: to jobs across 7 GitHub Actions workflows triggered by pull_request.
  • Conjoins the new guard with existing job-level if: expressions where present.
  • Leaves non-PR triggers unaffected (e.g., push, workflow_dispatch).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/tests-and-quality-gates.yml Adds draft-PR skip guard across test/coverage jobs; conjoins with existing if: conditions.
.github/workflows/security-scans.yml Adds draft-PR skip guard to security scanning jobs and tightens PR-only dependency review gating.
.github/workflows/rule-enforcement.yml Adds draft-PR skip guard to checklist/doc/ADR enforcement jobs.
.github/workflows/lint-and-format.yml Adds draft-PR skip guard to linting/formatting/static analysis jobs; updates disabled job condition.
.github/workflows/libvmaf-build-matrix.yml Adds draft-PR skip guard to build matrix and Windows builds.
.github/workflows/ffmpeg-integration.yml Adds draft-PR skip guard to FFmpeg integration build jobs.
.github/workflows/docker-image.yml Adds draft-PR skip guard to Docker build job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

name: "Coverage Gate — GPU Backends (Advisory)"
runs-on: [self-hosted, linux, gpu-full]
if: ${{ vars.GPU_COVERAGE_ENABLED == 'true' }}
if: (github.event_name != 'pull_request' || github.event.pull_request.draft == false) && (${{ vars.GPU_COVERAGE_ENABLED == 'true' }})
# don't lose the actual signal — only the lint pass on top of it.
name: Clang-Tidy SYCL (Changed Files, Advisory — Disabled)
if: false
if: (github.event_name != 'pull_request' || github.event.pull_request.draft == false) && (false)
dependency-review:
name: Dependency Review (PR Diff)
if: github.event_name == 'pull_request'
if: (github.event_name != 'pull_request' || github.event.pull_request.draft == false) && (github.event_name == 'pull_request')
@lusoris lusoris merged commit 257f1e2 into master May 3, 2026
53 of 54 checks passed
@lusoris lusoris deleted the chore/workflows-skip-drafts branch May 3, 2026 05:22
lusoris pushed a commit that referenced this pull request May 3, 2026
Per CLAUDE.md §12 r13, every PR that closes a bug, opens a bug, or
rules a Netflix upstream report not-affecting-the-fork updates
docs/state.md in the same PR. Today's session shipped 7 such PRs
without state.md updates (most were drafted in subagent-driven runs
where the bookkeeping slipped). This is the catch-up.

Recently closed (added):
- vmaf_tiny_v1.onnx external-data ref fix (PR #296)
- kernel_template SSBO cap 8->16 (PR #288 + named constant in #292)
- deliverables-check.sh backslash strip (PR #292)
- CI workflows draft-skip guard (PR #300)
- CLAUDE.md §12 r14 ffmpeg-patches gate fix (PR #297)
- ADR slug-drift cleanup (PR #304)
- 1.07e-3 CPU vmaf_v0.6.1 score drift bisect (PR #305) — confirmed
  inherited from upstream a44e5e6 motion edge-mirror fix; not a
  fork regression. Snapshot regen in separate PR aligns with fork.

No code changes. State.md only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lusoris added a commit that referenced this pull request May 3, 2026
…307)

* docs(state): record 2026-05-02 session bug-status changes (7 closes)

Per CLAUDE.md §12 r13, every PR that closes a bug, opens a bug, or
rules a Netflix upstream report not-affecting-the-fork updates
docs/state.md in the same PR. Today's session shipped 7 such PRs
without state.md updates (most were drafted in subagent-driven runs
where the bookkeeping slipped). This is the catch-up.

Recently closed (added):
- vmaf_tiny_v1.onnx external-data ref fix (PR #296)
- kernel_template SSBO cap 8->16 (PR #288 + named constant in #292)
- deliverables-check.sh backslash strip (PR #292)
- CI workflows draft-skip guard (PR #300)
- CLAUDE.md §12 r14 ffmpeg-patches gate fix (PR #297)
- ADR slug-drift cleanup (PR #304)
- 1.07e-3 CPU vmaf_v0.6.1 score drift bisect (PR #305) — confirmed
  inherited from upstream a44e5e6 motion edge-mirror fix; not a
  fork regression. Snapshot regen in separate PR aligns with fork.

No code changes. State.md only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: re-trigger after (6) opt-out fix

---------

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lusoris pushed a commit that referenced this pull request May 4, 2026
Per ADR-0165 / CLAUDE.md §12 r13. Bookkeeping refresh of
`docs/state.md` to close out the busy 2026-05-02/03 session:

- Header date bumped 2026-04-29 → 2026-05-03.
- Closed Issue #239 (FFmpeg `libvmaf_vulkan` wall-clock
  serialisation): row moved Open → Recently closed; cited PR #241
  / commit `e266bf8e` and ADR-0251 (renumbered from 0235 by PR
  #310 dedup sweep). Closure verified by the v2 async pending-fence
  ring's `v2 ≤ 0.7 × v1` measurement gate flipping ADR-0251 to
  Accepted.
- New Open-bugs row: `y4m_convert_411_422jpeg` heap-buffer-overflow
  on 4:1:1 with `dst_c_w == 1` (PR #348 fuzz). Reproducer parked
  at `libvmaf/test/fuzz/y4m_input_known_crashes/y4m_411_w2_h4_oob_dst.y4m`;
  fix follow-up PR TBD.
- Recently closed audited for stale drafts: six rows updated with
  merged commit SHAs (#288, #292, #296, #297, #300, #304, #305) and
  the kernel-template citation corrected to ADR-0246
  (post-dedup; ADR-0221 is now `changelog-adr-fragment-pattern.md`).
- Netflix#955 deferred row: last-checked stamp refreshed to
  2026-05-03; Netflix#1494 still `state=OPEN` per gh API.
- "Update protocol" untouched; no row removed below its closure
  threshold; "Confirmed not-affected" entries unchanged.

Six ADR-0108 deliverables:
1. Research digest — no digest needed: state-md bookkeeping.
2. Decision matrix — no alternatives: only-one-way fix per
   ADR-0165 / CLAUDE.md §12 r13.
3. AGENTS.md invariant note — no rebase-sensitive invariants.
4. Reproducer / smoke command — `mkdocs build --strict` + view
   the file; PR #348's harness reproduces the new Open bug.
5. CHANGELOG fragment — `changelog.d/changed/state-md-refresh-2026-05-03.md`.
6. Rebase note — no rebase impact: fork-local doc bookkeeping.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lusoris added a commit that referenced this pull request May 4, 2026
#352)

Per ADR-0165 / CLAUDE.md §12 r13. Bookkeeping refresh of
`docs/state.md` to close out the busy 2026-05-02/03 session:

- Header date bumped 2026-04-29 → 2026-05-03.
- Closed Issue #239 (FFmpeg `libvmaf_vulkan` wall-clock
  serialisation): row moved Open → Recently closed; cited PR #241
  / commit `e266bf8e` and ADR-0251 (renumbered from 0235 by PR
  #310 dedup sweep). Closure verified by the v2 async pending-fence
  ring's `v2 ≤ 0.7 × v1` measurement gate flipping ADR-0251 to
  Accepted.
- New Open-bugs row: `y4m_convert_411_422jpeg` heap-buffer-overflow
  on 4:1:1 with `dst_c_w == 1` (PR #348 fuzz). Reproducer parked
  at `libvmaf/test/fuzz/y4m_input_known_crashes/y4m_411_w2_h4_oob_dst.y4m`;
  fix follow-up PR TBD.
- Recently closed audited for stale drafts: six rows updated with
  merged commit SHAs (#288, #292, #296, #297, #300, #304, #305) and
  the kernel-template citation corrected to ADR-0246
  (post-dedup; ADR-0221 is now `changelog-adr-fragment-pattern.md`).
- Netflix#955 deferred row: last-checked stamp refreshed to
  2026-05-03; Netflix#1494 still `state=OPEN` per gh API.
- "Update protocol" untouched; no row removed below its closure
  threshold; "Confirmed not-affected" entries unchanged.

Six ADR-0108 deliverables:
1. Research digest — no digest needed: state-md bookkeeping.
2. Decision matrix — no alternatives: only-one-way fix per
   ADR-0165 / CLAUDE.md §12 r13.
3. AGENTS.md invariant note — no rebase-sensitive invariants.
4. Reproducer / smoke command — `mkdocs build --strict` + view
   the file; PR #348's harness reproduces the new Open bug.
5. CHANGELOG fragment — `changelog.d/changed/state-md-refresh-2026-05-03.md`.
6. Rebase note — no rebase impact: fork-local doc bookkeeping.

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants