compare_scan_accuracy: editable-dependency file:// URL resolves to "C:\C:\..." on Windows
メンテナーはふだん 4 日以内に返信
@mohgupta-ship-it がすでに取り組んでいます。
2026年9月6日 から。
評価
調査の方向性
scripts/compare_scan_accuracy.py の _RUNTIME_IDENTITY_PROBE から始め、解析された file:// パスが resolve(strict=True) の前にどのように変換されるかを確認します。Windows で tests/unit/test_compare_scan_accuracy.py::test_runtime_probe_hashes_installed_and_editable_dependency_bytes を実行します。editable 依存関係のテストがドライブ文字の二重化エラーなしで通り、ruff のチェックも引き続きクリーンであれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- Python
- スター
- 20.2k
- フォーク
- 1.8k
- 平均マージ
- 4日 14時間
- マージ済み PR(30日)
- 120
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/SkillSpector のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NVIDIA/SkillSpector#885 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA/SkillSpector#832 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/SkillSpector#821 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
RP1 `npx` pattern matches across line breaks, so a line ending in "npx" plus the next word becomes a command対応中かも @agentsope が 24 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
NVIDIA/SkillSpector#639 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
Quoted version metadata creates a false missing-file reference and changes score 0 from SAFE to CAUTION対応中かも @goodhee が 40 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/SkillSpector#524 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
NVIDIA/SkillSpector の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ansys/pyansys-common-mcp#213 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
freedomofpress/dangerzone#1594 ·
メンテナーはふだん 3 日以内に返信
-
priority:P1 status:in-review type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
randomparity/kdive#3317 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:ci
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mesonbuild/meson#16281 ·
メンテナーはふだん 1 日以内に返信