Skip to content

Materialize remote workspaces for local command runners #956

Description

@chubes4

Problem

A repository and branch registered through Data Machine Code's GitHub API remote workspace backend cannot be consumed by Homeboy's DMC worktree provider, and DMC exposes no operation to materialize that existing remote workspace as a local primary/worktree.

This strands valid managed workspaces when a task moves from API-only file operations to command-backed coding, dependency installation, or deterministic tests.

Reproduction

Downstream tracker: WordPress/mcp-adapter#255

  1. Register a fork through workspace clone while RemoteWorkspaceBackend::should_handle() is true.

  2. Add a worktree branch with workspace worktree add.

  3. DMC reports the branch successfully with a path such as:

    github://chubes4/mcp-adapter#feat/255-successful-pre-execution-completion

  4. workspace show <handle> succeeds.

  5. Attempt homeboy agent-task cook --to-worktree <handle>.

  6. Homeboy invokes its configured DMC resolver:

    studio wp datamachine-code workspace worktree get <handle> --format=json

  7. Resolution fails because the provider requires a materialized local path. The remote backend also explicitly rejects runner workspace commands with runner_workspace_command_unavailable.

Expected

  • DMC provides an explicit operation to materialize an existing registered remote primary/worktree into the authoritative local workspace root, preserving repository, branch, task, and lifecycle identity.
  • The resulting handle resolves through workspace worktree get to a local path consumable by Homeboy.
  • Materialization follows primary freshness, duplicate-remote, fork, and worktree safety policy rather than requiring an unmanaged clone.
  • Remote API-only operation remains available when command execution is not needed.

Evidence

  • Remote handle: mcp-adapter@feat-255-successful-pre-execution-completion
  • Remote path: github://chubes4/mcp-adapter#feat/255-successful-pre-execution-completion
  • Homeboy error: worktree provider dmc resolve command failed with exit code 1
  • DMC source documents that remote runner commands are unavailable and directs callers to a local runner workspace backend, but no CLI transition/materialization command exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions