Skip to content

ci: run the full CI when change detection cannot diff against the base - #24027

Closed
einar-oplabs wants to merge 1 commit into
developfrom
einar/ci-change-detection-fail-safe
Closed

einar-oplabs wants to merge 1 commit into
developfrom
einar/ci-change-detection-fail-safe

Conversation

@einar-oplabs

@einar-oplabs einar-oplabs commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

When the base diff failed (e.g. a deleted base branch), change detection used only the last commit's files, so a PR whose last commit touched only docs/ skipped CI and still passed all four required gates.

What

  • On a failed git diff origin/<target>...HEAD, collect-params.sh logs a warning and treats every path as changed, so the full CI runs. The HEAD~1 / empty fallback is removed.
  • Pipelines whose base diff succeeds are unaffected, including develop (empty diff).
  • New test-collect-params.sh (6 scenarios) runs in the setup job. Against develop with the base ref missing, it gets only_docs_changes=true and rust_changes_detected=false.

Notes

  • Full CI was chosen over failing the setup job: a PR with a missing base still gets tested and reports its checks.
  • circleci config validate was not run locally (no CLI token); this PR's setup pipeline runs the new step.

Breakdown

Area Added Removed Net
Implementation 17 7 10
Tests 128 0 128
Docs 0 0 0

🤖 Generated with Claude Code

@einar-oplabs einar-oplabs self-assigned this Nov 10, 2026
@einar-oplabs
einar-oplabs marked this pull request as ready for review November 13, 2026 13:37
@einar-oplabs
einar-oplabs requested a review from a team as a code owner November 13, 2026 13:37
collect-params.sh hid a failed diff against origin/<target> and fell back
to the last commit's files, or to no files at all. Path gating then skipped
the jobs for any change it did not see and passed their required gates: a
PR whose last commit only touched docs/ took the docs-only fast path.

A failed base diff now logs a warning and treats every path as changed, so
every "any" pattern matches and no "all" fast path applies. The new
test-collect-params.sh runs detection against a throwaway repo and the real
routing.yml, and runs in the setup job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@einar-oplabs
einar-oplabs force-pushed the einar/ci-change-detection-fail-safe branch from e1e23db to 7d44ad9 Compare November 13, 2026 13:41
@joshklop joshklop closed this Nov 21, 2026
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