{"record":{"id":"7e34eef50237732b","repo":"xai-org/grok-build","slug":"unsupported-os","errorCode":null,"errorMessage":"Unsupported OS","messagePattern":"Unsupported OS","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-update/src/auto_update.rs","lineNumber":1001,"sourceCode":"\n/// Detect the platform (os, arch) to download binaries for.\n///\n/// Arch is the compile-time arch with one correction: an x86_64 build on an\n/// Apple Silicon host (Rosetta) selects `aarch64`, so every update path —\n/// interactive `grok update`, background `--auto` children, the leader's\n/// hourly converge, and forced minimum-version installs — converges to the\n/// native build instead of perpetuating the translated one. This mirrors\n/// install.sh's `hw.optional.arm64` probe; without it, a lingering x86_64\n/// process would reinstall x86_64 right over a fresh native install.\npub(crate) fn detect_platform() -> Result<(&'static str, &'static str)> {\n    let os = if cfg!(target_os = \"macos\") {\n        \"macos\"\n    } else if cfg!(target_os = \"linux\") {\n        \"linux\"\n    } else if cfg!(target_os = \"windows\") {\n        \"windows\"\n    } else {\n        anyhow::bail!(\"Unsupported OS\");\n    };\n    let arch = if cfg!(target_arch = \"x86_64\") {\n        \"x86_64\"\n    } else if cfg!(target_arch = \"aarch64\") {\n        \"aarch64\"\n    } else {\n        anyhow::bail!(\"Unsupported architecture\");\n    };\n    Ok((\n        os,\n        corrected_arch(os, arch, running_under_rosetta_on_apple_silicon()),\n    ))\n}\n\n/// Age past which a leftover `.tmp` download file (or a freshly-renamed\n/// versioned binary) is considered abandoned (crashed/killed updater) and\n/// safe for `cleanup_old_downloads` to sweep. Generous compared to the\n/// longest plausible download (per-request budget is","sourceCodeStart":983,"sourceCodeEnd":1019,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-update/src/auto_update.rs#L983-L1019","documentation":"Error \"Unsupported OS\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-grok-update/src/auto_update.rs:1001 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}