Repository navigation
Python: Fix native Windows changed-package routing - #9947
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the cross-platform Python changed-package routing update.
No open issues 🎉
What changed in this PR
Fixes #9742 by making Python’s changed-package task routing recognize native Windows repository-relative paths while preserving POSIX literal-backslash filenames.
Changes:
- Uses native
Pathcomponents to strip the leadingpythondirectory. - Adds regression coverage for repository-relative, dot-prefixed, workspace-relative, absolute, UNC, and POSIX literal-backslash paths.
- Runs the routing tests in the existing Linux/Windows CI matrix.
| File | Description |
|---|---|
python/scripts/tests/test_run_tasks_in_changed_packages.py |
Adds cross-platform path-routing regression tests. |
python/scripts/run_tasks_in_changed_packages.py |
Replaces textual prefix stripping with native path-component handling. |
.github/workflows/python-tests.yml |
Adds the focused routing tests to CI. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): fc70bc09dfba
Model: gpt-5.6-sol
Overview
The change replaces string-prefix handling with native Path component parsing, preserving POSIX literal backslashes while correctly routing native Windows and dot-prefixed repository paths. Focused cross-platform tests cover repository-relative, workspace-relative, absolute, UNC, and literal-backslash cases, and the dedicated workflow step runs them on both Linux and Windows. No supported Critical, High, or Medium defect remains after reconciling path semantics, callers, test coverage, workflow setup, and security boundaries.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Motivation & Context
Repository-relative paths passed to
--filesuse backslashes on native Windows. The script only strips the forward-slashpython/prefix, so native paths can resolve belowpython/pythonand silently skip package tasks. This change routes native Windows paths without treating backslashes as separators on POSIX.Description & Review Guide
Pathimplementation, strip a leadingpythonpath component, add focused path-routing regressions, and run those tests in the existing Linux/Windows matrix.Related Issue
Fixes #9742
This is the maintainer-owned follow-up after the competing #9769, #9775, and #9905 implementations were closed. No competing pull request remains open.
AI Assistance
AI assistance details: GitHub Copilot assisted with investigation, implementation, tests, validation, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.