Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
fix(installer): smoke test survives set -e on SIGILL (the 1.3.4 fallback never ran); CI csc arg
Salman Qureshi1b36bc224165
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex e998efb2..0a67de3f 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -408,7 +408,9 @@ jobs:$src = Join-Path $env:RUNNER_TEMP 'stub.cs''class P { static int Main(string[] a) { System.Console.WriteLine("9.9.9"); return 0; } }' | Set-Content -Path $src -Encoding ASCII$csc = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'- & $csc /nologo /out:(Join-Path $rel 'mercury-win-x64.exe') $src+ $outArg = '/out:' + (Join-Path $rel 'mercury-win-x64.exe')+ & $csc /nologo $outArg $src+ if ($LASTEXITCODE -ne 0) { throw "csc failed ($LASTEXITCODE)" }'<!doctype html><title>stub dashboard</title>' | Set-Content -Path (Join-Path $rel 'web\index.html') -Encoding ASCIItar -C $rel -czf (Join-Path $rel 'web.tar.gz') web$lines = foreach ($a in 'mercury-win-x64.exe', 'web.tar.gz') { "{0} {1}" -f (Get-FileHash -Algorithm SHA256 (Join-Path $rel $a)).Hash.ToLower(), $a }diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 79235846..6a6f4829 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,7 @@- **`irm mercuryagent.sh/install.ps1 | iex` failed with "checksums.txt must contain exactly one checksum for mercury-win-x64.exe"** on stock Windows PowerShell 5.1 — and the window closed before you could read it. GitHub serves `checksums.txt` as `application/octet-stream`, for which PowerShell 5.1 returns a `byte[]` from `Invoke-WebRequest`; the installer now decodes it (PowerShell 7 was unaffected). A failure now waits for Enter before closing the window (`MERCURY_NO_PAUSE=1` for automation).- **Running the saved script (`powershell -File install.ps1`) failed to parse** under PowerShell 5.1: the file had UTF-8 characters and no BOM, so the ANSI code page turned a `✓` into a quote. The installers are ASCII-only now.- CI runs the Windows installer under PowerShell 5.1 against a local release served as `application/octet-stream`.+- **install.sh (1.3.4) died with "Illegal instruction" instead of switching to the baseline build** when the default build crashed in the smoke test (`set -e` on a failing command substitution). Fixed; the CPU-detection path that picks baseline up front was unaffected.## 1.3.4 — hotfix: binaries for CPUs without AVX2 (#155)diff --git a/docs/install.sh b/docs/install.shindex 58227cc8..3ff6a37a 100755--- a/docs/install.sh+++ b/docs/install.sh@@ -321,7 +321,9 @@ Install the supported Node.js package instead:# Post-install smoke: the binary must at least report its version. A# wrong-arch download, a glibc mismatch or a quarantined binary fails# here with a readable message instead of at first use.- smoke_out=$("$bin_path" --version 2>&1); smoke_status=$?+ # `if` form: under set -e a failing command substitution exits the script+ # (the 1.3.4 installer died with "Illegal instruction" instead of switching builds).+ if smoke_out=$("$bin_path" --version 2>&1); then smoke_status=0; else smoke_status=$?; fi# SIGILL (exit 132) on the default build = a CPU without AVX2 that# /proc/cpuinfo did not reveal: switch to the baseline build in place.if [ "$smoke_status" -ne 0 ] && [ "$os" = "linux" ] && [ "$arch" = "x64" ] && [ "$asset" != "mercury-linux-x64-baseline" ] \@@ -333,7 +335,7 @@ Install the supported Node.js package instead:[ "$(sha256_file "$tmp_dir/$asset")" = "$(checksum_for "$checksums_tmp" "$asset")" ] || die "Checksum mismatch for $asset"mv "$tmp_dir/$asset" "$bin_path"chmod +x "$bin_path"- smoke_out=$("$bin_path" --version 2>&1); smoke_status=$?+ if smoke_out=$("$bin_path" --version 2>&1); then smoke_status=0; else smoke_status=$?; fifiif [ "$smoke_status" -eq 0 ]; theninfo "Smoke test passed: $BIN_NAME --version → $smoke_out"diff --git a/scripts/install.sh b/scripts/install.shindex 58227cc8..3ff6a37a 100755--- a/scripts/install.sh+++ b/scripts/install.sh@@ -321,7 +321,9 @@ Install the supported Node.js package instead:# Post-install smoke: the binary must at least report its version. A# wrong-arch download, a glibc mismatch or a quarantined binary fails# here with a readable message instead of at first use.- smoke_out=$("$bin_path" --version 2>&1); smoke_status=$?+ # `if` form: under set -e a failing command substitution exits the script+ # (the 1.3.4 installer died with "Illegal instruction" instead of switching builds).+ if smoke_out=$("$bin_path" --version 2>&1); then smoke_status=0; else smoke_status=$?; fi# SIGILL (exit 132) on the default build = a CPU without AVX2 that# /proc/cpuinfo did not reveal: switch to the baseline build in place.if [ "$smoke_status" -ne 0 ] && [ "$os" = "linux" ] && [ "$arch" = "x64" ] && [ "$asset" != "mercury-linux-x64-baseline" ] \@@ -333,7 +335,7 @@ Install the supported Node.js package instead:[ "$(sha256_file "$tmp_dir/$asset")" = "$(checksum_for "$checksums_tmp" "$asset")" ] || die "Checksum mismatch for $asset"mv "$tmp_dir/$asset" "$bin_path"chmod +x "$bin_path"- smoke_out=$("$bin_path" --version 2>&1); smoke_status=$?+ if smoke_out=$("$bin_path" --version 2>&1); then smoke_status=0; else smoke_status=$?; fifiif [ "$smoke_status" -eq 0 ]; theninfo "Smoke test passed: $BIN_NAME --version → $smoke_out"