Repository navigation
[SDK Sentinel] Stabilize OpenAI tracing span assertions - #1870
Closed
sdk-sentinel-bot wants to merge 1 commit into
Closed
sdk-sentinel-bot wants to merge 1 commit into
sdk-sentinel-bot wants to merge 1 commit into
Conversation
brianstrauch
requested changes
Sep 16, 2026
brianstrauch
left a comment
Member
There was a problem hiding this comment.
We're in the process of migrating this package to https://github.com/temporalio/ai-integrations. I'll accept these changes over there once the migration is complete.
brianstrauch
pushed a commit
to temporalio/ai-integrations
that referenced
this pull request
Sep 17, 2026
Port the validated test stabilization from temporalio/sdk-python#1870 to the standalone OpenAI Agents integration.
brianstrauch
added a commit
to temporalio/ai-integrations
that referenced
this pull request
Sep 17, 2026
Port the validated test stabilization from temporalio/sdk-python#1870 to the standalone OpenAI Agents integration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
This PR contains untrusted AI-generated code. Do not approve or run CI until a maintainer has reviewed the diff. SDK Sentinel verified that GitHub Actions remained approval-gated with zero executable jobs when this PR was opened.
Summary
Stabilize the OpenAI Agents tracing integration test after a main Python 3.14 failure. A [preceding equivalent suite](https://github.com/temporalio/sdk-python/actions/runs/34913775343/job/104206831444) passed the test, while the [first captured failure](https://github.com/temporalio/sdk-python/actions/runs/35031772047/job/104591666764) observed two span-start callbacks where an adjacent start/end pair was expected.
Root cause
Workflow execution may begin before the client start-workflow RPC span finishes. The test paired callbacks by list position, so valid asynchronous interleaving made it compare two start events.
Fix
Select the startWorkflow callbacks by semantic name and span identity, then retain the existing hierarchy assertions. Paired callbacks now also must share a span ID.
Validation
The unchanged exact test passed 6/6 attempts, so natural reproduction was not obtained. The candidate passed 11/11 focused attempts. The trusted baseline and fixed repository validator both passed. The originating Ubuntu matrix job remains required.
Validation status:
validated-without-reproductionhighhighmediumstandard— 1 changed file; 7.7 KiBnot-reproduced— Six unchanged-checkout focused attempts passed; the CI log supplies the observed callback interleaving.pass-after-only— The existing exact test passed 11 candidate attempts; no new test was needed because the change strengthens its span-identity assertions.Poe lint, bridge lint, and editable build) — passedPoe lint, bridge lint, and editable build) — passedInvestigator-run checks
uv run pytest tests/contrib/openai_agents/test_openai_tracing.py::test_tracing -q— passed; 11 attempt(s). Ten post-change stress attempts and one post-format attempt passed..ci-flake-runtime/input/validate.sh— passed; 1 attempt(s). Ruff, type checks, docstyle, bridge lint, and editable bridge build passed.Required target CI
Residual risks
Automation provenance
f74399de1c267c22c69f7713c66ea4a332465ad8If this finding should not be fixed, apply the
sdk-sentinel:false-positivelabel and close the PR. Sentinel will suppress the finding until its affected source changes.SDK Sentinel recurrence history
2026-09-15 17:17 UTC2026-09-15 22:55 UTC