Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Python: [Bug]: native Windows --files paths skip changed-package tasks

Đang mở Phù hợp với người mới
#9,742 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@leilei3167 đang làm issue này rồi.

Từ ngày 27/10/2026.

  • #2 của @leilei3167 — đã đóng, không merge
  • #9769 của @leilei3167 — đang mở
  • #9775 của @ktz03 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Đọc python/scripts/run_tasks_in_changed_packages.py, tập trung vào get_changed_packages() và cách kết quả của hàm này điều khiển việc thực thi tác vụ. Dùng probe thư viện chuẩn đi kèm để so sánh các đường dẫn Windows tương đối với repository và các đường dẫn dùng dấu gạch chéo, sau đó kiểm tra cách xử lý hiện có đối với đường dẫn tương đối với workspace và đường dẫn tuyệt đối. Hoàn thành khi các cách viết đường dẫn tương đương chọn cùng một nhóm package và các trường hợp hiện có đã nêu vẫn hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs-maintainer-triage python triage
Observed Behavior

At main 1168c001dd228d6c7a623fd14f53e1f05b7b4540, python/scripts/run_tasks_in_changed_packages.py recognizes a repository-relative path with / but not the native Windows spelling with \. The complete get_changed_packages() function returns an empty set for python\packages\core\agent_framework\_types.py, while the same forward-slash path selects core. A native path to the redis package is also omitted.

The function strips only the text prefix python/, then joins the remaining path to workspace_root, which already ends in python. The native spelling therefore points under python/python. The calling script returns without running tasks when the set is empty. The package-routing result was reproduced directly; the task runner itself was not executed.

Expected Behavior

Repository-relative paths in the platform's native spelling should select the same package as equivalent forward-slash paths. Workspace-relative and absolute paths should keep their current behavior.

Steps to Reproduce
  1. Check out the above main commit on Windows.
  2. Run the standard-library-only probe below from the repository root.
  3. Observe that only the forward-slash path selects core; the native repo-relative path returns an empty set.
Minimal Reproduction
import ast
from pathlib import Path

source = Path("python/scripts/run_tasks_in_changed_packages.py")
tree = ast.parse(source.read_text(encoding="utf-8"))
function = next(n for n in tree.body if isinstance(n, ast.FunctionDef)
                and n.name == "get_changed_packages")
namespace = {"Path": Path}
exec(compile(ast.Module(body=[function], type_ignores=[]), str(source), "exec"), namespace)
workspace = Path("python").resolve()
projects = [Path("packages/core")]
for spelling in ["python/packages/core/agent_framework/_types.py",
                 str(Path("python/packages/core/agent_framework/_types.py"))]:
    print(repr(spelling), namespace["get_changed_packages"](projects, [spelling], workspace))

This executes the exact complete routing function with native pathlib and real path values. It avoids importing the task runner and does not stub Path or execute package commands.

Error Messages and Stack Traces

No exception: the native repo-relative case returns (set(), False).

Package Versions

Repository script at main 1168c001dd228d6c7a623fd14f53e1f05b7b4540; no installed agent-framework package used.

Python Version

CPython 3.12.14 AMD64

Operating System

Windows

Regression

Unknown

Additional Context

Six native routing cases were observed: repository-relative forward/native, workspace-relative forward/native, absolute core, and native repo-relative redis. Four passed; the latter native repo-relative core/redis cases did not. An isolated diagnostic variant using native Path components recognized all six. This is not a full CLI, SDK, build, type-checking or CI result. No repository branch, source change or PR has been submitted for this observation; maintainer direction is requested before proceeding with a production change.

AI Assistance

Codex assisted the report analysis and diagnostic code. The submitter is responsible for verifying this report.

Acknowledgements
  • I searched existing issues and did not find a duplicate.
  • I personally verified this behavior and the reproduction details are authentic.
  • I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.
Ngôn ngữ chính
Python
Star
14.3k
Fork
2.5k
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
382

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/agent-framework

Tất cả issue của microsoft/agent-framework

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.