Skip to content

CI runs no jobs on a pull request whose base is not main, so every stacked PR is unverified at review time #512

Closed

Description

@scttfrdmn

.github/workflows/ci.yml filters its pull_request trigger to a single base branch:

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

A pull request whose base is anything else therefore runs none of ci.yml's jobs — not test,
not lint, not coverage, not Security Scan, not one of the twelve build-tags/cross-build
cells. Nothing fails; the checks simply never exist.

How it showed up

#511 is stacked on #509's branch (feat/seekable-zstd-frame-format) so that its diff shows only
stage 2 of #185. gh pr checks 511 returns exactly one row:

dependabot	skipping	0

dependabot has no base filter, so it is the only workflow that reports. The PR looks like it has
a green check set because the one check it has is not red.

Why this is not self-correcting

The gap closes only at the moment it stops mattering. When #509 merges, GitHub retargets #511 to
main and CI finally runs — after review has already happened against zero signal. Branch
protection on main still holds, so nothing unverified reaches main; what is lost is the entire
review-time gate on every stacked PR, which is the point at which a defect is cheap to fix.

This is the same shape as #508 and as the v0.14.0 drift recorded in ci.yml's own header comment: a
gate that enumerates the cases someone thought of. branches: [main] names the base that existed
when the filter was written.

Fix

Drop the branches filter from pull_request so CI runs on every pull request regardless of base:

on:
  push:
    branches: [main]
  pull_request:

push keeps its filter — that one is about not double-running on feature-branch pushes, and it is
correct as written.

This does not touch branch protection and does not rename any check. For push and
pull_request events ci.yml is still the top-level workflow, so every required context reports
under its existing name; the four things ci.yml's header warns about are all about workflow_call
and extraction, none of which changes here. The cost is CI minutes on stacked PRs, which is the
thing being bought.

Worth checking the other workflows for the same filter while in there — dependabot was the only
one that ran, which suggests it is the only one without a base filter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdpriority: mediumtype: ci-cd

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions