Skip to content

Add environment lifecycle orchestration to McpEnv #1230

Description

@Timandes

Summary

Extend rock.sdk.mcp.McpEnv to consume ScaffoldHub EnvLifecycleFactory and orchestrate environment lifecycles within the existing ROCK runtime flow.

Scope

  • construct registered environment lifecycles by MCP server key
  • inject the ROCK sandbox and start environment lifecycles before the user before_launch hook
  • make McpEnv.is_alive(key: str | None = None) asynchronous and aggregate lifecycle status without short-circuiting
  • release environment lifecycles before runtime/auth cleanup while preserving cleanup and error-priority semantics
  • update the optional mcp dependency only after an actual ScaffoldHub release containing EnvLifecycle is available

Acceptance criteria

  • unit tests cover construction, start order/config, async liveness, release order, cleanup continuation, and error propagation
  • existing MCP integration tests collect with awaited is_alive calls
  • relevant Ruff checks pass
  • PR references this issue

Dependency

ScaffoldHub feature/env-lifecycle must provide EnvLifecycle, EnvLifecycleFactory, and GoogleSheetsEnvLifecycle under the fixed google_sheet server key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions