Skip to content

fix(tests): the uv stand-in is a uv.cmd on Windows so PATH lookup reaches it (#692) - #956

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/692-installer-rerun-fixture
Nov 10, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/692-installer-rerun-fixture

Conversation

@cdeust

@cdeust cdeust commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Summary

Sous Windows, le stand-in uv des tests d'installeur était un script sans extension. shutil.which("uv") ne retient que les noms de PATHEXT, et CreateProcess ne sait pas lancer un script sans extension (WinError 193). Le lanceur prenait donc le vrai uv du runner et installait le vrai uv.lock dans le répertoire deps du test, si bien que les paquets sondes (probeyaml, probens) n'apparaissaient jamais. Le log du run 38008915302 (job 114084097957) le montre : {'bin', 'probens', 'probeyaml'} <= {'FlashRank-0…', '_yaml', …}. Sous Windows, le stand-in devient un uv.cmd qui lance le même script avec sys.executable. Le comportement POSIX ne change pas, et aucun code de production n'est touché.

Tranche classe 9 « installer rerun » de l'issue (6 erreurs de setup dans test_installer_rerun_keeps_entries, plus test_fake_uv_pip_filename en WinError 193).

Refs #692

Type of change

  • Bug fix (non-breaking change which fixes an issue) : un défaut de test, pas du produit

Test plan

  • pytest tests_py/scripts/ --ignore tests_py/scripts/test_mutation_isolation.py (Linux) : 1922 passed, 15 skipped, 6 failed. Les 6 échecs viennent de test_ci_mutation_scope.py et échouent à l'identique sans ce diff : mutmut n'est pas installé dans l'environnement de l'autopilot. test_mutation_isolation.py n'est pas collecté, pour la même raison.
  • Nouveau test_fake_uv_resolution.py : shutil.which("uv", path=…) doit résoudre vers le stand-in sur la plateforme courante. Sous Windows, c'est précisément l'assertion qui échouait avant le correctif. La variante windows=True vérifie aussi le contenu exact du uv.cmd (en CRLF) et que le script répond uv <UV_VERSION>.
  • Mutation : retirer le wrapper uv.cmd fait échouer test_windows_stand_in_runs_the_script_with_this_interpreter.
  • ruff check et ruff format --check (0.17.3) passent sur les 3 fichiers touchés. Sur main, ruff check du dépôt entier signale déjà 8 E501 dans d'autres fichiers, sans rapport avec ce diff.
  • python scripts/check_craftsmanship.py : OK.

Audit notes

  • Non vérifié : aucun run Windows. Ni la résolution de uv.cmd par shutil.which ni son exécution par CreateProcess n'ont été observées sous Windows. Il faudra les confirmer par la prochaine mesure Windows de Windows: full-suite debt of 194 failing tests (measured 2026-10-10), fix order by root cause #692.
  • Hors périmètre : les échecs test_installer_upgrade_single_version de type « Windows Subsystem for Linux has no installed distributions » (bash résolu vers WSL) relèvent d'une autre cause.

Reviewer checklist

  • CHANGELOG.md mis à jour (Unreleased › Fixed).
  • Pas de secrets ni de PII dans le diff.

Generated by Claude Code

…ches it (#692)

On Windows shutil.which matches only PATHEXT names and CreateProcess
cannot run an extensionless script, so the installer tests ran the
runner's real uv on the real uv.lock: 6 setup errors in
test_installer_rerun_keeps_entries and WinError 193 in
test_fake_uv_pip_filename (run 38008915302, job 114084097957).

Refs #692

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018kyZYtdo2dSatDGTjdztJQ
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T23:34:24.654784Z ed03acf PR opened
🔒 Security Review ✅ Completed 2026-11-09T23:36:03.024937Z ed03acf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Claude finished @cdeust's task in 2m 13s —— View job


Review 1 of 3: PR #956

No Blockers. The review lists three Notes that need no action before merge. Nothing was run on Windows.

Verdict: approve

@claude

claude Bot commented Nov 9, 2026

Copy link
Copy Markdown

Review 1 of 3: PR #956 (commit ed03acf)

All five reviews ran: code quality, performance, test coverage, documentation accuracy and security. None of them found a Blocker.

Checked: scripts/launcher_uv.py:159 (located()) uses shutil.which("uv"). On Windows that now finds uv.cmd, which is in the default PATHEXT, and not uv-stand-in.py. _version_of() reads the second word of uv <UV_VERSION> (cortex test stand-in), and the @ in the wrapper keeps cmd from echoing the command into that output. Neither consumer (test_installer_rerun_keeps_entries.py:89/113, test_installer_upgrade_single_version.py:128/173) builds directory / "uv" itself; both go through install() / path_with(). All files and methods are within the craftsmanship limits, and the docstrings and CHANGELOG entry match the code.

Notes, no action before merge

  • Nothing here was observed on Windows, as the PR's audit notes say. Confirm with the next Windows: full-suite debt of 194 failing tests (measured 2026-10-10), fix order by root cause #692 Windows run.
  • test_fake_uv_resolution.py:20 only catches the regression on Windows. On Linux it takes the uv branch, and the windows=True test covers the wrapper's contents.
  • Not caused by this PR: test_installer_upgrade_single_version.py:164 gives the bash step only PATH/HOME, so on Windows SYSTEMROOT is missing. Look there first if that test still fails on Windows.

View job run

Verdict: approve

@github-actions
github-actions Bot merged commit fc13eb1 into main Nov 10, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants