Skip to content

core: hide current workspace from module SDKs - #13659

Merged
sipsma merged 3 commits into
dagger:mainfrom
sipsma:hide-current-workspace-from-module-sdks
Jul 16, 2026
Merged

sipsma merged 3 commits into
dagger:mainfrom
sipsma:hide-current-workspace-from-module-sdks

Conversation

@sipsma

@sipsma sipsma commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add generic field-level schema introspection scrubbing alongside the existing whole-type scrubbing
  • hide only Query.currentWorkspace from module-facing SDK generation while retaining Workspace and Workspace-typed arguments
  • migrate in-repo module callers to declared, auto-injected Workspace arguments and regenerate committed module bindings
  • update Go module-authoring guidance to use declared Workspace arguments

Why

Ambient CurrentWorkspace reads from generated module SDKs can omit workspace contents from the enclosing module function's cache key. Declaring a Workspace constructor or function argument lets Dagger auto-inject the selected workspace and include the relevant workspace input in cache invalidation.

Behavior and compatibility

The module introspection/codegen view now scrubs Query.currentWorkspace. The full engine schema, standalone and official generated SDK clients, CLI and host clients, and raw GraphQL continue to expose the field. The Workspace type and Workspace-typed module arguments remain available.

This is an intentional hard cut for module codegen with no version gate or deprecation period. Affected modules must declare a Workspace argument instead of reading dag.CurrentWorkspace() or its SDK equivalent. Existing engine-side Workspace argument injection remains unchanged.

The in-repo release toolchain and workspace-selection fixtures now use declared Workspace arguments. Committed module bindings were regenerated through the repository's normal generation paths, and current Go SDK documentation was updated.

Testing

  • go test ./core/schema -run='Test(BaseSchemaAllowlist|SchemaJSONScrubbing)$' -count=1
  • go test ./core -run='TestSchemaJSONFileSelectorHiddenFieldsAffectCallIdentity$' -count=1
  • go test . -count=1 in toolchains/release
  • go test . -count=1 in the pinned Go generator fixture
  • dagger call engine-dev test --pkg ./core/integration --run='TestModule/TestCurrentWorkspaceError'
  • dagger call engine-dev test --pkg ./core/integration --run='TestContextualWorkspace/(TestContextualWorkspaceCaching|TestContextualWorkspaceCLIExposure)'
  • dagger call engine-dev test --pkg ./core/integration --run='TestWorkspaceSelection/TestSelectedWorkspaceFileIO'
  • dagger call engine-dev test --pkg ./core/integration --run='TestWorkspace/TestCurrentWorkspaceRootAndCwd'
  • dagger call engine-dev test --pkg ./core/integration --run='TestGenerators/TestGeneratorsDirectSDK/go'
  • local-engine release generation exercised with an auto-injected Workspace constructor

