Repository navigation
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8263be8528
ℹ️ 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".
| if stderr: | ||
| metadata["stderr"] = stderr | ||
| if stdout: | ||
| metadata["stdout"] = stdout |
There was a problem hiding this comment.
Include partial stdout in the failure payload
When a script prints before timing out, this stores stdout only in metadata. Built-in downstream nodes consume Message.text_content() via NodeExecutor._inputs_to_text, and the normal workflow result is likewise derived from text content, so they receive only the timeout banner and stderr; the partial stdout is available only to callers that manually inspect metadata. Add stdout as a separate content section or otherwise expose it through the standard workflow output path.
Useful? React with 👍 / 👎.
|
Addressed in commit 64acb0f: included partial stdout as a separate content section in the failure message payload when available, ensuring downstream workflow nodes can consume standard output from timed-out executions. |
Description
This PR fixes stream handling in
PythonNodeExecutorwhen a script times out, ensuringstdoutandstderrare properly decoded and preserved rather than swapped or discarded.Problem
In
runtime/node/executor/python_executor.py:subprocess.TimeoutExpiredis raised,_run_processmistakenly decodedexc.stdoutintostderr, while hardcodingstdout="":_build_failure_messageand_error_message,stdoutwas not forwarded or recorded in the failure message'smetadata, preventing downstream nodes or users from inspecting partial output.Fix
exc.stdout(or fallbackexc.output) intostdout, andexc.stderrintostderr.result.stdoutin_build_failure_messageand recordmetadata["stdout"] = stdoutwhen present.tests/test_python_executor_timeout.pyverifying stream preservation, stream separation, and edge cases.How Has This Been Tested?
pytest tests/test_python_executor_timeout.py(3 passed in 4.30s).ruff check tests/test_python_executor_timeout.py(All checks passed).ruff format --check tests/test_python_executor_timeout.py(Clean).