Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ to include examples, links to docs, or any other relevant information.
retried on its configured interval instead.
- Nexus-context workflow/activity starts no longer set `on_conflict_options` when there are no links
or callbacks to attach.
- The workflow sandbox now passes `pydantic_core` through by default, alongside `pydantic`.

### Security

Expand Down
2 changes: 2 additions & 0 deletions temporalio/worker/workflow_sandbox/_restrictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,8 @@ def with_child_unrestricted(self, *child_path: str) -> SandboxMatcher:
# Due to how Pydantic is importing lazily inside of some classes, we choose
# to always pass it through
"pydantic",
# Same for its compiled core, which Pydantic-based libraries import lazily
"pydantic_core",
}
)

Expand Down
12 changes: 12 additions & 0 deletions tests/contrib/openai_agents/test_openai_replay.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from pathlib import Path

import pytest
Expand Down Expand Up @@ -32,6 +33,10 @@ async def test_replay(file_name: str) -> None:
with (Path(__file__).with_name("histories") / file_name).open("r") as f:
history_json = f.read()

with warnings.catch_warnings(record=True) as recorder:
warnings.filterwarnings(
"always", message=r"Module .* was imported after initial workflow load"
)
await Replayer(
workflows=[
ResearchWorkflow,
Expand All @@ -44,3 +49,10 @@ async def test_replay(file_name: str) -> None:
],
plugins=[OpenAIAgentsPlugin()],
).replay_workflow(WorkflowHistory.from_json("fake", history_json))

# Sandbox imports during an activation count toward the deadlock timeout
assert not [
str(w.message)
for w in recorder
if "was imported after initial workflow load" in str(w.message)
]
Loading