{"record":{"id":"6574124cba3f0135","repo":"Kuberwastaken/claurst","slug":"archive-did-not-contain-expected-binary-extr","errorCode":null,"errorMessage":"Archive did not contain expected binary '{}'.\nExtracted to: {}","messagePattern":"Archive did not contain expected binary '(.+?)'\\.\nExtracted to: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/cli/src/upgrade.rs","lineNumber":102,"sourceCode":"    extract_archive(&archive_path, &extract_dir, is_zip)?;\n\n    // -------- locate the new binary --------\n    let bin_name = if cfg!(target_os = \"windows\") {\n        \"claurst.exe\"\n    } else {\n        \"claurst\"\n    };\n    let new_binary = extract_dir.join(bin_name);\n    if !new_binary.exists() {\n        // Some archives may extract into a subdirectory — search shallowly.\n        let mut candidates: Vec<PathBuf> = Vec::new();\n        for entry in walkdir_shallow(&extract_dir, 3) {\n            if entry.file_name().and_then(|n| n.to_str()) == Some(bin_name) {\n                candidates.push(entry);\n            }\n        }\n        if candidates.is_empty() {\n            bail!(\n                \"Archive did not contain expected binary '{}'.\\nExtracted to: {}\",\n                bin_name,\n                extract_dir.display()\n            );\n        }\n        std::fs::copy(&candidates[0], &new_binary)?;\n    }\n\n    // -------- swap --------\n    println!(\"Replacing running binary…\");\n    swap_binary(&exe_path, &new_binary)?;\n\n    // -------- macOS quarantine strip --------\n    #[cfg(target_os = \"macos\")]\n    {\n        let _ = std::process::Command::new(\"xattr\")\n            .args([\"-dr\", \"com.apple.quarantine\"])\n            .arg(&exe_path)","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/cli/src/upgrade.rs#L84-L120","documentation":"After extracting the downloaded release archive, neither the expected binary name at the archive root nor a shallow (depth-3) search of the extract directory found the claurst executable. The release asset has an unexpected layout — the formatted values name the missing binary and the extraction directory that was searched.","triggerScenarios":"Thrown at src-rust/crates/cli/src/upgrade.rs:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the extraction directory shown in the message to see the archive's actual layout","Download the archive manually from the GitHub releases page and install the binary by hand","Report the packaging change — the release asset layout diverged from what the upgrader expects"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}