@sipsma
sipsma requested review from a team as code owners July 15, 2026 21:44
@sipsma
sipsma force-pushed the hide-current-workspace-from-module-sdks branch from b4ec5ea to a3b45e7 Compare July 15, 2026 21:59
Refresh generated Go runtime bindings from the standalone client schema after module-facing codegen began scrubbing Query.currentWorkspace. The PR generate check was failing because go:generate-dagger-runtimes produced these generated file updates.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma
sipsma merged commit dac8f87 into dagger:main Jul 16, 2026
87 checks passed
shykes added a commit that referenced this pull request Jul 16, 2026
Switch the Go builder's VCS-injection input from an explicit
*dagger.GitRepository to *dagger.Workspace, reading the HEAD commit and
uncommitted state via Workspace.git (#13074, shipped in 1.0).
Workspace.git is lazier than a raw GitRepository (no full repo upload) and
supports nested workspaces cleanly.

The engine only auto-injects a Workspace on a *direct* client call. Module
dependencies do not inherit the caller's workspace, so any module on a
build path that reaches the go toolchain must forward its own
(auto-injected) Workspace explicitly. The workspace arg (`ws`, optional) is
therefore threaded from each direct-call entrypoint down to every dag.Go
call site; when absent, VCS stamping is simply skipped.

Threaded through the build paths only, leaving non-building methods
untouched:
- cli-dev:    New -> go
- engine-dev: New (private field) -> go / cli-dev / internal Builder
- docs-dev:   References -> engine-dev
- dev:        Agent (gopls) and Test -> go / engine-dev
- release:    forwards its existing Workspace field (added by #13659) from
              Publish / TestLocalRelease / PublishWithMockEndpoints

The stamping itself is inlined in go's New(): the HEAD commit and dirty
state are written via -ldflags into github.com/dagger/go/buildinfo's
Injected* vars, whose ReadBuildInfo wrapper overlays them onto the vcs.*
settings so binaries self-report VCS info without a .git in the build
container.

engineVersion is bumped to v1.0.0-beta.6 for every touched module so the
1.0-only Workspace.git field and generated Ws opts fields are in the API
view.

NOTE: requires regenerating the affected module clients against a 1.0
engine before it compiles — Workspace.git and the Ws opts fields are absent
from the checked-in bindings. Regen is intentionally left out (needs a
running engine) and must be run separately.

Signed-off-by: Solomon Hykes <[email protected]>
shykes added a commit that referenced this pull request Jul 17, 2026
Switch the Go builder's VCS-injection input from an explicit
*dagger.GitRepository to *dagger.Workspace, reading the HEAD commit and
uncommitted state via Workspace.git (#13074, shipped in 1.0).
Workspace.git is lazier than a raw GitRepository (no full repo upload) and
supports nested workspaces cleanly.

The engine only auto-injects a Workspace on a *direct* client call. Module
dependencies do not inherit the caller's workspace, so any module on a
build path that reaches the go toolchain must forward its own
(auto-injected) Workspace explicitly. The workspace arg (`ws`, optional) is
therefore threaded from each direct-call entrypoint down to every dag.Go
call site; when absent, VCS stamping is simply skipped.

Threaded through the build paths only, leaving non-building methods
untouched:
- cli-dev:    New -> go
- engine-dev: New (private field) -> go / cli-dev / internal Builder
- docs-dev:   References -> engine-dev
- dev:        Agent (gopls) and Test -> go / engine-dev
- release:    forwards its existing Workspace field (added by #13659) from
              Publish / TestLocalRelease / PublishWithMockEndpoints

The stamping itself is inlined in go's New(): the HEAD commit and dirty
state are written via -ldflags into github.com/dagger/go/buildinfo's
Injected* vars, whose ReadBuildInfo wrapper overlays them onto the vcs.*
settings so binaries self-report VCS info without a .git in the build
container.

engineVersion is bumped to v1.0.0-beta.6 for every touched module so the
1.0-only Workspace.git field and generated Ws opts fields are in the API
view.

NOTE: requires regenerating the affected module clients against a 1.0
engine before it compiles — Workspace.git and the Ws opts fields are absent
from the checked-in bindings. Regen is intentionally left out (needs a
running engine) and must be run separately.

Signed-off-by: Solomon Hykes <[email protected]>
vito added a commit that referenced this pull request Jul 18, 2026
Query.currentWorkspace is no longer exposed to module SDKs (#13659), so
the runtime-workspace-isolation dep fixture's dag.CurrentWorkspace() call
no longer compiles and the "currentWorkspace is not inherited by
dependency" subtest can never run. That inheritance vector is now closed
at the schema level rather than the runtime boundary, and #13659's own
TestCurrentWorkspaceError already covers currentWorkspace being hidden
from modules.

Remove the ReadCurrentWorkspace and CurrentWorkspaceFromDep fixture
methods and the subtest. The remaining cases still assert the boundary
this PR adds: an explicitly passed Workspace reaches the dependency,
while an omitted Workspace argument is not auto-injected from the caller.

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 18, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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 18, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

Signed-off-by: Alex Suraci <[email protected]>
shykes added a commit that referenced this pull request Jul 18, 2026
Switch the Go builder's VCS-injection input from an explicit
*dagger.GitRepository to *dagger.Workspace, reading the HEAD commit and
uncommitted state via Workspace.git (#13074, shipped in 1.0).
Workspace.git is lazier than a raw GitRepository (no full repo upload) and
supports nested workspaces cleanly.

The engine only auto-injects a Workspace on a *direct* client call. Module
dependencies do not inherit the caller's workspace, so any module on a
build path that reaches the go toolchain must forward its own
(auto-injected) Workspace explicitly. The workspace arg (`ws`, optional) is
therefore threaded from each direct-call entrypoint down to every dag.Go
call site; when absent, VCS stamping is simply skipped.

Threaded through the build paths only, leaving non-building methods
untouched:
- cli-dev:    New -> go
- engine-dev: New (private field) -> go / cli-dev / internal Builder
- docs-dev:   References -> engine-dev
- dev:        Agent (gopls) and Test -> go / engine-dev
- release:    forwards its existing Workspace field (added by #13659) from
              Publish / TestLocalRelease / PublishWithMockEndpoints

The stamping itself is inlined in go's New(): the HEAD commit and dirty
state are written via -ldflags into github.com/dagger/go/buildinfo's
Injected* vars, whose ReadBuildInfo wrapper overlays them onto the vcs.*
settings so binaries self-report VCS info without a .git in the build
container.

engineVersion is bumped to v1.0.0-beta.6 for every touched module so the
1.0-only Workspace.git field and generated Ws opts fields are in the API
view.

NOTE: requires regenerating the affected module clients against a 1.0
engine before it compiles — Workspace.git and the Ws opts fields are absent
from the checked-in bindings. Regen is intentionally left out (needs a
running engine) and must be run separately.

Signed-off-by: Solomon Hykes <[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
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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]>
vito added a commit that referenced this pull request Jul 20, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

Signed-off-by: Alex Suraci <[email protected]>
shykes pushed a commit that referenced this pull request Jul 21, 2026
Query.currentWorkspace is no longer exposed to module SDKs (#13659), so
the runtime-workspace-isolation dep fixture's dag.CurrentWorkspace() call
no longer compiles and the "currentWorkspace is not inherited by
dependency" subtest can never run. That inheritance vector is now closed
at the schema level rather than the runtime boundary, and #13659's own
TestCurrentWorkspaceError already covers currentWorkspace being hidden
from modules.

Remove the ReadCurrentWorkspace and CurrentWorkspaceFromDep fixture
methods and the subtest. The remaining cases still assert the boundary
this PR adds: an explicitly passed Workspace reaches the dependency,
while an omitted Workspace argument is not auto-injected from the caller.

Signed-off-by: Alex Suraci <[email protected]>
shykes added a commit that referenced this pull request Jul 21, 2026
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]>
TomChv added a commit to dagger/typescript-sdk that referenced this pull request Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which
opened a nested engine session and coupled client bindings to engine
internals. Moving it into this SDK module makes generation ordinary codegen in
a plain container: the engine hands over the client-facing schema and the
bound module's metadata as data, with no nested session.

A generated client now binds exactly one module and ships as a self-contained,
scoped npm package. At runtime it serves that single module through
Workspace.moduleSource, so the bindings resolve from any plain client session
rather than only from a module runtime.

Client generation overlays the freshly generated files on the existing client
dir, so user-authored files there (e.g. a hand-written main.ts) survive
regeneration from any cwd. Local bound modules are resolved fresh from the
workspace (a cached module source can miss live edits), while pinned/immutable
git modules keep their canonical ref. Module refs are resolved
workspace-root-relative ("/" + ref) so generation works from any cwd.

Read the SDK's managed modules and clients from the passed workspace
(ws.sdk(name: currentModule.name)) instead of the ambient current workspace.
Module SDKs can no longer read the ambient workspace (dagger/dagger#13659), and
it was never populated during dagger.cloud @check execution -- which is why the
discovery and generate-all checks failed only in CI. The auto-injected
Workspace argument is always loaded, so the four affected checks now pass there
too.

Split the e2e module by concern into per-group files (utils, runtime, module,
client, init, config), each a small `type` exposed from E2e as a sub-object so
`dagger check` discovers its checks under `e-2-e:<group>:<check>`.

Requires the engine client-codegen primitives released in v1.0.0-beta.7
(dagger/dagger#13646 and #13663).

Signed-off-by: Tom Chauveau <[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
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

Signed-off-by: Alex Suraci <[email protected]>
TomChv added a commit to dagger/typescript-sdk that referenced this pull request Jul 21, 2026
Client generation used to run inside dagger/dagger's engine runtime, which
opened a nested engine session and coupled client bindings to engine
internals. Moving it into this SDK module makes generation ordinary codegen in
a plain container: the engine hands over the client-facing schema and the
bound module's metadata as data, with no nested session.

A generated client now binds exactly one module and ships as a self-contained,
scoped npm package. At runtime it serves that single module through
Workspace.moduleSource, so the bindings resolve from any plain client session
rather than only from a module runtime.

Client generation overlays the freshly generated files on the existing client
dir, so user-authored files there (e.g. a hand-written main.ts) survive
regeneration from any cwd. Local bound modules are resolved fresh from the
workspace (a cached module source can miss live edits), while pinned/immutable
git modules keep their canonical ref. Module refs are resolved
workspace-root-relative ("/" + ref) so generation works from any cwd.

Read the SDK's managed modules and clients from the passed workspace
(ws.sdk(name: currentModule.name)) instead of the ambient current workspace.
Module SDKs can no longer read the ambient workspace (dagger/dagger#13659), and
it was never populated during dagger.cloud @check execution -- which is why the
discovery and generate-all checks failed only in CI. The auto-injected
Workspace argument is always loaded, so the four affected checks now pass there
too.

Split the e2e module by concern into per-group files (utils, runtime, module,
client, init, config), each a small `type` exposed from E2e as a sub-object so
`dagger check` discovers its checks under `e-2-e:<group>:<check>`.

Requires the engine client-codegen primitives released in v1.0.0-beta.7
(dagger/dagger#13646 and #13663).

Signed-off-by: Tom Chauveau <[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
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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 22, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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]>
vito added a commit that referenced this pull request Jul 24, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

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]>
vito added a commit that referenced this pull request Jul 24, 2026
Section 4 documented the removed live-overlay carry: the machinery that
propagated the agent's edited workspace across module boundaries. That
carry is gone, so rewrite the section for the explicit-pass model. The
bound workspace is seeded into the direct tool call and layer-1 group
leaves but stops at the module execution boundary; a module calling
another module must pass a Workspace explicitly. Frozen-workspace
inheritance stays for engine-internal discovery, and currentWorkspace
remains hidden from module SDKs (#13659). Also fix the now-false intro
claims that referenced the cross-module propagation.

Signed-off-by: Alex Suraci <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants