Fix version range overlap bounds #215
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.46) × (1 − Review Confidence (0.86)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 415 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.87 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Real PR Conversation Timeline
4 items
I removed this file because I felt like with the additional functions, it could be named better. Since it never had public exports ,by convention I don't think it would be a breaking change.
Approved
@Darshan808 I co-wrote a2621ac, so the part I checked on its own is 2708223 and 495859d. The move to version_ranges keeps every case below, and the #195 file: handling came over with its test (version_ranges.py:92, test_version_ranges.py:7). Nothing I found blocks it.
# exported trees of base 2721be1 and head 495859d, Python 3.12, jupyter_builder imported from each tree
$ python probe.py # base: commands._test_overlap(a, b, drop_prerelease1=True)
~4.2.0 | 4.0.0 - 4.2.0 -> False
1.0.0 - 1.5.0 | 1.5.0 -> False
>1.0.0 | 1.0.0 -> True
2.0.0 | ^1.4.0 -> True
$ python probe.py # head: version_ranges.ranges_overlap
~4.2.0 | 4.0.0 - 4.2.0 -> True
1.0.0 - 1.5.0 | 1.5.0 -> True
>1.0.0 | 1.0.0 -> False
2.0.0 | ^1.4.0 -> False
$ pytest tests/test_version_ranges.py # imports pointed at base commands.py
4 failed, 4 passed
$ pytest tests/test_version_ranges.py # head, includes the #195 file: case
8 passed, 1 warning in 0.24s
$ mypy jupyter_builder # mypy 2.4.1, head
Success: no issues found in 17 source files
Once #20613 points at version_ranges, I can run the same probe against it if that helps.
Approved
Thank you @Darshan808!
chrikrah
Darshan808
Fixes the overlap logic in
_test_overlap/_compare_rangesand makes them public, so jupyterlab can import them from here (jupyterlab/jupyterlab#20609)._compare_ranges/_test_overlapfromjupyter_builder.commandsto publiccompare_ranges/ranges_overlapinjupyter_builder.version_ranges, since jupyterlab imports them (jupyterlab/jupyterlab#20613).