From 0f24653cf2fec021fd6afed0cea6a66bd4262733 Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Wed, 20 May 2026 10:40:54 -0700 Subject: [PATCH 1/3] fix: [#309] point install endpoint at altimate.sh/install (not altimate.ai/install) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit altimate.ai is the marketing site (a React Router SPA on a different host) where `/install` falls through to an HTML 404 page. altimate.sh is the canonical altimate-code site and now serves the install script at `/install` via a Next.js route handler with proper text/x-shellscript content type and server-side GA4 tracking (companion PR in AltimateAI/altimate-code-website). The mismatch broke v0.7.1's standalone install path end-to-end: • `curl -fsSL https://altimate.ai/install | bash` fetched HTML and tried to bash-execute it (would error out, but the symptom was confusing). • `altimate upgrade` for curl-installed users fetches the install URL via `Installation.upgradeCurl()` to re-run the install script. With the broken URL, every curl-user's in-place upgrade silently failed. This PR swaps the seven references in this repo: • install (curl install script): two examples in --help block • README.md: install instruction • packages/opencode/src/installation/index.ts: the fetch URL inside `upgradeCurl()` • docs/docs/reference/troubleshooting.md: three references in the install troubleshooting section added in v0.7.1 • packages/opencode/test/install/upgrade-method.test.ts: assertion now requires altimate.sh/install AND explicitly rejects altimate.ai/install so a future regression that reintroduces the broken URL fires immediately • packages/opencode/test/branding/branding.test.ts: renamed brand-domain assertion to "references altimate-owned domain for user-facing URLs" that requires altimate.sh/install and rejects altimate.ai/install • packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts: the README curl-install assertion was pinning the old URL; updated `docs/mkdocs.yml`'s `altimate.ai/discord` link is unchanged — that's a separate marketing-site URL, not the install path. Pairs with AltimateAI/altimate-code-website#22 which adds the `app/install/route.ts` handler. Ship the website PR FIRST so the new URL is live before this one merges to main — otherwise curl-install would be broken in a different way (pointing at a not-yet-deployed endpoint) between merges. Closes #309. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 +- docs/docs/reference/troubleshooting.md | 6 +++--- install | 4 ++-- packages/opencode/src/installation/index.ts | 2 +- packages/opencode/test/branding/branding.test.ts | 8 ++++++-- packages/opencode/test/install/upgrade-method.test.ts | 8 ++++++-- .../test/skill/release-v0.7.1-binary-adversarial.test.ts | 2 +- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 9991a3bbe6..576b9adc23 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ npm install -g altimate-code Or via curl (installs the `altimate` binary to `~/.altimate/bin`): ```bash -curl -fsSL https://altimate.ai/install | bash +curl -fsSL https://altimate.sh/install | bash ``` The curl install drops a single self-contained binary named `altimate`. The npm install exposes both `altimate` and `altimate-code` on PATH; the curl install only exposes `altimate`. Alpine Linux (musl) and Windows on ARM64 are not currently supported by the standalone binary — use `apk add gcompat` on Alpine, or use WSL on Windows-on-ARM. diff --git a/docs/docs/reference/troubleshooting.md b/docs/docs/reference/troubleshooting.md index 55ae8449a0..18f75fd7ac 100644 --- a/docs/docs/reference/troubleshooting.md +++ b/docs/docs/reference/troubleshooting.md @@ -4,7 +4,7 @@ ### Standalone binary not found after curl install -**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://altimate.ai/install | bash`. +**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://altimate.sh/install | bash`. As of v0.7.1 the curl-installed binary is named `altimate`, not `altimate-code`. The npm package continues to ship both names. If you scripted against the curl install: @@ -25,7 +25,7 @@ Or stay on the `altimate-code` name by installing via npm: `npm install -g altim The v0.7.0 curl install shipped without the NAPI native module. Fixed in v0.7.1 — the native module is now embedded directly into the binary. Re-install with: ```bash -curl -fsSL https://altimate.ai/install | bash +curl -fsSL https://altimate.sh/install | bash ``` ### Alpine Linux (musl) not supported @@ -39,7 +39,7 @@ curl -fsSL https://altimate.ai/install | bash apk add gcompat # Then either: -curl -fsSL https://altimate.ai/install | bash # standalone binary +curl -fsSL https://altimate.sh/install | bash # standalone binary # or: apk add gcompat && npm install -g altimate-code # npm install ``` diff --git a/install b/install index 80487e41ab..09a2cf86ba 100755 --- a/install +++ b/install @@ -20,8 +20,8 @@ Options: --no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.) Examples: - curl -fsSL https://altimate.ai/install | bash - curl -fsSL https://altimate.ai/install | bash -s -- --version 1.0.180 + curl -fsSL https://altimate.sh/install | bash + curl -fsSL https://altimate.sh/install | bash -s -- --version 1.0.180 ./install --binary /path/to/altimate EOF } diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index d8adad1b13..eeb335d4ba 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -34,7 +34,7 @@ export namespace Installation { } async function upgradeCurl(target: string) { - const body = await fetch("https://altimate.ai/install").then((res) => { + const body = await fetch("https://altimate.sh/install").then((res) => { if (!res.ok) throw new Error(res.statusText) return res.text() }) diff --git a/packages/opencode/test/branding/branding.test.ts b/packages/opencode/test/branding/branding.test.ts index 95b8a7b698..01543a830c 100644 --- a/packages/opencode/test/branding/branding.test.ts +++ b/packages/opencode/test/branding/branding.test.ts @@ -121,8 +121,12 @@ describe("Installation Script", () => { expect(installContent).not.toContain("anomalyco") }) - test("references altimate.ai domain for user-facing URLs", () => { - expect(installContent).toContain("altimate.ai") + test("references altimate-owned domain for user-facing URLs", () => { + // The install URL moved from altimate.ai → altimate.sh in v0.7.1 because + // altimate.ai/install was an unreachable route on the marketing SPA + // (issue #309). altimate.sh is the canonical altimate-code site. + expect(installContent).toContain("altimate.sh/install") + expect(installContent).not.toContain("altimate.ai/install") }) }) diff --git a/packages/opencode/test/install/upgrade-method.test.ts b/packages/opencode/test/install/upgrade-method.test.ts index 787c9052ca..92c663e902 100644 --- a/packages/opencode/test/install/upgrade-method.test.ts +++ b/packages/opencode/test/install/upgrade-method.test.ts @@ -85,8 +85,12 @@ describe("upgrade execution", () => { expect(INSTALLATION_SRC).toContain("HOMEBREW_NO_AUTO_UPDATE") }) - test("curl upgrade uses altimate.ai/install endpoint", () => { - expect(INSTALLATION_SRC).toContain("https://altimate.ai/install") + test("curl upgrade uses altimate.sh/install endpoint", () => { + expect(INSTALLATION_SRC).toContain("https://altimate.sh/install") + // altimate.ai/install was the legacy URL (broken since 2026-05; tracked in + // #309). Keep the assertion so any future regression that reintroduces it + // fires immediately. + expect(INSTALLATION_SRC).not.toContain("https://altimate.ai/install") }) test("VERSION normalization strips v prefix", () => { diff --git a/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts b/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts index 3f974b8c83..168025c883 100644 --- a/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts +++ b/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts @@ -281,7 +281,7 @@ describe("v0.7.1 PR #820 — docs surface coverage", () => { }) test("README documents the curl install option with the correct binary name", () => { const readme = readFileSync(path.join(REPO_ROOT, "README.md"), "utf8") - expect(readme).toContain("curl -fsSL https://altimate.ai/install | bash") + expect(readme).toContain("curl -fsSL https://altimate.sh/install | bash") expect(readme).toContain("~/.altimate/bin") expect(readme).toMatch(/single self-contained binary named `altimate`/) }) From 4614e6e44f6c7027e3bf09ec01155d0b32f39fce Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Thu, 21 May 2026 00:12:38 -0700 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20[#309]=20use=20www.altimate.sh/insta?= =?UTF-8?q?ll=20=E2=80=94=20apex=20altimate.sh=20not=20routed=20to=20Ampli?= =?UTF-8?q?fy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After AltimateAI/altimate-code-website#22 merged and deployed, the install endpoint serves correctly from www.altimate.sh/install but the apex altimate.sh/install still returns HTTP 404 from a non-Amplify origin (ip-10-124-5-249.us-west-2.compute.internal, no x-amz-cf-id headers). The apex DNS / CloudFront alias is a separate infra fix. This is a same-day workaround: switch all install endpoint references from altimate.sh/install to www.altimate.sh/install. Once the apex routing is fixed, drop the `www.` prefix — the test assertions use a `(www\.)?` regex so they keep passing across both forms. Also adds an altimate_change marker block around the modified line in `packages/opencode/src/installation/index.ts:upgradeCurl()`. The line sits in upstream-shared territory and the marker guard flagged it as unmarked custom code; wrap it now so future upstream merges see the intent and don't auto-overwrite. Files touched: • install • README.md • docs/docs/reference/troubleshooting.md • packages/opencode/src/installation/index.ts (+ altimate_change markers) • packages/opencode/test/install/upgrade-method.test.ts (assertion → /https:\/\/(www\.)?altimate\.sh\/install/) • packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts (README assertion → /curl -fsSL https:\/\/(www\.)?altimate\.sh\/install \| bash/) Verified end-to-end: • `curl -fsSL https://www.altimate.sh/install` → HTTP 200, Content-Type text/x-shellscript, body identical to raw.githubusercontent.com/.../main/install (diff returns 0). • Full sandboxed install: `HOME=$(mktemp -d) bash <(curl ... www.altimate.sh)` completes; installed binary returns `0.7.1`. • Apex confirmed broken: `curl -sI https://altimate.sh/install` → 404 from `ip-10-124-5-249.us-west-2.compute.internal` (not Amplify). 176/176 tests pass across the touched suites. Marker guard passes. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 +- docs/docs/reference/troubleshooting.md | 6 +++--- install | 4 ++-- packages/opencode/src/installation/index.ts | 7 ++++++- packages/opencode/test/install/upgrade-method.test.ts | 6 +++++- .../test/skill/release-v0.7.1-binary-adversarial.test.ts | 4 +++- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 576b9adc23..9dbf2d3075 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ npm install -g altimate-code Or via curl (installs the `altimate` binary to `~/.altimate/bin`): ```bash -curl -fsSL https://altimate.sh/install | bash +curl -fsSL https://www.altimate.sh/install | bash ``` The curl install drops a single self-contained binary named `altimate`. The npm install exposes both `altimate` and `altimate-code` on PATH; the curl install only exposes `altimate`. Alpine Linux (musl) and Windows on ARM64 are not currently supported by the standalone binary — use `apk add gcompat` on Alpine, or use WSL on Windows-on-ARM. diff --git a/docs/docs/reference/troubleshooting.md b/docs/docs/reference/troubleshooting.md index 18f75fd7ac..a8ff5761c7 100644 --- a/docs/docs/reference/troubleshooting.md +++ b/docs/docs/reference/troubleshooting.md @@ -4,7 +4,7 @@ ### Standalone binary not found after curl install -**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://altimate.sh/install | bash`. +**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://www.altimate.sh/install | bash`. As of v0.7.1 the curl-installed binary is named `altimate`, not `altimate-code`. The npm package continues to ship both names. If you scripted against the curl install: @@ -25,7 +25,7 @@ Or stay on the `altimate-code` name by installing via npm: `npm install -g altim The v0.7.0 curl install shipped without the NAPI native module. Fixed in v0.7.1 — the native module is now embedded directly into the binary. Re-install with: ```bash -curl -fsSL https://altimate.sh/install | bash +curl -fsSL https://www.altimate.sh/install | bash ``` ### Alpine Linux (musl) not supported @@ -39,7 +39,7 @@ curl -fsSL https://altimate.sh/install | bash apk add gcompat # Then either: -curl -fsSL https://altimate.sh/install | bash # standalone binary +curl -fsSL https://www.altimate.sh/install | bash # standalone binary # or: apk add gcompat && npm install -g altimate-code # npm install ``` diff --git a/install b/install index 09a2cf86ba..2cf359ba03 100755 --- a/install +++ b/install @@ -20,8 +20,8 @@ Options: --no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.) Examples: - curl -fsSL https://altimate.sh/install | bash - curl -fsSL https://altimate.sh/install | bash -s -- --version 1.0.180 + curl -fsSL https://www.altimate.sh/install | bash + curl -fsSL https://www.altimate.sh/install | bash -s -- --version 1.0.180 ./install --binary /path/to/altimate EOF } diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index eeb335d4ba..4bf7000ed0 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -34,10 +34,15 @@ export namespace Installation { } async function upgradeCurl(target: string) { - const body = await fetch("https://altimate.sh/install").then((res) => { + // altimate_change start — curl-upgrade endpoint URL + // Upstream uses opencode.ai/install. We fetch the altimate install script + // from www.altimate.sh/install (the apex altimate.sh isn't routed to the + // Amplify Next.js app — tracked separately; revisit when apex DNS is fixed). + const body = await fetch("https://www.altimate.sh/install").then((res) => { if (!res.ok) throw new Error(res.statusText) return res.text() }) + // altimate_change end const proc = Process.spawn(["bash"], { stdin: "pipe", stdout: "pipe", diff --git a/packages/opencode/test/install/upgrade-method.test.ts b/packages/opencode/test/install/upgrade-method.test.ts index 92c663e902..8ffd9bcd60 100644 --- a/packages/opencode/test/install/upgrade-method.test.ts +++ b/packages/opencode/test/install/upgrade-method.test.ts @@ -86,7 +86,11 @@ describe("upgrade execution", () => { }) test("curl upgrade uses altimate.sh/install endpoint", () => { - expect(INSTALLATION_SRC).toContain("https://altimate.sh/install") + // Accept either apex (altimate.sh) or www. host. Apex routes to a non- + // Amplify origin today, so the source uses www.altimate.sh; once the + // apex is fixed (separate infra change), the source can drop www. and + // this assertion still passes. + expect(INSTALLATION_SRC).toMatch(/https:\/\/(www\.)?altimate\.sh\/install/) // altimate.ai/install was the legacy URL (broken since 2026-05; tracked in // #309). Keep the assertion so any future regression that reintroduces it // fires immediately. diff --git a/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts b/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts index 168025c883..5c32174e0a 100644 --- a/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts +++ b/packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts @@ -281,7 +281,9 @@ describe("v0.7.1 PR #820 — docs surface coverage", () => { }) test("README documents the curl install option with the correct binary name", () => { const readme = readFileSync(path.join(REPO_ROOT, "README.md"), "utf8") - expect(readme).toContain("curl -fsSL https://altimate.sh/install | bash") + // Accept either apex (altimate.sh) or www. host so a future apex-DNS fix + // that swaps www.altimate.sh → altimate.sh doesn't need another test update. + expect(readme).toMatch(/curl -fsSL https:\/\/(www\.)?altimate\.sh\/install \| bash/) expect(readme).toContain("~/.altimate/bin") expect(readme).toMatch(/single self-contained binary named `altimate`/) }) From a511019b26eb9dec90b56f355feae6c530e96fbb Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Thu, 21 May 2026 00:22:45 -0700 Subject: [PATCH 3/3] fix: [#309] bound upgradeCurl fetch with 15s timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address CodeRabbit review feedback on PR #825: the install-script `fetch` in `Installation.upgradeCurl()` had no timeout, so a stalled CDN/origin could hang `altimate upgrade` indefinitely. Wrap the request with `AbortSignal.timeout(15_000)` so it fails fast. - `packages/opencode/src/installation/index.ts` — add `signal: AbortSignal.timeout(15_000)` to the fetch options; keep inside the existing `altimate_change` block (now gates URL + timeout together). - `packages/opencode/test/install/upgrade-method.test.ts` — new regression assertion that the source still contains the bounded timeout. The other CodeRabbit comment (refactor `_telemetryCache` to `Effect.cached`) is outside this PR's diff and unrelated to the install URL fix — leaving it for a separate change. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/opencode/src/installation/index.ts | 7 +++++-- packages/opencode/test/install/upgrade-method.test.ts | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index 4bf7000ed0..8994d87210 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -34,11 +34,14 @@ export namespace Installation { } async function upgradeCurl(target: string) { - // altimate_change start — curl-upgrade endpoint URL + // altimate_change start — curl-upgrade endpoint URL + bounded fetch timeout // Upstream uses opencode.ai/install. We fetch the altimate install script // from www.altimate.sh/install (the apex altimate.sh isn't routed to the // Amplify Next.js app — tracked separately; revisit when apex DNS is fixed). - const body = await fetch("https://www.altimate.sh/install").then((res) => { + // 15s timeout so a stalled CDN/origin can't hang `altimate upgrade` forever. + const body = await fetch("https://www.altimate.sh/install", { + signal: AbortSignal.timeout(15_000), + }).then((res) => { if (!res.ok) throw new Error(res.statusText) return res.text() }) diff --git a/packages/opencode/test/install/upgrade-method.test.ts b/packages/opencode/test/install/upgrade-method.test.ts index 8ffd9bcd60..ce26b70a57 100644 --- a/packages/opencode/test/install/upgrade-method.test.ts +++ b/packages/opencode/test/install/upgrade-method.test.ts @@ -97,6 +97,13 @@ describe("upgrade execution", () => { expect(INSTALLATION_SRC).not.toContain("https://altimate.ai/install") }) + test("curl upgrade fetch has a bounded timeout", () => { + // Without a timeout the install-script fetch can stall indefinitely on a + // hung CDN/origin, blocking `altimate upgrade` forever. Use AbortSignal.timeout + // so the request fails fast with a clear error instead. + expect(INSTALLATION_SRC).toMatch(/AbortSignal\.timeout\(\s*15_000\s*\)/) + }) + test("VERSION normalization strips v prefix", () => { expect(INSTALLATION_SRC).toContain('OPENCODE_VERSION.trim().replace(/^v/, "")') })