GeezerVison is showing github.com — mcp: restore workspace module methods in dagger mcp by shykes · Pull Request #13030 · dagger/dagger
Conversation
shykes
commented
Apr 24, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #13023.
Summary
dagger mcp stopped showing methods from the current workspace module.
The problem was that dagger mcp was still reading methods from module objects installed in the env, while workspace module entrypoints now come from the served Query schema.
This change makes dagger mcp load workspace module methods from the served schema.
After this change:
- without
--env-privileged, dagger mcp shows workspace module methods
- with
--env-privileged, dagger mcp shows workspace module methods and core methods
This also adds integration tests for these cases.
Testing
dagger call -m github.com/dagger/dagger@pull/head/13030 \
engine-dev \
test --pkg=./core/integration --run='TestMCP'
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
shykes
changed the title
mcp: restore served module methods in static mode
mcp: restore workspace module methods in dagger mcp
Apr 24, 2026
Issue #13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
grouville
pushed a commit
to grouville/dagger
that referenced
this pull request
Apr 28, 2026
* mcp: restore served module methods in static mode
Issue dagger#13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: pass hideCore as an optional arg
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: load workspace methods from live schema
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
---------
Signed-off-by: Solomon Hykes <[email protected]>
tiborvass
pushed a commit
that referenced
this pull request
Apr 30, 2026
* mcp: restore served module methods in static mode
Issue #13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: pass hideCore as an optional arg
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: load workspace methods from live schema
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
---------
Signed-off-by: Solomon Hykes <[email protected]>
(cherry picked from commit 092168c)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass
pushed a commit
that referenced
this pull request
Apr 30, 2026
* mcp: restore served module methods in static mode
Issue #13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: pass hideCore as an optional arg
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: load workspace methods from live schema
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
---------
Signed-off-by: Solomon Hykes <[email protected]>
(cherry picked from commit 092168c)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass
pushed a commit
that referenced
this pull request
May 2, 2026
* mcp: restore served module methods in static mode
Issue #13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: pass hideCore as an optional arg
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: load workspace methods from live schema
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
---------
Signed-off-by: Solomon Hykes <[email protected]>
(cherry picked from commit 092168c)
Signed-off-by: Tibor Vass <[email protected]>
tiborvass
pushed a commit
that referenced
this pull request
May 4, 2026
* mcp: restore served module methods in static mode
Issue #13023 is a regression in how `dagger mcp` discovers methods for the
current workspace module. Static MCP method calling was still building its tool
set from objects installed in the env. After the workspace/module changes, the
workspace entrypoint methods are exposed on the served `Query` root instead of
always being materialized as installed env objects. That left static MCP with
an empty method list for workspace modules unless privileged mode also exposed
core `Query` methods.
Fix this by loading workspace module query fields from the served schema and
feeding them into the same static method-calling tool set as other callable
methods. The new `loadServedModuleQueryTools` path reads
`currentTypeDefs(hideCore: true)`, finds the module-owned `Query` object, maps
those functions back to the served GraphQL fields, and adds them as top-level
static call methods. The static MCP builtins now operate on a unified
`callMethods` set so module query methods, env-installed module methods, and
reachable object methods are selected and called through the same path.
Add integration coverage for the `dagger mcp` CLI command itself. The new tests
start `dagger mcp` over stdio and verify all four user-facing combinations:
workspace module without `--env-privileged`, no module without
`--env-privileged`, no module with `--env-privileged`, and workspace module
with `--env-privileged`.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: pass hideCore as an optional arg
The first `TestMCP` cloud run showed that the new workspace method loader was
calling `currentTypeDefs` with the wrong input type for `hideCore`.
That field is declared as `dagql.Optional[dagql.Boolean]`, but the loader was
passing a plain `dagql.Boolean`. That caused `dagger mcp` to fail during tool
loading before the MCP server finished starting, which made the integration
cases fail with `transport closed` and the wrong CLI error.
Wrap the value with `dagql.Opt(...)` so the selector matches the schema's input
shape.
Signed-off-by: Solomon Hykes <[email protected]>
* mcp: load workspace methods from live schema
`dagger mcp` in static tool mode was building the callable top-level method set from the environment dependency schema. That schema is useful for installed modules, reachable object methods, builtins, and other environment-backed behavior, but it does not represent the live workspace `Query` root after the current module has been served as an entrypoint. As a result, workspace functions such as `greeting` disappeared from `ListMethods`; privileged mode could still show core `Query` fields, which made the bug look like a filtering issue even though the actual problem was schema selection.
Split the schema sources used by `MCP.Tools`: load served workspace `Query` methods from `CurrentDagqlServer(ctx)`, and keep the env-backed schema from `m.env.Self().deps.Schema(ctx)` for module tools, reachable object methods, and builtins. The tool closures produced for served query methods retain the same live server they were built from, so `CallMethod` executes against the schema that exposed the workspace entrypoint method.
The same no-module path exposed another stale assumption in `dagger mcp`: `initializeWorkspace` always returns a `moduleDef`, even when no workspace module exists, so the old `modDef == nil` check never fired. That let `dagger mcp` without `--env-privileged` start the MCP server in an empty workspace and block forever. Load the workspace typedefs with core hidden and treat the workspace as module-backed only when Query has a served module function (`sourceModuleName`) or the module constructor `with`, matching the MCP tool loader. Empty workspace plus no `--env-privileged` now fails before starting the server.
The MCP integration coverage exercises the four intended modes: module without privileged, no module without privileged, no module with privileged, and module with privileged. Once workspace methods were actually invoked, module calls could include the existing tool-call log prefix before the string result, so the two module result assertions now verify that the returned content contains the module value instead of asserting exact output formatting.
Verification:
- git diff --check
- GOOS=linux GOARCH=amd64 go test -c ./cmd/dagger -o /tmp/cmd-dagger.test
- GOOS=linux GOARCH=amd64 go test -c ./core/integration -o /tmp/core-integration.test
A remote debug run before the CLI guard fix reproduced the hang with `--timeout=2m --test-verbose`: `TestWithoutModuleAndWithoutPrivilegedFails` was blocked in `hostDaggerExec(..., "mcp")`, waiting for the empty-workspace MCP process to exit. That confirmed the no-module guard needed to be fixed rather than weakening the test.
Signed-off-by: Solomon Hykes <[email protected]>
---------
Signed-off-by: Solomon Hykes <[email protected]>
(cherry picked from commit 092168c)
Signed-off-by: Tibor Vass <[email protected]>
Reviewers
vito
vito approved these changes
grouville
Awaiting requested review from grouville
grouville was automatically assigned from dagger/maintainers
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|