Repository navigation
test: isolate Translation close worker startup failure - #4348
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Approved. The failure injection is now confined to Translation’s module binding, and the real-thread regression check would catch the previous global patch. The test retains the original startup exception, closed-input behavior, repeated-close coverage, and exactly-once transport cleanup assertions. Reviewed the full test context and production close lifecycle; independent static review found no actionable issues.
Hosted CI completed for this commit: 17 successful checks and 9 skipped; no failures or pending checks. No candidate code or local tests were run.
The Translation close-worker failure test still patched the shared
threading.Thread.start, so any unrelated thread started during failure injection received the test exception. Replace only the Translation module'sthreadingbinding with a wrapping mock and give its worker a failingstart.The test now starts and joins an unrelated real thread while injection is active. Existing assertions retain exception identity, exactly-once transport cleanup, closed input, and repeated close coverage. No SDK runtime or dependency changes.
Fixes SDK-1276.
Validation on Python 3.14.7:
-n autoconfiguration (16 workers).unrelated.start().git diff --checkpass.uv sync --frozen --all-extras --python 3.14;--lockedreported that the unchanged lockfile needs updating. No dependency files changed.