{"record":{"id":"8841223a92c5ea53","repo":"Hmbown/CodeWhale","slug":"this-launcher-does-not-support-harness-execution","errorCode":null,"errorMessage":"this launcher does not support harness execution","messagePattern":"this launcher does not support harness execution","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/cloud_dispatch.rs","lineNumber":1186,"sourceCode":"/// 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    }\n}\n\n/// One dispatch-labeled sandbox discovered by the reconciler.\n#[derive(Debug, Clone, PartialEq, Eq)]","sourceCodeStart":1168,"sourceCodeEnd":1204,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/cloud_dispatch.rs#L1168-L1204","documentation":"Default SandboxLauncher trait implementation for run_harness: a launcher that did not override the method reports that it cannot execute harness commands inside the sandbox. Like the other default impls, it fails loudly rather than pretending to run a command.","triggerScenarios":"Calling run_harness with a receipt from a launcher that only implements the basic lifecycle (spawn/wait/teardown) or none of the execution methods — e.g. a stub launcher used in restricted environments.","commonSituations":"Executing a harness run in an environment without the real sandbox backend; a test double that implements teardown but not run_harness; misconfigured dispatch that selected the fallback launcher.","solutions":["Dispatch against a launcher that implements run_harness (the real sandboxed harness runner).","Verify the launcher selection logic: why is the default-impl launcher in use for this job?","In unsupported environments, skip harness execution explicitly rather than calling through the trait default.","If this is a test, inject a test double that implements run_harness with deterministic output."],"exampleFix":"// before\nlet out = launcher.run_harness(&receipt, &cmd)?;\n// after\nmatch launcher.run_harness(&receipt, &cmd) {\n    Ok(out) => out,\n    Err(e) if e.to_string().contains(\"does not support harness execution\") => {\n        bail!(\"harness execution unavailable with this launcher\");\n    }\n    Err(e) => Err(e),\n}","handlingStrategy":"try-catch","validationCode":"fn launcher_supports_harness(l: &dyn SandboxLauncher) -> bool {\n    l.capabilities().contains(Capability::Harness)\n}","typeGuard":null,"tryCatchPattern":"match launcher.run_harness(&receipt, &cmd) {\n    Err(e) if e.to_string().contains(\"does not support harness execution\") => {\n        eprintln!(\"harness execution unavailable with this launcher; re-dispatch on a capable backend\");\n    }\n    other => { /* ... */ }\n}","preventionTips":["Verify launcher capability before starting a harness run, not after spawning.","Route jobs to launchers that implement run_harness.","Keep test doubles explicit about unimplemented methods.","Fail the job early with a clear environment message rather than retrying."],"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"}