the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix: gate windows updater checks
Ogulcan Celik7c7d8c861900
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 15de5e1bd..6129ffd1a 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -42,11 +42,15 @@ jobs:matrix:include:- os: ubuntu-latest+ kind: unixnextest_filter: all()- os: macos-latest+ kind: unixnextest_filter: not binary(live_handoff)+ - os: windows-latest+ kind: windowsruns-on: ${{ matrix.os }}- timeout-minutes: 10+ timeout-minutes: 15steps:- name: Checkoutuses: actions/checkout@v6@@ -54,9 +58,17 @@ jobs:persist-credentials: false- name: Install Rust+ if: matrix.kind == 'unix'uses: dtolnay/rust-toolchain@stable+ - name: Install Rust+ if: matrix.kind == 'windows'+ uses: dtolnay/rust-toolchain@stable+ with:+ targets: x86_64-pc-windows-msvc+- name: Install Rust tools+ if: matrix.kind == 'unix'uses: taiki-e/install-action@b550161ef8a7bc4f2a671c0b03a18ac9ccedea1e # v2with:tool: just,cargo-nextest@@ -74,37 +86,14 @@ jobs:uses: Swatinem/rust-cache@v2with:cache-bin: false+ key: ${{ matrix.os }}- name: Run checks+ if: matrix.kind == 'unix'run: just ci '${{ matrix.nextest_filter }}'- check-windows:- name: check (windows)- runs-on: windows-latest- timeout-minutes: 15- steps:- - name: Checkout- uses: actions/checkout@v6- with:- persist-credentials: false-- - name: Install Rust- uses: dtolnay/rust-toolchain@stable- with:- targets: x86_64-pc-windows-msvc-- - name: Install Zig- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1- with:- version: 0.15.2-- - name: Restore cargo cache- uses: Swatinem/rust-cache@v2- with:- cache-bin: false- key: windows-x86_64-pc-windows-msvc-- name: Run Windows checks+ if: matrix.kind == 'windows'shell: pwshrun: |$ErrorActionPreference = "Stop"@@ -122,6 +111,7 @@ jobs:Invoke-Checked cargo @("build", "--locked", "--target", "x86_64-pc-windows-msvc")- name: Smoke ConPTY pane+ if: matrix.kind == 'windows'shell: pwshrun: |$ErrorActionPreference = "Stop"@@ -150,7 +140,7 @@ jobs:Start-Sleep -Seconds 2$read = & $exe agent read smoke --source recent --lines 40 --format text$text = $read -join "`n"- if ($text -notmatch "Directory of") {+ if ($text -notmatch "File\(s\)" -or $text -notmatch "Dir\(s\)") {throw "pane read did not include cmd.exe directory output: $text"}} finally {diff --git a/src/main.rs b/src/main.rsindex ffd11140b..d2beb1140 100644--- a/src/main.rs+++ b/src/main.rs@@ -46,6 +46,7 @@ mod agent_resume;mod api;mod app;mod build_info;+#[cfg(not(windows))]mod checksum;mod cli;mod client;diff --git a/src/update.rs b/src/update.rsindex 6b428b78e..3337d6e92 100644--- a/src/update.rs+++ b/src/update.rs@@ -8,6 +8,7 @@use std::collections::BTreeMap;use std::env;+#[cfg(not(windows))]use std::fs;use std::io::{self, BufRead, BufReader, IsTerminal, Write};use std::path::{Path, PathBuf};@@ -519,11 +520,13 @@ fn check_homebrew_latest() -> Result<Option<Version>, String> {// Download + install// ---------------------------------------------------------------------------+#[cfg(not(windows))]struct DownloadedUpdate {current_exe: PathBuf,tmp_path: Option<PathBuf>,}+#[cfg(not(windows))]impl Drop for DownloadedUpdate {fn drop(&mut self) {if let Some(tmp_path) = self.tmp_path.take() {@@ -533,6 +536,7 @@ impl Drop for DownloadedUpdate {}/// Download a release to a prepared executable temp file without touching the running server.+#[cfg(not(windows))]fn download_update(release: &ReleaseInfo) -> Result<DownloadedUpdate, String> {let current_exe = env::current_exe().map_err(|e| format!("can't find current binary: {e}"))?;@@ -592,6 +596,7 @@ fn download_update(release: &ReleaseInfo) -> Result<DownloadedUpdate, String> {})}+#[cfg(not(windows))]fn install_downloaded_update(mut update: DownloadedUpdate) -> Result<(), String> {let tmp_path = update.tmp_path@@ -1955,6 +1960,9 @@ pub fn self_update(options: SelfUpdateOptions) -> Result<Version, String> {"installing {} with the Windows installer...",release.label());+ if let Some(sha256) = &release.sha256 {+ tracing::debug!(sha256 = %sha256, "selected Windows update asset has checksum");+ }install_windows_update_with_installer(channel)?;let updated_exe = windows_installed_herdr_exe_path()?;eprintln!("installed {}", release.label());@@ -1971,8 +1979,6 @@ pub fn self_update(options: SelfUpdateOptions) -> Result<Version, String> {print_outdated_integration_notice_with_updated_binary(&updated_exe);print_running_session_update_outcomes(&server_update_outcomes, &release);-- return Ok(release.version);}#[cfg(not(windows))]