Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(update): fail the update check when a linux core asset is missing

Steven Enamakel909ad3c90876
diff --git a/crates/openhuman-core/src/core/observability_availability.rs b/crates/openhuman-core/src/core/observability_availability.rs
index d6770cf0eb..7f24b710ab 100644
--- a/crates/openhuman-core/src/core/observability_availability.rs
+++ b/crates/openhuman-core/src/core/observability_availability.rs
@@ -65,13 +65,12 @@ pub fn is_module_unavailable_message(msg: &str) -> bool {
/// The demoted report for [`super::ExpectedErrorKind::ModuleUnavailable`]: warn, so
/// the breadcrumb survives and a sustained spike still shows in logs, but no
/// Sentry error event — the one event was sent at resolution.
-pub(super) fn log_module_unavailable(domain: &str, operation: &str, message: &str) {
+pub(super) fn log_module_unavailable(domain: &str, operation: &str, _message: &str) {
tracing::warn!(
domain = domain,
operation = operation,
kind = "module_unavailable",
- error = %message,
"[observability] {domain}.{operation} skipped expected module-unavailable error \
- (reported once at resolution): {message}"
+ (reported once at resolution)"
);
}
diff --git a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
index c9f21983ba..903072ff64 100644
--- a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
+++ b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs
@@ -35,8 +35,9 @@ pub(super) fn resolve_local_runtime_key(
/// Whether a provider entry can be probed at `{endpoint}/models`.
///
-/// Claude Code is a local CLI provider, and an endpoint with an explicit
-/// non-http(s) scheme (`cli://…`) is a placeholder rather than an API base.
+/// Claude Code is a local CLI provider, and a `cli://…` endpoint is a
+/// placeholder rather than an API base. Any other scheme (`ftp://…`) is a
+/// misconfiguration and is left to the request path to surface as an error.
/// An endpoint that does not parse as `scheme://host` at all is left to the
/// request path so a genuine misconfiguration still surfaces as an error.
fn endpoint_hosts_models_listing(slug: &str, endpoint: &str) -> bool {
@@ -44,7 +45,7 @@ fn endpoint_hosts_models_listing(slug: &str, endpoint: &str) -> bool {
return false;
}
match reqwest::Url::parse(endpoint.trim()) {
- Ok(url) if url.has_host() => matches!(url.scheme(), "http" | "https"),
+ Ok(url) if url.has_host() => url.scheme() != "cli",
_ => true,
}
}
diff --git a/crates/openhuman-core/src/platform/update/core.rs b/crates/openhuman-core/src/platform/update/core.rs
index f944135915..6619f12a2b 100644
--- a/crates/openhuman-core/src/platform/update/core.rs
+++ b/crates/openhuman-core/src/platform/update/core.rs
@@ -343,10 +343,26 @@ async fn check_available_with_base_url(base_url: &str) -> Result<UpdateInfo, Str
let platform_asset = find_platform_asset(&release.assets);
if update_available && platform_asset.is_none() {
- // Expected, not a failure (Sentry TAURI-RUST-122R/122S/13B8/13B9):
- // releases publish core archives for Linux only — macOS and Windows
- // update through the Tauri updater's installers. Report the update with
- // no download url; `update_run` answers that with `missing_asset_result`.
+ if cfg!(target_os = "linux") {
+ // Releases publish a core archive for Linux, so its absence is a
+ // broken release the normal updater cannot apply.
+ let message = format!(
+ "update {latest_version} is available, but no core asset was found for {}",
+ platform_triple()
+ );
+ log::error!("[update] {message}");
+ crate::core::observability::report_error(
+ &message,
+ "update",
+ "check_releases",
+ &[("failure", "missing_platform_asset")],
+ );
+ return Err(message);
+ }
+ // Expected off Linux, not a failure (Sentry TAURI-RUST-122R/122S/13B8/13B9):
+ // macOS and Windows update through the Tauri updater's installers, not
+ // a core archive. Report the update with no download url; `update_run`
+ // answers that with `missing_asset_result`.
log::warn!(
"[update] update {latest_version} is available, but no core asset was published for {}; reporting it without a download",
platform_triple()
diff --git a/crates/openhuman-core/src/platform/update/core_tests.rs b/crates/openhuman-core/src/platform/update/core_tests.rs
index 1398863030..1677c43661 100644
--- a/crates/openhuman-core/src/platform/update/core_tests.rs
+++ b/crates/openhuman-core/src/platform/update/core_tests.rs
@@ -127,6 +127,7 @@ async fn check_available_reports_no_update_for_an_older_tag() {
/// so on those platforms every scheduled check found "no core asset" and
/// reported an error. A newer release without a core asset for this triple is
/// an available update with nothing to download, not a failure.
+#[cfg(not(target_os = "linux"))]
#[test]
fn check_available_reports_an_update_without_a_download_when_no_platform_asset_is_published() {
// The release a macOS/Windows host sees: desktop installers plus a core
@@ -495,3 +496,28 @@ fn raw_core_binary_stages_separately_from_running_executable() {
assert_eq!(staged, dir.path().join(staged_binary_staging_name()));
assert_ne!(staged, dir.path().join(staged_binary_name()));
}
+
+/// Linux releases publish a core archive, so a newer release without one for
+/// this triple is a broken release and must stay an update-check failure.
+#[cfg(target_os = "linux")]
+#[test]
+fn check_available_fails_on_linux_when_the_core_asset_is_missing() {
+ let body = r#"{
+ "tag_name": "v99.0.0",
+ "body": "notes",
+ "published_at": "2026-09-29T00:00:00Z",
+ "assets": [
+ {"name": "OpenHuman_99.0.0_aarch64.dmg", "browser_download_url": "https://example.invalid/dmg", "size": 1}
+ ]
+ }"#;
+ let runtime = tokio::runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .expect("runtime");
+ let result = runtime.block_on(async {
+ let server = releases_mock(200, body).await;
+ check_available_with_base_url(&server.uri()).await
+ });
+ let error = result.expect_err("a missing Linux core asset must fail the check");
+ assert!(error.contains("no core asset was found"), "{error}");
+}