{"record":{"id":"f69947b10c37770c","repo":"Hmbown/CodeWhale","slug":"this-launcher-does-not-support-patch-collection","errorCode":null,"errorMessage":"this launcher does not support patch collection","messagePattern":"this launcher does not support patch collection","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/cloud_dispatch.rs","lineNumber":1190,"sourceCode":"/// 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)]\npub struct LabeledSandbox {\n    pub sandbox_id: String,\n    /// Job id from the `codewhale.job` label, when the label is present.\n    pub job_id: Option<String>,","sourceCodeStart":1172,"sourceCodeEnd":1208,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/cloud_dispatch.rs#L1172-L1208","documentation":"Default SandboxLauncher trait implementation for collect_patch: a launcher that did not override the method reports that it cannot collect the agent's work product (patch) from the sandbox. The default-impl pattern keeps unsupported operations explicit and failing loudly.","triggerScenarios":"Calling collect_patch on a receipt from a launcher that never implemented patch collection — e.g. after a run in a stubbed environment, or a dispatch flow that finished the harness but selected a launcher without a real collect_patch.","commonSituations":"Retrieving results of a cloud job run with a fallback/no-op launcher; environments where the sandbox filesystem cannot be read out; wiring mistakes that routed the job to the stub backend.","solutions":["Use a launcher whose collect_patch is implemented for your platform so the patch can actually be read out.","Check launcher selection: a completed job with this error usually means the wrong backend ran it.","If no patch exists (job never ran), check the job status first instead of calling collect_patch.","Treat this as a terminal environment limitation — re-run the job on a capable launcher to obtain the patch."],"exampleFix":"// before\nlet patch = launcher.collect_patch(&receipt)?;\n// after\nlet launcher = real_launcher_for_platform();\nlet patch = launcher.collect_patch(&receipt)?;","handlingStrategy":"try-catch","validationCode":"fn launcher_supports_patch(l: &dyn SandboxLauncher) -> bool {\n    l.capabilities().contains(Capability::CollectPatch)\n}","typeGuard":null,"tryCatchPattern":"match launcher.collect_patch(&receipt) {\n    Err(e) if e.to_string().contains(\"does not support patch collection\") => {\n        eprintln!(\"no patch available: this launcher cannot collect work products; re-run on a capable launcher\");\n    }\n    other => { /* ... */ }\n}","preventionTips":["Confirm the launcher backend before launching a job whose output you need as a patch.","Check job status/success before attempting patch collection.","Do not wire the default-impl launcher into result-collection flows.","Test the full dispatch->collect path against the real launcher in CI."],"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"}