Skip to content

fix(ci): run the path filter only on pull_request events - #706

Merged
norrietaylor merged 1 commit into
mainfrom
ci/fix-changes-on-push
Jul 10, 2026
Merged

fix(ci): run the path filter only on pull_request events#706
norrietaylor merged 1 commit into
mainfrom
ci/fix-changes-on-push

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Jul 10, 2026

Copy link
Copy Markdown
Member

What / Why

The changes jobs in the native and KVM lanes failed on every push to main since the lanes landed (three commits: #702's merge, #686, #703's merge), reddening the advisory lane aggregators while every PR run stayed green.

Mechanism: on a push event, dorny/paths-filter diffs locally against event.before. Our checkouts are shallow (depth 1) — the before-commit isn't a valid object — and persist-credentials: false means its fetch fallback dies with could not read Username, so the step exits 128:

fatal: Not a valid object name 96548e29…^{commit}
fatal: could not read Username for 'https://github.com'

On pull_request events dorny reads the file list via the API, which is why the bug stayed invisible until main pushes started mattering.

Fix

  • The filter step runs only on pull_request.
  • Downstream conditions become github.event_name != 'pull_request' || <filter matched>: pushes to main and manual dispatches run everything.

That's the semantics main wants anyway: main runs are what write the main-only caches (#703's save-if discipline) and provide the soak signal (#687) — path economy is only meaningful on PRs.

Notes

  • ci: cache discipline, slim CI debug info, and a --locked sweep #703's cache-priming on main was partial (native/KVM lanes died at changes before building) — this PR's merge push completes it, since post-fix main pushes run all lanes.
  • The upcoming trigger-flip PR applies the identical pattern to the three changes jobs it introduces (ci.yml, ci-macos, ci-shell-installer).

Verification

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated Linux CI workflows to reliably run native and KVM builds and tests on pushes and manually triggered runs.
    • Pull requests continue to run only when relevant Linux-related files change, reducing unnecessary checks while preserving coverage for affected changes.

The changes jobs failed on every push to main since the lanes landed:
dorny/paths-filter on a push event diffs locally against event.before,
which our shallow (depth-1), credential-free (persist-credentials:
false) checkout can neither resolve nor fetch - so the step exits 128
and the lane aggregators go red on main. On pull_request events dorny
reads the file list via the API, which is why every PR run was green
while main rotted silently (the lanes are still advisory).

Gate the filter step to pull_request and flip the downstream conditions
to 'not pull_request OR filter matched': pushes to main and manual
dispatches now run everything, which is what main wants anyway - main
runs write the main-only caches (#703) and provide the soak signal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7ccadd0-7eac-44bd-8af2-dd159d49a2c4

📥 Commits

Reviewing files that changed from the base of the PR and between 20a9859 and d44ab80.

📒 Files selected for processing (2)
  • .github/workflows/ci-linux-kvm.yml
  • .github/workflows/ci-linux-native.yml

📝 Walkthrough

Walkthrough

The Linux native and KVM workflows now run their build and test lanes for all non-pull_request events, while retaining path-based gating for pull requests.

Changes

Linux CI event gating

Layer / File(s) Summary
Pull-request change detection
.github/workflows/ci-linux-kvm.yml, .github/workflows/ci-linux-native.yml
The paths-filter steps now run only for pull_request events.
Non-pull-request lane execution
.github/workflows/ci-linux-kvm.yml, .github/workflows/ci-linux-native.yml
Build, test, and native daemon E2E jobs run for non-pull_request events and remain conditional on relevant path changes for pull requests.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: twitchyliquid64

Poem

A rabbit checks the CI lane,
Pull requests filter paths again.
Pushes hop through every test,
KVM and native do their best.
“Run,” says Bun, “and pass the gate!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main CI change: limit path filtering to pull_request events.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor enabled auto-merge (squash) July 10, 2026 17:53
@norrietaylor
norrietaylor merged commit bef22f6 into main Jul 10, 2026
15 checks passed
@norrietaylor
norrietaylor deleted the ci/fix-changes-on-push branch July 10, 2026 18:20
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