Repository navigation
[1.0-beta] Disable workspace inheritance from module dependencies - #13229
Merged
Merged
Conversation
shykes
reviewed
May 27, 2026
| @@ -0,0 +1,428 @@ | |||
| # Disable Workspace Inheritance From Runtime Dependencies | |||
Contributor
There was a problem hiding this comment.
Move to future/done/YYYY-MM-DD-<name>.md
dagger-codex
Bot
force-pushed
the
codex/workspace-disable-workspace-inheritance
branch
3 times, most recently
from
May 27, 2026 07:51
df3bf1d to
ea4ad1c
Compare
dagger-codex
Bot
force-pushed
the
codex/workspace-disable-workspace-inheritance
branch
2 times, most recently
from
May 27, 2026 23:17
c8f3036 to
688c860
Compare
tiborvass
force-pushed
the
workspace
branch
2 times, most recently
from
May 30, 2026 05:10
b9b4b5f to
4e36540
Compare
eunomie
force-pushed
the
workspace
branch
3 times, most recently
from
May 30, 2026 21:01
70d629a to
12bcb30
Compare
tiborvass
force-pushed
the
workspace
branch
2 times, most recently
from
June 1, 2026 18:12
be2a5bd to
eeaa57a
Compare
dagger-codex
Bot
force-pushed
the
codex/workspace-disable-workspace-inheritance
branch
2 times, most recently
from
June 1, 2026 21:30
3083ee2 to
90fbffb
Compare
kpenfound
reviewed
Jun 3, 2026
vito
added a commit
that referenced
this pull request
Jul 18, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 18, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 19, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 19, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 19, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 19, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 20, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 20, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
shykes
force-pushed
the
codex/workspace-disable-workspace-inheritance
branch
from
July 21, 2026 10:52
3f77d59 to
9982452
Compare
Runtime calls into dependency modules used to inherit a contextual Workspace from the caller, either through an omitted Workspace argument or through currentWorkspace. They no longer do. Callers now pass a Workspace explicitly when a dependency needs one. Direct client calls can still supply one. currentWorkspace is already hidden from module SDKs (#13659), so that path is closed at the schema level. Signed-off-by: Solomon Hykes <[email protected]> Co-authored-by: Alex Suraci <[email protected]>
SDK codegen runs through workspace.generators().run(). It used to run in the calling module's runtime client, where workspace inheritance is now refused, so it failed with "no current workspace". Record the workspace owner's client on GeneratorGroup and restore that context before running, the same way withWorkspaceClientContext does. The generator framework is trusted core code acting for the workspace owner, not a module reaching into a dependency. Signed-off-by: Solomon Hykes <[email protected]>
The release module calls dag.RustSDKDev() from its own runtime and relied on the workspace argument being auto-injected. That is now refused with "no current workspace". Pass the release module's own workspace explicitly instead. Rust is the only SDK-dev toolchain on the Workspace API; the others still use +defaultPath and are unaffected. Signed-off-by: Solomon Hykes <[email protected]>
shykes
force-pushed
the
codex/workspace-disable-workspace-inheritance
branch
from
July 21, 2026 14:01
e41b997 to
1a12bd3
Compare
vito
added a commit
that referenced
this pull request
Jul 21, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 21, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 21, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 21, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 21, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 21, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 22, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 22, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 24, 2026
Revert carrying the bound workspace across module calls (a5ec46c) and adopt the explicit contract from #13229: a module function calling a dependency no longer hands it the workspace implicitly. The carry threaded the caller's bound Workspace through the nested client session, so a dependency's auto-injected Workspace! resolved against it. That is ambient inheritance across the module boundary, which we don't want. loadWorkspaceArg now errors when a running module function omits a Workspace argument (callerInModuleFunction), and inheritWorkspaceBinding stops inheriting through a module-runtime parent so a dependency's currentWorkspace resolves to none. Direct clients and rolled-up group leaves (generators, checks, agents, services, LLM tool dispatch) still resolve their bound workspace through the in-process context binding, so only cross-module dependency calls change. Signed-off-by: Alex Suraci <[email protected]>
vito
added a commit
that referenced
this pull request
Jul 24, 2026
The over-broad inheritWorkspaceBinding gate returned early whenever a module runtime client would inherit through another module runtime parent. That also killed the legitimate frozen-workspace inheritance that engine-internal codegen relies on: currentModuleAsSDK reads Server.CurrentWorkspace directly to find the workspace a module is installed in, so nested SDK codegen failed with "no current workspace: workspace not loaded". Drop the isModuleRuntimeClient gate and restore plain parent-workspace inheritance. #13229's contract is still enforced by the loadWorkspaceArg gate, and #13659 already hides currentWorkspace from module SDKs, so dropping this gate does not reopen the dependency-reads-caller-workspace vector. Signed-off-by: Alex Suraci <[email protected]>
This was referenced Aug 5, 2026
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.
Driver: @shykes
Direct client calls can still give module A a contextual Workspace. Module dependencies no longer inherit it. A must pass a Workspace to B explicitly.
Before
B inherited the client's workspace through A.
After
The implicit workspace stops at A. B only gets one if A passes it.