{"record":{"id":"324426c1cc789b83","repo":"Hmbown/CodeWhale","slug":"this-launcher-does-not-support-repository-clones","errorCode":null,"errorMessage":"this launcher does not support repository clones","messagePattern":"this launcher does not support repository clones","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/cloud_dispatch.rs","lineNumber":1182,"sourceCode":"        .filter(|value| !value.is_empty())\n        .unwrap_or_else(|| DEFAULT_DAYTONA_API.to_string())\n}\n\n/// Launch seam. Tests inject a recorder; production uses [`LiveDaytonaLauncher`].\n///\n/// The methods after `create_sandbox` default to \"unsupported\" so partial\n/// fixtures keep compiling; the real runner (and the recording tests) drive\n/// the full protocol.\npub trait DaytonaLauncher {\n    /// Create the sandbox and return its id plus the (validated) toolbox URL.\n    fn create_sandbox(&self, job: &CloudJob) -> Result<SandboxReceipt>;\n    /// Block until the sandbox accepts toolbox calls (bounded poll).\n    fn wait_ready(&self, _receipt: &SandboxReceipt) -> Result<()> {\n        Ok(())\n    }\n    /// Clone the target forge repository inside the sandbox.\n    fn clone_repository(&self, _receipt: &SandboxReceipt, _url: &str, _path: &str) -> Result<()> {\n        bail!(\"this launcher does not support repository clones\")\n    }\n    /// Run one harness command inside the sandbox and return bounded stdout.\n    fn run_harness(&self, _receipt: &SandboxReceipt, _command: &HarnessCommand) -> Result<String> {\n        bail!(\"this launcher does not support harness execution\")\n    }\n    /// Collect the agent's work product from the sandbox.\n    fn collect_patch(&self, _receipt: &SandboxReceipt) -> Result<PatchReceipt> {\n        bail!(\"this launcher does not support patch collection\")\n    }\n    /// Tear the sandbox down. Called on cancel, failure, and completion.\n    fn teardown(&self, _receipt: &SandboxReceipt) -> Result<()> {\n        bail!(\"this launcher does not support teardown\")\n    }\n    /// List Codewhale-dispatch sandboxes with their job labels. Used by the\n    /// reconciler (startup sweep and cancel); not part of the run protocol.\n    fn list_job_sandboxes(&self) -> Result<Vec<LabeledSandbox>> {\n        bail!(\"this launcher does not support sandbox listing\")\n    }","sourceCodeStart":1164,"sourceCodeEnd":1200,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/cloud_dispatch.rs#L1164-L1200","documentation":"This is the default SandboxLauncher trait implementation for clone_repository: a launcher that has not overridden the method reports that it cannot clone repositories into a sandbox. It exists so trait implementors only implement the operations they support; calling the unimplemented one fails loudly instead of silently doing nothing.","triggerScenarios":"Calling clone_repository with a receipt produced by a launcher that did not override clone_repository — i.e. any dispatch flow that requests a sandbox clone against a minimal/no-op launcher.","commonSituations":"Running cloud dispatch in an environment or build where the real sandbox launcher is stubbed out; wiring a test/fallback launcher into the dispatch pipeline; a platform where sandboxing is unavailable so the default impl is used.","solutions":["Use a launcher implementation that actually supports clones (the real sandbox launcher for your platform).","Check which launcher is wired into the dispatch path and why the default trait impl is being hit.","If clones are not supported in this environment, dispatch without the clone step or pre-populate the workspace instead.","Surface a clear 'sandbox clones unavailable here' message instead of retrying the same call."],"exampleFix":"// before\nlauncher.clone_repository(&receipt, &url, path)?; // default impl -> bail\n// after\nif launcher_supports_clones(&launcher) {\n    launcher.clone_repository(&receipt, &url, path)?;\n} else {\n    bail!(\"sandbox clones unavailable in this environment\");\n}","handlingStrategy":"try-catch","validationCode":"// capability probe before use\nfn launcher_supports_clones(l: &dyn SandboxLauncher) -> bool {\n    // attempt is the contract; detect via a cheap probe or launcher metadata\n    l.capabilities().contains(Capability::Clone)\n}","typeGuard":null,"tryCatchPattern":"match launcher.clone_repository(&receipt, url, path) {\n    Err(e) if e.to_string().contains(\"does not support repository clones\") => {\n        eprintln!(\"this launcher cannot clone; use a sandbox-capable launcher\");\n    }\n    other => { /* ... */ }\n}","preventionTips":["Select the launcher based on required capabilities before dispatch.","In restricted environments, plan flows that do not need in-sandbox clones.","Keep stub launchers out of production dispatch paths.","Add an integration test asserting the production launcher implements clone_repository."],"tags":["sandbox","not-implemented","cloud"],"backgroundTag":"method-not-implemented","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}