-
Notifications
You must be signed in to change notification settings - Fork 1k
[Merged by Bors] - fix(CI): prevent empty grep pattern from matching all lean-pr-testing branches #33546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… branches When no PRs are found between old and new nightlies, the `prs.txt` file is empty. An empty pattern file causes `grep -f prs.txt` to match ALL lines, which incorrectly selects every `lean-pr-testing-*` branch for merging. This caused a catastrophic failure on 2026-01-04 where the workflow attempted to merge 600+ old adaptation branches into nightly-testing, breaking the build. The fix checks if PRS is empty and exits early, setting branches_exist=false. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR summary 6f1904fdccImport changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diffNo declarations were harmed in the making of this PR! 🐙 You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
Reverts the following branches that were incorrectly merged due to a bug in discover-lean-pr-testing.yml where an empty prs.txt caused grep to match ALL lean-pr-testing branches: - lean-pr-testing-2714 (from Oct 2023!) - lean-pr-testing-11455 - lean-pr-testing-11163 - lean-pr-testing-10231 - lean-pr-testing-10178 - lean-pr-testing-10059 These PRs are not in nightly-2026-01-04, so their adaptations should not be merged. The bug fix is in: leanprover-community#33546 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
adomani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable: let's see how it works!
bors merge
… branches (#33546) When no PRs are found between old and new nightlies, the `prs.txt` file is empty. An empty pattern file causes `grep -f prs.txt` to match ALL lines, which incorrectly selects every `lean-pr-testing-*` branch for merging. This caused a catastrophic failure on 2026-01-04 where the workflow attempted to merge 600+ old adaptation branches into nightly-testing, including branches for PRs that aren't even in the nightly (like lean-pr-testing-10387 from September 2025, and lean-pr-testing-2714 from October 2023!). The fix checks if PRS is empty and exits early, setting `branches_exist=false`. See workflow run: https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/20690417192 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Pull request successfully merged into master. Build succeeded: |
… branches (leanprover-community#33546) When no PRs are found between old and new nightlies, the `prs.txt` file is empty. An empty pattern file causes `grep -f prs.txt` to match ALL lines, which incorrectly selects every `lean-pr-testing-*` branch for merging. This caused a catastrophic failure on 2026-01-04 where the workflow attempted to merge 600+ old adaptation branches into nightly-testing, including branches for PRs that aren't even in the nightly (like lean-pr-testing-10387 from September 2025, and lean-pr-testing-2714 from October 2023!). The fix checks if PRS is empty and exits early, setting `branches_exist=false`. See workflow run: https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/20690417192 🤖 Generated with [Claude Code](https://claude.com/claude-code)
… branches (leanprover-community#33546) When no PRs are found between old and new nightlies, the `prs.txt` file is empty. An empty pattern file causes `grep -f prs.txt` to match ALL lines, which incorrectly selects every `lean-pr-testing-*` branch for merging. This caused a catastrophic failure on 2026-01-04 where the workflow attempted to merge 600+ old adaptation branches into nightly-testing, including branches for PRs that aren't even in the nightly (like lean-pr-testing-10387 from September 2025, and lean-pr-testing-2714 from October 2023!). The fix checks if PRS is empty and exits early, setting `branches_exist=false`. See workflow run: https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/20690417192 🤖 Generated with [Claude Code](https://claude.com/claude-code)
When no PRs are found between old and new nightlies, the
prs.txtfile is empty. An empty pattern file causesgrep -f prs.txtto match ALL lines, which incorrectly selects everylean-pr-testing-*branch for merging.This caused a catastrophic failure on 2026-01-04 where the workflow attempted to merge 600+ old adaptation branches into nightly-testing, including branches for PRs that aren't even in the nightly (like lean-pr-testing-10387 from September 2025, and lean-pr-testing-2714 from October 2023!).
The fix checks if PRS is empty and exits early, setting
branches_exist=false.See workflow run: https://github.com/leanprover-community/mathlib4-nightly-testing/actions/runs/20690417192
🤖 Generated with Claude Code