Skip to content

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

test(update): treat a missing platform asset as an update without a download

Steven Enamakelf85bd7b8fc18
diff --git a/crates/openhuman-core/src/core/runtime/builder_tests.rs b/crates/openhuman-core/src/core/runtime/builder_tests.rs
index 4bbbddd2d3..c04609470d 100644
--- a/crates/openhuman-core/src/core/runtime/builder_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/builder_tests.rs
@@ -169,3 +169,11 @@ fn boot_jobs_are_independent_from_runtime_service_flags() {
assert!(!headless.integrations);
assert!(!headless.memory_sync);
}
+
+/// Sentry TAURI-RUST-122R/122S: the desktop shell updates through the Tauri
+/// updater, and releases publish no core archive for macOS or Windows, so an
+/// in-process core polling GitHub for one reported a missing asset every hour.
+#[test]
+fn desktop_service_set_does_not_run_the_core_update_scheduler() {
+ assert!(!ServiceSet::desktop().update_scheduler);
+}
diff --git a/crates/openhuman-core/src/platform/update/core_tests.rs b/crates/openhuman-core/src/platform/update/core_tests.rs
index bf92f83196..1398863030 100644
--- a/crates/openhuman-core/src/platform/update/core_tests.rs
+++ b/crates/openhuman-core/src/platform/update/core_tests.rs
@@ -122,20 +122,56 @@ async fn check_available_reports_no_update_for_an_older_tag() {
);
}
-#[tokio::test]
-async fn check_available_errors_when_a_newer_release_has_no_platform_asset() {
- let server = releases_mock(
- 200,
- r#"{"tag_name":"v99.0.0","body":"notes","published_at":"2026-09-29T00:00:00Z","assets":[]}"#,
- )
- .await;
-
- let err = check_available_with_base_url(&server.uri())
- .await
- .expect_err("a newer release without a platform asset must be surfaced");
+/// Sentry TAURI-RUST-122R/122S/13B8/13B9: releases publish core archives for
+/// Linux only — macOS and Windows update through the Tauri updater (DMG/MSI) —
+/// 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.
+#[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
+ // archive for a triple that is not this one.
+ let other_triple = if platform_triple() == "x86_64-unknown-linux-gnu" {
+ "aarch64-unknown-linux-gnu"
+ } else {
+ "x86_64-unknown-linux-gnu"
+ };
+ let body = format!(
+ 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}},
+ {{"name": "OpenHuman_99.0.0_x64_en-US.msi", "browser_download_url": "https://example.invalid/msi", "size": 1}},
+ {{"name": "openhuman-core-99.0.0-{other_triple}.tar.gz", "browser_download_url": "https://example.invalid/linux", "size": 1}}
+ ]
+ }}"#
+ );
- assert!(err.contains("update 99.0.0 is available"));
- assert!(err.contains(platform_triple()));
+ let runtime = tokio::runtime::Builder::new_current_thread()
+ .enable_all()
+ .build()
+ .expect("runtime");
+ let mut result = None;
+ let events = sentry::test::with_captured_events(|| {
+ result = Some(runtime.block_on(async {
+ let server = releases_mock(200, &body).await;
+ check_available_with_base_url(&server.uri()).await
+ }));
+ });
+
+ let info = result
+ .expect("check ran")
+ .expect("a missing platform asset must not fail the check");
+ assert!(info.update_available, "99.0.0 is still an available update");
+ assert_eq!(info.latest_version, "99.0.0");
+ assert!(info.download_url.is_none(), "no asset, no download url");
+ assert!(info.asset_name.is_none());
+ assert!(
+ events.is_empty(),
+ "a missing platform asset is expected, not a Sentry event: {events:?}"
+ );
}
#[tokio::test]