From 7476b75a739ef754056c2af3ce2dd45dae91e9e4 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Thu, 2 Jul 2026 19:41:25 +0500 Subject: [PATCH] docs(registry): recommend is_under_cwd over resolve()+relative_to() in resolve_dataset docstring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Last holdout of the recurring Path.resolve()+relative_to() containment class — an advisory docstring (no behaviour change) that still recommended the Windows-broken idiom. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/soup_cli/utils/registry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/soup_cli/utils/registry.py b/src/soup_cli/utils/registry.py index 7f9841f..5dc45b4 100644 --- a/src/soup_cli/utils/registry.py +++ b/src/soup_cli/utils/registry.py @@ -86,8 +86,10 @@ def resolve_dataset( ) -> Optional[dict]: """Resolve a dataset name to its entry (path + format). None if not found. - Callers must apply resolve + relative_to(cwd) before trusting the path. - The returned path is validated for null bytes. + Callers must apply ``utils.paths.is_under_cwd`` (realpath + commonpath) + before trusting the path — NOT ``Path.resolve()+relative_to()``, which + breaks on Windows 8.3 short names. The returned path is validated for null + bytes here. """ registry = load_registry(registry_path) entry = registry.get(name)