Python: Fix workflow kwargs collision with __global__ executor IDs - #8311
Open
WhaleTech (ryo-whaletech) wants to merge 2 commits into
Open
WhaleTech (ryo-whaletech) wants to merge 2 commits into
WhaleTech (ryo-whaletech) wants to merge 2 commits into
Conversation
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:20 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:20 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:20 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
WhaleTech (ryo-whaletech)
September 11, 2026 17:21
View session
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:21 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Declarative workflow executors cannot consume the new non-mapping state object and will fail when forwarding invocation kwargs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Introduces collision-free workflow kwargs routing while preserving legacy checkpoint compatibility.
Changes:
- Separates global and executor-specific kwargs.
- Updates nested workflow and agent resolution.
- Adds routing and checkpoint regression tests.
File summaries
| File | Description |
|---|---|
_const.py |
Defines structured resolved kwargs. |
_workflow.py |
Normalizes invocation kwargs. |
_workflow_executor.py |
Forwards kwargs to nested workflows. |
_agent_executor.py |
Resolves kwargs for agents. |
test_workflow_kwargs.py |
Adds routing and restoration coverage. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:43 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 17:45 — with
GitHub Actions
Active
Copilot started reviewing on behalf of
WhaleTech (ryo-whaletech)
September 11, 2026 17:46
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Plain mixed global and executor-specific mappings no longer preserve their established merge behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 19:51 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 11, 2026 20:01 — with
GitHub Actions
Active
WhaleTech (ryo-whaletech)
force-pushed
the
fix/8310-workflow-kwargs-global-collision
branch
from
September 14, 2026 12:04
a1f0206 to
bc6d51b
Compare
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 14, 2026 12:04 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
enabled auto-merge
September 14, 2026 13:03
auto-merge was automatically disabled
September 14, 2026 13:49
Head branch was pushed to by a user without write access
WhaleTech (ryo-whaletech)
deployed
to
github-app-auth
September 14, 2026 13:50 — with
GitHub Actions
Active
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.
Motivation & Context
Workflow invocation kwargs historically use
__global__both as a global namespace sentinel and as an executor-specific key. That shared key can allow executor-specific__global__values to overwrite true globals; when a real executor has that ID, its targeted kwargs can also leak to sibling executors.This fixes the namespace collision reported in #8310 while retaining the historical state representation for older consumers and checkpoints.
Description & Review Guide
What are the major changes?
What is the impact of these changes?
__global__executors receive their targeted kwargs plus true global kwargs without leaking values to siblings.__global__values.What do you want reviewers to focus on?
Related Issue
Fixes #8310
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.