Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#9,742 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@leilei3167 ci sta già lavorando.

Dal 27/10/2026.

  • #9769 di @leilei3167 — aperta
  • #9775 di @ktz03 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
build-system, cli

Direzione di ricerca

Leggi python/scripts/run_tasks_in_changed_packages.py, concentrandoti su get_changed_packages() e su come il suo risultato controlla l’esecuzione delle attività. Usa la sonda inclusa della libreria standard per confrontare i percorsi Windows relativi al repository con quelli che usano le barre oblique, quindi verifica la gestione esistente dei percorsi relativi allo spazio di lavoro e dei percorsi assoluti. Il lavoro è terminato quando le grafie equivalenti dei percorsi selezionano gli stessi pacchetti e i casi esistenti indicati continuano a funzionare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Python
Stelle
14.3k
Fork
2.5k
Merge medio
2g 15h
PR unite (30g)
370

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/agent-framework

Tutte le issue di microsoft/agent-framework

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.