Skip to content

test: isolate Translation close worker startup failure - #4348

Merged
dpiet-oai merged 1 commit into
mainfrom
dp/sdk-1276-isolate-close-worker
Nov 30, 2026
Merged

dpiet-oai merged 1 commit into
mainfrom
dp/sdk-1276-isolate-close-worker

Conversation

@dpiet-oai

@dpiet-oai dpiet-oai commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

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's threading binding with a wrapping mock and give its worker a failing start.

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:

  • All 51 Translation tests pass with the repository's default -n auto configuration (16 workers).
  • Ten repeated parallel close-suite runs pass: 100 test cases with two workers.
  • Reintroducing the global patch makes the new regression check fail at unrelated.start().
  • Focused Ruff lint/format, ty, and git diff --check pass.
  • Dependencies installed from the committed lock with uv sync --frozen --all-extras --python 3.14; --locked reported that the unchanged lockfile needs updating. No dependency files changed.

@dpiet-oai
dpiet-oai requested a review from a team as a code owner November 30, 2026 15:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 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-30T15:33:45.478150Z 2de2732 PR opened
🔒 Security Review ✅ Completed 2026-11-30T15:34:18.174196Z 2de2732 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.

@jbeckwith-oai jbeckwith-oai left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dpiet-oai
dpiet-oai added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 782f5c7 Nov 30, 2026
26 checks passed
@dpiet-oai
dpiet-oai deleted the dp/sdk-1276-isolate-close-worker branch November 30, 2026 15:45
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.

3 participants