Skip to content

Tests: give the readiness poll WSL launch stub a real environment dict - #19296

Merged
danielhanchen merged 1 commit into
mainfrom
ci/readiness-poll-wsl-env
Nov 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/readiness-poll-wsl-env

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

studio/backend/tests/test_managed_engine_readiness_poll.py fails on main (6 of 9 tests) and on every PR based on it, for example #19284 and #19285, which do not touch Studio:

>   child_env["WSL_UTF8"] = "1"
E   TypeError: 'NoneType' object does not support item assignment

Cause

Two PRs merged within an hour of each other, each green on its own base:

The code is right: the real _wsl_command always returns wsl_host.guest_command(...), whose second element is the wsl.exe environment dict, and test_managed_engine_logs.py already stubs it with dict(os.environ). The stub was the part that did not match the contract.

Fix

  • The stub returns dict(os.environ), the same shape the real launcher hands back.
  • The fixture sets UNSLOTH_STUDIO_HOME to tmp_path, since the vLLM start now opens a per-attempt log under the Studio home and the tests should not write into the real one.

No product code changes.

Verification

  • tests/test_managed_engine_readiness_poll.py: 9 passed (6 failed on main before the change).
  • Reverting only the stub's return value back to None brings back the same 6 failures.
  • test_managed_engine_logs.py, test_engine_ports.py and this file together: 50 passed; this file under -n 4, 3 repeats: 27 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 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-24T16:01:31.822982Z 7efcc13 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 7efcc139b6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit fb57c98 into main Nov 24, 2026
2 of 19 checks passed
@danielhanchen
danielhanchen deleted the ci/readiness-poll-wsl-env branch November 24, 2026 16:03
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.

1 participant