Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(desktop): honour silent releases in the startup update check (#3119)
Call Whitef605c8f0f49b
diff --git a/desktop/runtime-host/src/update.rs b/desktop/runtime-host/src/update.rsindex b070198ae..23851b35d 100644--- a/desktop/runtime-host/src/update.rs+++ b/desktop/runtime-host/src/update.rs@@ -106,6 +106,9 @@ pub struct Release {pub commit: Option<String>,/// Asset names published under the canonical download URL.pub assets: Vec<String>,+ /// The release asked not to be announced: its notes carry+ /// `<!-- avibe:update-notification=none -->` (docs/release.md).+ pub silent: bool,}#[derive(Deserialize)]struct Index {@@ -119,6 +122,9 @@ struct IndexRelease {prerelease: bool,commit: String,assets: Vec<IndexAsset>,+ /// Present only as `"none"`, for a silent release.+ #[serde(default)]+ update_notification: Option<String>,}#[derive(Deserialize)]struct IndexAsset {@@ -139,9 +145,45 @@ pub fn index_releases(bytes: &[u8]) -> Result<Vec<Release>, String> {prerelease: release.prerelease,commit: Some(release.commit),assets: release.assets.into_iter().map(|asset| asset.name).collect(),+ silent: release.update_notification.as_deref() == Some("none"),}).collect())}++/// Whether release notes ask clients not to announce the release. Reads the+/// marker the way `UPDATE_NOTIFICATION_POLICY_MARKER_RE` in+/// `core/update_checker.py` does: case-insensitively, and the first+/// well-formed marker decides.+pub fn silent_release_notes(body: &str) -> bool {+ let mut rest = body;+ while let Some(start) = rest.find("<!--") {+ rest = &rest[start + 4..];+ let Some(end) = rest.find("-->") else {+ return false;+ };+ if let Some(silent) = notification_marker(&rest[..end]) {+ return silent;+ }+ }+ false+}+/// `Some(silent)` for a well-formed marker comment, `None` for any other comment.+fn notification_marker(comment: &str) -> Option<bool> {+ let comment = comment.trim().to_ascii_lowercase();+ let marker = comment+ .strip_prefix("avibe:")+ .or_else(|| comment.strip_prefix("vibe-remote:"))?;+ match marker+ .strip_prefix("update-notification")?+ .trim_start()+ .strip_prefix('=')?+ .trim()+ {+ "none" => Some(true),+ "default" => Some(false),+ _ => None,+ }+}pub fn artifact_name(version: &str, target: &str) -> Result<String, String> {Ok(format!("Avibe_{version}_{target}{}", target_spec(target)?.1))}@@ -258,6 +300,30 @@ mod tests {}}#[test]+ fn the_first_well_formed_notification_marker_decides_silence() {+ for silent in [+ "<!-- avibe:update-notification=none -->",+ "notes\n<!--avibe:update-notification = none-->",+ "<!-- vibe-remote:update-notification=none -->",+ "<!-- draft <!-- avibe:update-notification=none -->",+ "<!-- other -->\n<!--\n avibe:update-notification=none\n-->",+ "<!-- AVIBE:Update-Notification=NONE -->",+ ] {+ assert!(silent_release_notes(silent), "{silent:?}");+ }+ for announced in [+ "",+ "Release notes",+ "`avibe:update-notification=none` documents the marker",+ "<!-- avibe:update-notification=default -->\n<!-- avibe:update-notification=none -->",+ "<!-- avibe:update-notification=nones -->",+ "<!-- avibe : update-notification=none -->",+ "<!-- avibe:update-notification=none",+ ] {+ assert!(!silent_release_notes(announced), "{announced:?}");+ }+ }+ #[test]fn unsigned_or_description_metadata_is_never_a_signature() {for signature in ["", "app-adhoc", "installer-unsigned", "U0lHTkFUVVJF"] {assert!(verify_signature(b"payload", signature, "").is_err());diff --git a/desktop/runtime-host/tests/updater.rs b/desktop/runtime-host/tests/updater.rsindex 73b1daaed..45b1b21c8 100644--- a/desktop/runtime-host/tests/updater.rs+++ b/desktop/runtime-host/tests/updater.rs@@ -182,6 +182,7 @@ fn channel_selection_uses_semver_and_the_prerelease_flag_together() {prerelease,commit: None,assets: Vec::new(),+ silent: false,};let listed = vec![release("gh-v3.1.2rc9", true),@@ -213,6 +214,10 @@ fn only_the_supported_index_schema_for_this_repository_is_read() {});let releases = index_releases(&serde_json::to_vec(&index).unwrap()).unwrap();assert_eq!(releases[0].assets, ["测试.tgz"]);+ assert!(+ !releases[0].silent,+ "an index written before the field announces every release"+ );for (field, value) in [("schema_version", serde_json::json!(2)),("repository", serde_json::json!("someone/avibe")),@@ -227,3 +232,33 @@ fn only_the_supported_index_schema_for_this_repository_is_read() {}assert!(index_releases(b"<html>captive portal</html>").is_err());}++#[test]+fn only_an_index_none_policy_marks_a_release_silent() {+ use avibe_runtime_host::update::index_releases;+ let index = |policy: serde_json::Value| {+ let mut release = serde_json::json!({+ "tag": "v3.2.4",+ "prerelease": false,+ "published_at": "2026-11-01T00:00:00Z",+ "commit": "b".repeat(40),+ "assets": []+ });+ if !policy.is_null() {+ release["update_notification"] = policy;+ }+ serde_json::to_vec(&serde_json::json!({+ "schema_version": 1,+ "repository": "avibe-bot/avibe",+ "releases": [release]+ }))+ .unwrap()+ };+ assert!(index_releases(&index(serde_json::json!("none"))).unwrap()[0].silent);+ for announced in [serde_json::Value::Null, serde_json::json!("default")] {+ assert!(+ !index_releases(&index(announced.clone())).unwrap()[0].silent,+ "{announced}"+ );+ }+}diff --git a/desktop/src-tauri/src/updater.rs b/desktop/src-tauri/src/updater.rsindex 9f93a7157..dd89a642d 100644--- a/desktop/src-tauri/src/updater.rs+++ b/desktop/src-tauri/src/updater.rs@@ -711,10 +711,11 @@ fn choice(result: &MessageDialogResult, c: &Catalog) -> Choice {_ => Choice::Later,}}-/// Only the automatic startup check honours a skipped version; an explicit menu-/// check always offers it, and any newer release prompts again.-fn should_prompt(interactive: bool, skipped: Option<&str>, version: &str) -> bool {- interactive || skipped != Some(version)+/// Only the automatic startup check honours a skipped version or a silent+/// release; an explicit menu check always offers it, and any newer announced+/// release prompts again. A silent release still shows as available.+fn should_prompt(interactive: bool, silent: bool, skipped: Option<&str>, version: &str) -> bool {+ interactive || (!silent && skipped != Some(version))}fn skipped_version(updater: &Updater) -> Option<String> {std::fs::read(&updater.skipped_path)@@ -742,6 +743,8 @@ struct GithubRelease {draft: bool,prerelease: bool,assets: Vec<GithubAsset>,+ #[serde(default)]+ body: Option<String>,}#[derive(Deserialize)]struct GithubAsset {@@ -885,6 +888,7 @@ async fn releases(client: &reqwest::Client) -> Result<Vec<Release>, String> {prerelease: release.prerelease,commit: None,assets,+ silent: release.body.as_deref().is_some_and(update::silent_release_notes),});}if done {@@ -893,7 +897,8 @@ async fn releases(client: &reqwest::Client) -> Result<Vec<Release>, String> {}Err("release history exceeds discovery bound".into())}-async fn find_update(app: &AppHandle, channel: Channel) -> Result<Option<Manifest>, String> {+/// The newer release in `channel`, verified, and whether it asked not to be announced.+async fn find_update(app: &AppHandle, channel: Channel) -> Result<Option<(Manifest, bool)>, String> {let client = client()?;let Some((version, release)) = channel.latest(releases(&client).await?) else {return Err("no release in this channel".into());@@ -945,7 +950,7 @@ async fn find_update(app: &AppHandle, channel: Channel) -> Result<Option<Manifes{return Err("updater artifact missing".into());}- Ok(Some(manifest))+ Ok(Some((manifest, release.silent)))}pub fn check(app: AppHandle, interactive: bool) {@@ -985,11 +990,11 @@ pub fn check(app: AppHandle, interactive: bool) {set_state(&app, Phase::Checking, None);tauri::async_runtime::spawn(async move {match find_update(&app, channel).await {- Ok(Some(manifest)) => {+ Ok(Some((manifest, silent))) => {set_available(&app, manifest.clone());publish_check(&app);let skipped = skipped_version(&app.state::<Updater>());- if !should_prompt(interactive, skipped.as_deref(), &manifest.version) {+ if !should_prompt(interactive, silent, skipped.as_deref(), &manifest.version) {settle_update(&app, None, Settlement::Completed);return;}@@ -1319,8 +1324,9 @@ async fn process_remote_update_request(app: AppHandle, request: DesktopUpdateReqNone,);let channel = app.state::<Updater>().state.lock().expect("updater state").channel;+ // A remote request asked for this update, so a silent release is offered too.match find_update(&app, channel).await {- Ok(Some(manifest)) => {+ Ok(Some((manifest, _silent))) => {app.state::<Updater>().state.lock()@@ -1605,10 +1611,18 @@ mod tests {#[test]fn only_the_startup_check_honours_a_skipped_version() {- assert!(!should_prompt(false, Some("1.2.3"), "1.2.3"));- assert!(should_prompt(false, Some("1.2.3"), "1.2.4"));- assert!(should_prompt(false, None, "1.2.3"));- assert!(should_prompt(true, Some("1.2.3"), "1.2.3"));+ assert!(!should_prompt(false, false, Some("1.2.3"), "1.2.3"));+ assert!(should_prompt(false, false, Some("1.2.3"), "1.2.4"));+ assert!(should_prompt(false, false, None, "1.2.3"));+ assert!(should_prompt(true, false, Some("1.2.3"), "1.2.3"));+ }++ #[test]+ fn a_silent_release_never_prompts_at_startup_but_an_explicit_check_offers_it() {+ assert!(!should_prompt(false, true, None, "1.2.4"));+ assert!(!should_prompt(false, true, Some("1.2.3"), "1.2.4"));+ assert!(should_prompt(true, true, None, "1.2.4"));+ assert!(should_prompt(true, true, Some("1.2.4"), "1.2.4"));}#[test]@@ -1734,7 +1748,7 @@ mod tests {let path = dir.path().join("update-skipped.json");persist_skipped_version(&path, "3.2.3").unwrap();- assert!(should_prompt(true, Some("3.2.3"), "3.2.3"));+ assert!(should_prompt(true, false, Some("3.2.3"), "3.2.3"));assert_eq!(serde_json::from_slice::<String>(&std::fs::read(path).unwrap()).unwrap(),"3.2.3",diff --git a/docs/plans/release-download-mirror.md b/docs/plans/release-download-mirror.mdindex 60aa5b7c9..edfa665a8 100644--- a/docs/plans/release-download-mirror.md+++ b/docs/plans/release-download-mirror.md@@ -82,7 +82,8 @@ only the releases that `vibe/ripgrep_runtime_manifest.json` and"prerelease": true,"published_at": "2026-09-29T07:35:48Z","commit": "<40-hex commit the tag points to>",- "assets": [{ "name": "<asset>", "size": 123, "sha256": "<64-hex>" }]+ "assets": [{ "name": "<asset>", "size": 123, "sha256": "<64-hex>" }],+ "update_notification": "none"}]}@@ -93,12 +94,18 @@ only the releases that `vibe/ripgrep_runtime_manifest.json` andevery listed asset already exists in the bucket with those bytes.- `sha256` is GitHub's asset digest, re-verified against the downloaded bytesbefore upload. `commit` is the peeled tag target.+- `update_notification` is present, as `"none"`, only when the release notes+ carry the silent-update marker (`docs/release.md`), read as+ `core/update_checker.py` reads it. Consumers treat a missing field as an+ announced release. The desktop updater does not prompt at startup for a+ silent release.- Producer: the release mirror workflow. Consumers: the desktop updater readsAvibe's index; the other repositories' have none yet.Planned: the CLI update checker, replacing its `api.github.com` discoverycall. Runtime downloads use pinned release URLs and need no index.- The index is unauthenticated metadata. A hostile index can at most withhold- releases or name copies that then fail the consumer's existing verification.+ releases, mark them silent, or name copies that then fail the consumer's+ existing verification.### Retentiondiff --git a/docs/release.md b/docs/release.mdindex f970fd81b..898ff35f5 100644--- a/docs/release.md+++ b/docs/release.md@@ -10,6 +10,12 @@ for `AGENTS.md`. The workflows are the source of truth for the final commands.input. Put `<!-- avibe:update-notification=none -->` in the tag annotationwhen the release should suppress update and post-update notifications whileautomatic updates remain enabled.+- The marker also silences the desktop app: its automatic startup check does+ not prompt for a silent release, which still shows as available and is+ offered by an explicit check or a remote install request. The shell reads+ the marker from the mirror index's `update_notification` field, or from the+ release notes when it falls back to the GitHub API. Desktop apps built+ before this rule still prompt.- Push the tag and let the official workflows create the release. Do notpre-create or manually edit a GitHub Release.- The workflow emits both current and legacy `vibe-remote` update markers fordiff --git a/scripts/release_mirror.py b/scripts/release_mirror.pyindex 829a400d3..e8c7bd4ce 100644--- a/scripts/release_mirror.py+++ b/scripts/release_mirror.py@@ -68,6 +68,12 @@ _SHA256_RE = re.compile(r"[0-9a-f]{64}")_COMMIT_RE = re.compile(r"[0-9a-f]{40}")# The desktop updater's stable channel: canonical ``vX.Y.Z`` full releases._STABLE_TAG_RE = re.compile(r"v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)")+# The release-notes marker asking clients not to announce a release, read as+# ``core/update_checker.py`` reads it: the first well-formed marker decides.+_UPDATE_NOTIFICATION_RE = re.compile(+ r"<!--\s*(?:avibe|vibe-remote):update-notification\s*=\s*(?P<policy>none|default)\s*-->",+ re.IGNORECASE,+)class MirrorError(RuntimeError):@@ -99,6 +105,8 @@ class Release:published_at: strcommit: strassets: tuple[Asset, ...]+ # The release notes ask clients not to announce it (docs/release.md).+ silent: bool = Falsedef key(self, asset: Asset) -> str:return f"{release_prefix(self.repository)}{self.tag}/{asset.name}"@@ -159,11 +167,17 @@ def parse_releases(published_at=item["published_at"],commit=commit,assets=tuple(sorted(assets, key=lambda asset: asset.name)),+ silent=silent_release_notes(item.get("body")),))return releases+def silent_release_notes(body: object) -> bool:+ match = _UPDATE_NOTIFICATION_RE.search(body) if isinstance(body, str) else None+ return match is not None and match.group("policy").lower() == "none"++def pinned_releases(repository: str, payload: Sequence[Mapping[str, Any]], manifest_path: Path) -> list[Mapping[str, Any]]:@@ -224,6 +238,8 @@ def render_index(repository: str, releases: Sequence[Release]) -> bytes:{"name": asset.name, "size": asset.size, "sha256": asset.sha256}for asset in release.assets],+ # Written only for a silent release, so other indexes keep their bytes.+ **({"update_notification": "none"} if release.silent else {}),}for release in releases],@@ -269,6 +285,7 @@ def with_earlier_pins(repository: str, releases: Sequence[Release], index: bytes)for asset in item["assets"]),+ silent=item.get("update_notification") == "none",)for item in document["releases"]if item["tag"] not in selecteddiff --git a/tests/test_release_mirror.py b/tests/test_release_mirror.pyindex 7731a7d4f..61bab6e30 100644--- a/tests/test_release_mirror.py+++ b/tests/test_release_mirror.py@@ -15,13 +15,14 @@ REPOSITORY = "avibe-bot/avibe"def github_release(- tag, *, published_at, prerelease=False, draft=False, assets=("a.tgz",), repository=REPOSITORY+ tag, *, published_at, prerelease=False, draft=False, assets=("a.tgz",), repository=REPOSITORY, body=None):return {"tag_name": tag,"draft": draft,"prerelease": prerelease,"published_at": published_at,+ "body": body,"assets": [{"name": name,@@ -56,6 +57,55 @@ def test_selection_keeps_every_full_release_and_only_the_newest_prereleases():]+def test_the_index_marks_only_releases_whose_notes_ask_for_silence():+ parsed = releases(+ github_release(+ "v3.2.4", published_at="2026-11-01T00:00:00Z",+ body="<!-- avibe:update-notification=none -->\n<!-- vibe-remote:update-notification=none -->\n\nNotes",+ ),+ github_release(+ "v3.2.3", published_at="2026-10-27T00:00:00Z",+ body="<!-- avibe:update-notification=default -->\n\nNotes",+ ),+ github_release("v3.2.2", published_at="2026-10-21T00:00:00Z", body="Notes"),+ github_release("v3.2.1", published_at="2026-10-16T00:00:00Z"),+ )++ assert [release.silent for release in parsed] == [True, False, False, False]+ document = json.loads(mirror.render_index(REPOSITORY, parsed))+ assert [item.get("update_notification") for item in document["releases"]] == ["none", None, None, None]+ # Announced releases keep the bytes an index had before the field existed.+ assert "update_notification" not in mirror.render_index(REPOSITORY, parsed[1:]).decode()+++def test_the_index_reads_silence_the_way_the_cli_update_checker_does():+ from core import update_checker++ assert mirror._UPDATE_NOTIFICATION_RE.pattern == update_checker.UPDATE_NOTIFICATION_POLICY_MARKER_RE.pattern+ assert mirror._UPDATE_NOTIFICATION_RE.flags == update_checker.UPDATE_NOTIFICATION_POLICY_MARKER_RE.flags+ for body in (+ None,+ "",+ "<!-- AVIBE:Update-Notification = NONE -->",+ "<!-- avibe:update-notification=default --><!-- avibe:update-notification=none -->",+ "`avibe:update-notification=none`",+ ):+ assert mirror.silent_release_notes(body) is (+ update_checker._parse_update_notification_policy(body) == update_checker.UPDATE_NOTIFICATION_POLICY_NONE+ ), body+++def test_an_earlier_pinned_release_keeps_its_silence_from_the_previous_index():+ (silent,) = releases(+ github_release("v3.2.4", published_at="2026-11-01T00:00:00Z", body="<!-- avibe:update-notification=none -->")+ )+ (announced,) = releases(github_release("v3.2.5", published_at="2026-11-02T00:00:00Z"))++ kept = mirror.with_earlier_pins(REPOSITORY, [announced], mirror.render_index(REPOSITORY, [silent]))++ assert [(release.tag, release.silent) for release in kept] == [("v3.2.5", False), ("v3.2.4", True)]++def test_reconcile_plan_trusts_only_objects_the_prior_index_verified():(release,) = releases(github_release(