Skip to content

Commit 4614e6e

Browse files
anandgupta42claude
andcommitted
fix: [#309] use www.altimate.sh/install — apex altimate.sh not routed to Amplify
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) <[email protected]>
1 parent 0f24653 commit 4614e6e

6 files changed

Lines changed: 20 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ npm install -g altimate-code
3131
Or via curl (installs the `altimate` binary to `~/.altimate/bin`):
3232

3333
```bash
34-
curl -fsSL https://altimate.sh/install | bash
34+
curl -fsSL https://www.altimate.sh/install | bash
3535
```
3636

3737
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.

‎docs/docs/reference/troubleshooting.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Standalone binary not found after curl install
66

7-
**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://altimate.sh/install | bash`.
7+
**Symptoms:** `altimate-code: command not found` after running `curl -fsSL https://www.altimate.sh/install | bash`.
88

99
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:
1010

@@ -25,7 +25,7 @@ Or stay on the `altimate-code` name by installing via npm: `npm install -g altim
2525
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:
2626

2727
```bash
28-
curl -fsSL https://altimate.sh/install | bash
28+
curl -fsSL https://www.altimate.sh/install | bash
2929
```
3030

3131
### Alpine Linux (musl) not supported
@@ -39,7 +39,7 @@ curl -fsSL https://altimate.sh/install | bash
3939
apk add gcompat
4040

4141
# Then either:
42-
curl -fsSL https://altimate.sh/install | bash # standalone binary
42+
curl -fsSL https://www.altimate.sh/install | bash # standalone binary
4343
# or:
4444
apk add gcompat && npm install -g altimate-code # npm install
4545
```

‎install‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Options:
2020
--no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.)
2121
2222
Examples:
23-
curl -fsSL https://altimate.sh/install | bash
24-
curl -fsSL https://altimate.sh/install | bash -s -- --version 1.0.180
23+
curl -fsSL https://www.altimate.sh/install | bash
24+
curl -fsSL https://www.altimate.sh/install | bash -s -- --version 1.0.180
2525
./install --binary /path/to/altimate
2626
EOF
2727
}

‎packages/opencode/src/installation/index.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ export namespace Installation {
3434
}
3535

3636
async function upgradeCurl(target: string) {
37-
const body = await fetch("https://altimate.sh/install").then((res) => {
37+
// altimate_change start — curl-upgrade endpoint URL
38+
// Upstream uses opencode.ai/install. We fetch the altimate install script
39+
// from www.altimate.sh/install (the apex altimate.sh isn't routed to the
40+
// Amplify Next.js app — tracked separately; revisit when apex DNS is fixed).
41+
const body = await fetch("https://www.altimate.sh/install").then((res) => {
3842
if (!res.ok) throw new Error(res.statusText)
3943
return res.text()
4044
})
45+
// altimate_change end
4146
const proc = Process.spawn(["bash"], {
4247
stdin: "pipe",
4348
stdout: "pipe",

‎packages/opencode/test/install/upgrade-method.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ describe("upgrade execution", () => {
8686
})
8787

8888
test("curl upgrade uses altimate.sh/install endpoint", () => {
89-
expect(INSTALLATION_SRC).toContain("https://altimate.sh/install")
89+
// Accept either apex (altimate.sh) or www. host. Apex routes to a non-
90+
// Amplify origin today, so the source uses www.altimate.sh; once the
91+
// apex is fixed (separate infra change), the source can drop www. and
92+
// this assertion still passes.
93+
expect(INSTALLATION_SRC).toMatch(/https:\/\/(www\.)?altimate\.sh\/install/)
9094
// altimate.ai/install was the legacy URL (broken since 2026-05; tracked in
9195
// #309). Keep the assertion so any future regression that reintroduces it
9296
// fires immediately.

‎packages/opencode/test/skill/release-v0.7.1-binary-adversarial.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ describe("v0.7.1 PR #820 — docs surface coverage", () => {
281281
})
282282
test("README documents the curl install option with the correct binary name", () => {
283283
const readme = readFileSync(path.join(REPO_ROOT, "README.md"), "utf8")
284-
expect(readme).toContain("curl -fsSL https://altimate.sh/install | bash")
284+
// Accept either apex (altimate.sh) or www. host so a future apex-DNS fix
285+
// that swaps www.altimate.sh → altimate.sh doesn't need another test update.
286+
expect(readme).toMatch(/curl -fsSL https:\/\/(www\.)?altimate\.sh\/install \| bash/)
285287
expect(readme).toContain("~/.altimate/bin")
286288
expect(readme).toMatch(/single self-contained binary named `altimate`/)
287289
})

0 commit comments

Comments
 (0)