compare_scan_accuracy: editable-dependency file:// URL resolves to "C:\C:\..." on Windows
Los mantenedores suelen responder en 4 días
@mohgupta-ship-it ya está trabajando en esto.
Desde el 6/9/2026.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 90/100
Línea de trabajo
Comienza en scripts/compare_scan_accuracy.py en _RUNTIME_IDENTITY_PROBE e inspecciona cómo se convierte la ruta file:// analizada antes de resolve(strict=True). Ejecuta en Windows tests/unit/test_compare_scan_accuracy.py::test_runtime_probe_hashes_installed_and_editable_dependency_bytes; se considera terminado cuando el test de la dependencia editable pasa sin el error de la letra de unidad duplicada y las comprobaciones de ruff siguen limpias.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The runtime identity probe in scripts/compare_scan_accuracy.py converts an editable dependency's direct_url.json file:// URL to a local path with Path(urllib.parse.unquote(parsed.path)). On Windows that produces a doubled drive letter and the subsequent resolve(strict=True) raises.
Where
scripts/compare_scan_accuracy.py, inside _RUNTIME_IDENTITY_PROBE:
editable_root = Path(urllib.parse.unquote(parsed.path)).resolve(strict=True)
Why it breaks
A Windows file:// URL is file:///C:/Users/.../pkg, so urlsplit(...).path is /C:/Users/.../pkg — with a leading slash. Path() reads that slash as a root, so the result is C:\C:\Users\...\pkg:
>>> from urllib.parse import urlsplit, unquote
>>> from pathlib import Path
>>> Path(unquote(urlsplit("file:///C:/Users/me/pkg").path))
WindowsPath('/C:/Users/me/pkg') # -> resolves against the cwd drive as C:\C:\Users\me\pkg
resolve(strict=True) then raises:
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect:
'C:\C:\Users\...\editable-dependency'
On POSIX the two are identical (/tmp/pkg either way), which is why CI does not see it.
Reproduction
On Windows, with the repo installed as an editable dependency:
uv run pytest tests/unit/test_compare_scan_accuracy.py::test_runtime_probe_hashes_installed_and_editable_dependency_bytes
Fails with the WinError 123 above. This is your existing test, unmodified — it already covers the bug, it just never runs on a Windows host in CI.
Suggested fix
urllib.request.url2pathname is the stdlib function for this conversion and is correct on both platforms:
editable_root = Path(urllib.request.url2pathname(parsed.path)).resolve(strict=True)
Verified on Windows 11 / Python 3.13: the test above goes from failing to passing with that one-line change, and ruff check / ruff format --check stay clean. Happy to open a PR.
Environment
- Windows 11, native (not WSL)
- Python 3.13.14, uv 0.12.8
- SkillSpector 2.11.0 (
7805bb9)
- Lenguaje dominante
- Python
- Estrellas
- 23.2k
- Forks
- 2k
- Merge medio
- 5 d 9 h
- PR fusionados (30 d)
- 121
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/SkillSpector
-
TM1 flags the HTTP verb DELETE in REST route tables despite the pattern comment saying it avoids themPosiblemente ocupada @JohnnyWilson16 la tomó hace 5 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA/SkillSpector#832 ·
Los mantenedores suelen responder en 4 días
-
RP1 `npx` pattern matches across line breaks, so a line ending in "npx" plus the next word becomes a commandPosiblemente ocupada @agentsope la tomó hace 32 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NVIDIA/SkillSpector#639 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Quoted version metadata creates a false missing-file reference and changes score 0 from SAFE to CAUTIONPosiblemente ocupada @goodhee la tomó hace 48 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NVIDIA/SkillSpector#524 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
E2 shell arm matches one `env | grep` spelling: a second grep flag, quotes, or egrep all evade "Env Variable Harvesting"Posiblemente ocupada @MandoCodes1 la tomó hace 54 días. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 78/100
NVIDIA/SkillSpector#482 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
NVIDIA/SkillSpector#444 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
Todos los issues de NVIDIA/SkillSpector
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 4 días
-
Add alembic upgrade predeployAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ClockGU/clockwork-backend#169 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aws-samples/sample-per-model-bedrock#616 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
chnm/teachinghistory-hugo#47 ·
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
pandas-dev/pandas-stubs#2047 · 2 comentarios ·
Los mantenedores suelen responder en 1 día