Repository navigation
ci: route only the pull request's own files that main's changes reach - #14992
teamleaderleo wants to merge 1 commit into
Conversation
The delta since the last green head (#14659) routed diff(H1, merge), which is everything main gained since the pull request last synced. Main's own runs judge those files; charging them to the pull request failed #14961 and #14960 on main's UI test edits, and #14987 only skipped the delta when it got large. What a run after "merge main" still has to answer is whether the pull request's code works against new main. So the delta step now routes the pull request's own files (diff(merge^1, merge)) whose CI areas, from detect_ci_change_areas.py and its package closures, meet the areas of main's changes since H1, plus what H1's run never saw: the resolution commit, a merge's edits to both sides, and a merge that kept the pull request's side of a main-only file. A file only main changed never routes. With nothing to route the app still compiles when the pull request has app code. Areas the router cannot tell keep the whole diff. That subsumes #14987's size and cmuxUITests/ rules, so they go. ci.yml keeps diffing against the merge's base and limits the file list and the changed-line diffs to the delta's files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 13 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
|
CI failure attributionCI failed on
Not re-run automatically: Written by |
|
Closing: replaying #14961 shows the area-intersected delta routes the same 15 files as the plain PR diff (main's scripts/ci and .github/actions edits count as every area), while adding a 90-170 s classification step to every post-merge push. #14987's simpler skip rules already stop main's files from being charged to the PR, so this doesn't earn its complexity. |
Summary
Follow-up to #14987. After "merge main" into a green head, the delta step (#14659) routed
diff(H1, merge): everything main gained since the pull request last synced. Main's own runs judge those files. Charging them to the pull request failed #14961 and #14960 on main'scmuxUITests/edits. #14987 only skipped the delta when it got large.After a merge of main, the question left for this run is whether the pull request's code works against new main.
scripts/ci/delta_since_green.pynow routes:diff(merge^1, merge)) whose CI areas meet the areas of main's changes since H1. Areas come fromdetect_ci_change_areas.py, loaded from the checkout. That copy is the base's, because a pull request that editsscripts/ci/keeps its whole diff. Its areas already include the macOS and CLI package closures.It never routes a file that only main changed:
macos=true, all else off) when the pull request has app code.That covers #14987's size rule and its
cmuxUITests/rule, so both are removed.ci.yml's detect step keeps diffing againstmerge^1. It limits the changed-file list and the-U0diffs forcmuxTests/and app code to the delta's files. The delta step now outputsfilesandcompile_macosinstead ofbase_sha. Its timeout goes from 3 to 5 minutes, because it now classifies main's changes, as the detector used to. A timeout routes the whole diff.Does it save work in the common case?
Mostly not yet, but it no longer overcounts. Replaying #14961 (green head
ff7939d5f7, mergeef8c94c28f) routes 15 of its 15 files. Before this PR, the delta routed 40 files, 25 of them main's. Main's 40 files includescripts/ci/and.github/actions/edits, which force every area. After a day of main that is typical, so the intersection keeps nearly the whole pull request diff. The saving shows up when main's changes since H1 stay out of the pull request's areas: web-only against app-only, docs, or a merge of a small slice of main. A follow-up could stop main's CI-policy edits from counting as every area here, since those are judged by main's runs too.Testing
python3 -m unittest tests/test_ci_delta_since_green.py: 34 tests pass. New cases:detector_classifierreads real areas from this repository, and returns None without a routertests/test_ci_change_areas.pygets three detect-step cases, run against the step script:Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Changes the delta CI step so it routes only the pull request’s own files whose CI areas intersect the areas main changed since the last green head, instead of routing everything main gained. Main’s files are no longer charged to the pull request, fixing the failures caused by main’s
cmuxUITests/edits and removing the size and UI-test skip rules from #14987.Routing details
ci.ymlnow diffs against the merge base and limits the changed-file list and changed-line diffs to the delta’s files; the delta step outputsfilesandcompile_macosinstead ofbase_sha.Written for commit 9da3039. Summary will update on new commits.