Skip to content

Commit 282e784

Browse files
authored
chore(release): v0.12.3 (#1362)
* fix: auto-register Altimate Base before `agent create` and `review` resolve a provider Neither `altimate agent create` nor `altimate review` called `FreeTier.autoRegisterWithin()` before resolving a provider, unlike the other five entrypoints (`run`, `tui`, `serve`, `acp`, `web`). On a fresh install this meant `agent create` leaked a raw upstream error mentioning "OpenCode" with no remediation, and `review`'s AI lane silently produced zero findings with no visible signal. Found by the Chaos Gremlin (Support Engineer) persona during the v0.12.3 release review — both confirmed P0s, verified against the actual failure path, not indirect reasoning. Wires both call sites with the same `autoRegisterWithin(undefined, () => void printDisclosureOnceForHeadless(true))` pattern already used by run/acp/web, and extends the entrypoint-late-notice-wiring pin test to cover both new call sites. * fix: surface startup feedback during the TUI's auto-register wait `tui.ts`'s up-to-3s auto-register wait gave zero terminal output — on a fresh install this reads as a hang on the very first launch (End User persona, v0.12.3 release review, P1). Gates a "Connecting to Altimate Base…" status line behind a 300ms delay so the common already-registered/fast path never flashes it. * docs: fix stale consent-gate wording flagged by the v0.12.3 release review Two independent findings (CTO and PM personas): - `altimate-base-disclosure.ts`'s header comment still described the disclosure as something "a user actually consents against before any Base credential is minted" — stale since this release removed the consent gate entirely. It's now a post-registration notice, not a pre-credential prompt. - README's "Step 1: Choose an LLM provider (required before anything works)" directly contradicted the next sentence, which explains a fresh install registers Altimate Base automatically if you skip this step. * chore: remove a duplicate altimate_change marker in server.ts Found while auditing the "Kilo Code Review" FAILURE check on PR #1361 (CTO and Tech Lead personas flagged it as an open loose end): every one of the bot's 9 findings was already fixed by a later commit in the same PR, and this harmless leftover duplicate `// altimate_change end` was noticed in the same import block along the way. * test: adversarial coverage for v0.12.3 release fixes Covers the new code from this release's review fixes: ordering/scoping invariants for the autoRegisterWithin() wiring in agent.ts/review.ts (must run before the provider is resolved, must stay outside review.ts's latency timer, must be unconditional regardless of --no-ai), the tui.ts feedback timer's delay bounds and try/finally cleanup, and a regression guard against the duplicate marker comment. * revert: restore the second altimate_change end marker in server.ts Not a duplicate. The two consecutive `// altimate_change end` lines close two separate blocks that happen to end at the same point: the outer "Altimate-only server endpoints" block (opened at the `McpRoutes` import) and the inner "registration must invalidate BOTH instance registries" block (opened at the InstanceStore import). Removing one left the outer block's start unpaired, which the marker-integrity test (test/upstream/bridge-merge.test.ts, test/branding/upstream-merge-guard.test.ts) caught in CI on PR #1362 — correctly, since I'd broken a real invariant while "cleaning up" what looked like leftover cruft without running the actual test that verifies pairing. * test: drop the mistaken duplicate-marker regression guard Followed the previous commit's correction — the "duplicate marker" this test pinned against was never a duplicate, so the test encoded the same wrong assumption. Removed rather than fixed forward, since there's nothing left to assert once the premise is gone. * docs: changelog for v0.12.3
1 parent c9f4223 commit 282e784

8 files changed

Lines changed: 195 additions & 18 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.12.3] - 2026-09-23
9+
10+
**Heads-up before upgrading (every user):**
11+
12+
- **Altimate Base now registers automatically, with no dialog to accept.** Since 2026-09-17, OpenCode's own free tier (Zen) has rejected keyless requests from Altimate Code ("OpenCode's free tier can only be used from within OpenCode"), so every install that had silently fallen back to it lost its free model. A fresh install — or one with no other usable model configured — now registers the free, no-signup Altimate Base automatically at startup and shows a one-time notice instead of a confirmation dialog; only the confirmation step is gone, not the disclosure. Opt out with `ALTIMATE_BASE_AUTO_REGISTER=0`, `altimate providers logout altimate-base`, or `disabled_providers` in config. (#1361)
13+
14+
### Changed
15+
16+
- **Altimate Base replaces keyless Zen as the automatic fallback model** when nothing else is configured. See heads-up above. (#1361)
17+
18+
### Fixed
19+
20+
- **`altimate agent create` and `altimate review` no longer fail on a fresh install with no model configured.** Neither command registered Altimate Base before resolving a provider, unlike every other entrypoint (`run`, `tui`, `serve`, `acp`, `web`): `agent create` leaked a raw upstream error mentioning "OpenCode", a brand the user has never seen, with no remediation; `review`'s AI lane silently produced zero findings with no visible signal. Found in this release's review.
21+
- **The TUI's startup auto-register wait no longer reads as a hang on a fresh install.** A "Connecting to Altimate Base…" status line appears if registration takes more than 300ms; the common already-registered path is unaffected. Found in this release's review.
22+
- **The pinned-workspace routing section follows the pinned workspace, not the project's own link.** (#1357)
23+
824
## [0.12.2] - 2026-09-22
925

1026
Promotes [0.12.2-beta.1] to `latest` — the six bug fixes below — plus four small fixes from this release's review and one workspace-pilot fix that landed alongside (#1353). No new features. The beta was published earlier the same day and did not soak before promotion; the review below is what stood in for that.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ installing it in your own repository.
5252

5353
Then — in order:
5454

55-
**Step 1: Choose an LLM provider** (required before anything works):
55+
**Step 1: Choose an LLM provider** (optional — Altimate Base is used automatically if you skip this):
5656
```bash
5757
altimate # Launch the TUI
5858
/connect # Interactive setup — choose Altimate Base, sign in, or bring an API key

‎packages/core/src/altimate-base-disclosure.ts‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
// altimate_change start — the single definition of the Altimate Base consent disclosure.
1+
// altimate_change start — the single definition of the Altimate Base disclosure notice.
22
//
3-
// This text is what a user actually consents against before any Base credential is minted, so it
4-
// must be identical everywhere it is shown. Two packages render it and neither can import from the
5-
// other: the TUI's disclosure dialog (`packages/tui`) and the HTTP disclosure route that serves
6-
// hosts rendering their own dialog (`packages/opencode`, for the VS Code extension's chat panel).
7-
// `packages/core` is the only module both already depend on, so the constant lives here.
3+
// Altimate Base auto-registers with no consent gate — this text is shown once, as a notice, either
4+
// right after registration or (for a headless surface) alongside it, not as a blocking prompt
5+
// before any credential is minted. It must still be identical everywhere it's shown. Two packages
6+
// render it and neither can import from the other: the TUI's onboarding notice (`packages/tui`)
7+
// and the HTTP disclosure route that serves hosts rendering their own notice (`packages/opencode`,
8+
// for the VS Code extension's chat panel). `packages/core` is the only module both already depend
9+
// on, so the constant lives here.
810
//
911
// A new leaf file rather than an addition to an existing core module, so it adds no upstream
1012
// rebase surface.
1113
//
1214
// It states the core data terms up front. The persistent per-install-id linkage detail is
1315
// disclosed in docs/docs/configure/providers.md ("Data handling") rather than repeated in the
14-
// gate (see #1268); keep the core terms in sync with that note.
16+
// notice (see #1268); keep the core terms in sync with that note.
1517
export const ALTIMATE_BASE_DISCLOSURE =
1618
"Altimate Base is free and requires no signup. Requests and responses may be logged and used to improve Altimate's products, including the model. Secrets are automatically masked before storage, but don't rely on it — avoid sending secrets or confidential code. Usage can be rate limited."
1719

‎packages/opencode/src/cli/cmd/agent.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ const AgentCreateCommand = effectCmd({
162162
description = query
163163
}
164164

165+
// altimate_change start — auto-register Altimate Base before provider state is first built,
166+
// mirroring cli/cmd/run.ts. Without this, a fresh install's first `agent create` resolves
167+
// the default model before any provider is registered and fails with a raw upstream error.
168+
{
169+
const { FreeTier } = await import("../../altimate/free/client")
170+
const { FreeTierConsent } = await import("../../altimate/free/consent")
171+
const result = await FreeTier.autoRegisterWithin(undefined, () => void FreeTierConsent.printDisclosureOnceForHeadless(true))
172+
await FreeTierConsent.printDisclosureOnceForHeadless(result.status === "registered")
173+
}
174+
// altimate_change end
175+
165176
// Generate agent
166177
const spinner = prompts.spinner()
167178
spinner.start("Generating agent configuration...")

‎packages/opencode/src/cli/cmd/review.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ export const ReviewCommand = cmd({
7676
)
7777
}
7878
await bootstrap(cwd, async () => {
79+
// altimate_change start — auto-register Altimate Base before the AI lane resolves a
80+
// provider, mirroring cli/cmd/run.ts. Without this, a fresh install's `altimate review`
81+
// (including the `--post --mode gate` CI path) fails the AI lane's Provider.defaultModel()
82+
// silently — no provider was ever registered — and the deterministic verdict ships with
83+
// zero AI findings and no visible signal. Kept outside the latency timer below.
84+
{
85+
const { FreeTier } = await import("../../altimate/free/client")
86+
const { FreeTierConsent } = await import("../../altimate/free/consent")
87+
const result = await FreeTier.autoRegisterWithin(undefined, () => void FreeTierConsent.printDisclosureOnceForHeadless(true))
88+
await FreeTierConsent.printDisclosureOnceForHeadless(result.status === "registered")
89+
}
90+
// altimate_change end
91+
7992
// altimate_change — time the engine only. Output writing and posting happen after this and
8093
// must not be counted as review latency, nor turn a computed review into a failed one.
8194
const startedAt = Date.now()

‎packages/opencode/src/cli/cmd/tui.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,16 @@ export const TuiThreadCommand = cmd({
170170
// altimate_change start — auto-register Altimate Base before the worker is spawned. The
171171
// worker starts loading instance/provider state as soon as it boots (worker.ts's
172172
// `traceReady` chain), so this has to land on the parent thread first.
173-
await FreeTier.autoRegisterWithin()
173+
//
174+
// A fresh install's first launch can take up to the 3s wait with zero terminal output,
175+
// which reads as a hang. Gate the status line behind a short delay so the common
176+
// already-registered path (near-instant) never flashes it.
177+
const registerFeedback = setTimeout(() => UI.println("Connecting to Altimate Base…"), 300)
178+
try {
179+
await FreeTier.autoRegisterWithin()
180+
} finally {
181+
clearTimeout(registerFeedback)
182+
}
174183
// altimate_change end
175184
// altimate_change start — hand the launch correlation id to the worker explicitly. A Bun
176185
// Worker does not see runtime mutations to process.env, so without this the worker mints its

‎packages/opencode/test/altimate/entrypoint-late-notice-wiring.test.ts‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,18 @@ function autoRegisterWithinArgs(source: string): string | null {
4444
const REAL_CALLBACK = /\(\)\s*=>[\s\S]{0,80}?printDisclosureOnceForHeadless\(true\)/
4545

4646
describe("autoRegisterWithin() late-notice callback wiring per entrypoint", () => {
47-
test.each(["run.ts", "acp.ts", "web.ts"])("%s always passes a real onLateRegistration callback", (file) => {
48-
const source = read(file)
49-
const args = autoRegisterWithinArgs(source)
50-
expect(args, `${file} must call autoRegisterWithin()`).not.toBeNull()
51-
expect(args, `${file}'s autoRegisterWithin() call`).toMatch(REAL_CALLBACK)
52-
// Guards against a regression that passes the callback conditionally (that's serve.ts's job,
53-
// not these three) — none of them may reference ALTIMATE_CLI_CLIENT or ternary out.
54-
expect(args, `${file} must not gate its callback like serve.ts does`).not.toMatch(/\?\s*\(\)\s*=>/)
55-
})
47+
test.each(["run.ts", "acp.ts", "web.ts", "agent.ts", "review.ts"])(
48+
"%s always passes a real onLateRegistration callback",
49+
(file) => {
50+
const source = read(file)
51+
const args = autoRegisterWithinArgs(source)
52+
expect(args, `${file} must call autoRegisterWithin()`).not.toBeNull()
53+
expect(args, `${file}'s autoRegisterWithin() call`).toMatch(REAL_CALLBACK)
54+
// Guards against a regression that passes the callback conditionally (that's serve.ts's
55+
// job, not these five) — none of them may reference ALTIMATE_CLI_CLIENT or ternary out.
56+
expect(args, `${file} must not gate its callback like serve.ts does`).not.toMatch(/\?\s*\(\)\s*=>/)
57+
},
58+
)
5659

5760
test("serve.ts passes a real callback when NOT serving the datamates (VS Code) client", () => {
5861
const source = read("serve.ts")
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/**
2+
* Adversarial coverage for the v0.12.3 release payload (v0.12.2..HEAD): the Altimate Base
3+
* no-consent-gate PR (#1361, 429/49 tests of its own — see the entrypoint-late-notice-wiring
4+
* pin) plus the routing-pin fix, PLUS the two P0s and P1 found by this release's own
5+
* multi-persona review and fixed here:
6+
*
7+
* - `altimate agent create` and `altimate review` never called `FreeTier.autoRegisterWithin()`
8+
* before resolving a provider (Chaos Gremlin/Support Engineer persona, both P0): a fresh
9+
* install's first `agent create` or `review` run failed with a raw upstream error / silently
10+
* produced zero AI findings, because no provider had ever been registered.
11+
* - `tui.ts`'s up-to-3s auto-register wait gave zero terminal feedback on a fresh install
12+
* (End User persona, P1): reads as a hang on the very first launch.
13+
*
14+
* This file does NOT re-test PR #1361's own extensive coverage (stale-zen-cycle,
15+
* altimate-base-auto-register, altimate-base-headless-disclosure, routing-pin, etc. — all
16+
* re-run and confirmed green during this release's Step 5/5c). It targets only the NEW code
17+
* from this release's fixes, following the source-assertion pattern already established in
18+
* test/altimate/entrypoint-late-notice-wiring.test.ts for these same Effect-based / heavy CLI
19+
* command files.
20+
*/
21+
import { describe, test, expect } from "bun:test"
22+
import { readFileSync } from "fs"
23+
import { join, resolve } from "path"
24+
25+
const cmdDir = resolve(import.meta.dir, "..", "..", "src", "cli", "cmd")
26+
27+
function read(file: string): string {
28+
return readFileSync(join(cmdDir, file), "utf-8")
29+
}
30+
31+
describe("v0.12.3: agent.ts / review.ts auto-register ordering", () => {
32+
test("agent.ts registers Altimate Base BEFORE resolving/calling Agent.generate", () => {
33+
const source = read("agent.ts")
34+
const registerIdx = source.indexOf("autoRegisterWithin(")
35+
const generateIdx = source.indexOf("agentSvc.generate(")
36+
expect(registerIdx, "agent.ts must call autoRegisterWithin()").toBeGreaterThan(-1)
37+
expect(generateIdx, "agent.ts must call agentSvc.generate()").toBeGreaterThan(-1)
38+
// Registering AFTER the model/provider is already being resolved defeats the fix: a fresh
39+
// install would still hit the unregistered path on its first LLM call.
40+
expect(registerIdx, "registration must precede the generate() call, not follow it").toBeLessThan(generateIdx)
41+
})
42+
43+
test("agent.ts's registration call is not swallowed inside the generate() error handler", () => {
44+
const source = read("agent.ts")
45+
// The existing `.catch((error) => { spinner.stop(...) ... })` on agentSvc.generate() must
46+
// stay scoped to the generate call only — folding registration into that same try/catch
47+
// would mask a registration failure as a generic "LLM failed to generate agent" message.
48+
const catchIdx = source.indexOf(".catch((error) => {")
49+
const registerIdx = source.indexOf("autoRegisterWithin(")
50+
expect(catchIdx, "the existing generate() catch handler must still be present").toBeGreaterThan(-1)
51+
expect(registerIdx).toBeLessThan(catchIdx)
52+
})
53+
54+
test("review.ts registers Altimate Base BEFORE reviewPullRequest AND outside the latency timer", () => {
55+
const source = read("review.ts")
56+
const registerIdx = source.indexOf("autoRegisterWithin(")
57+
const reviewCallIdx = source.indexOf("await reviewPullRequest({")
58+
const timerIdx = source.indexOf("const startedAt = Date.now()")
59+
expect(registerIdx, "review.ts must call autoRegisterWithin()").toBeGreaterThan(-1)
60+
expect(reviewCallIdx, "review.ts must call reviewPullRequest()").toBeGreaterThan(-1)
61+
expect(timerIdx, "review.ts must still time the engine via startedAt").toBeGreaterThan(-1)
62+
expect(registerIdx, "registration must precede the review call").toBeLessThan(reviewCallIdx)
63+
// A registration wait folded into the timed region would inflate every review_run latency
64+
// metric on a fresh install (or after a credential rotation) with startup cost that has
65+
// nothing to do with the review engine itself.
66+
expect(registerIdx, "registration must be excluded from the engine latency timer").toBeLessThan(timerIdx)
67+
})
68+
69+
test("review.ts's registration call runs even when --no-ai is set (matches R1: registers regardless of the caller's own model)", () => {
70+
const source = read("review.ts")
71+
const registerIdx = source.indexOf("autoRegisterWithin(")
72+
const noAiCheckIdx = source.indexOf("noAi:")
73+
expect(registerIdx).toBeGreaterThan(-1)
74+
// The registration call must be unconditional — not gated behind `!args.noAi` — so the
75+
// CI `--post --mode gate` deterministic-only path still benefits the NEXT invocation that
76+
// does use the AI lane. Asserted by requiring no `noAi`/`args.ai` reference appears between
77+
// the register call and its own closing brace.
78+
const blockEnd = source.indexOf("// altimate_change end", registerIdx)
79+
const between = source.slice(registerIdx, blockEnd)
80+
expect(between, "the registration block must not branch on noAi/args.ai").not.toMatch(/noAi|args\.ai\b/)
81+
expect(noAiCheckIdx).toBeGreaterThan(blockEnd)
82+
})
83+
})
84+
85+
describe("v0.12.3: tui.ts startup-feedback timer", () => {
86+
function readTui(): string {
87+
return readFileSync(join(cmdDir, "tui.ts"), "utf-8")
88+
}
89+
90+
test("the feedback timer is gated behind a short, non-zero delay (never fires instantly)", () => {
91+
const source = readTui()
92+
const match = source.match(/setTimeout\(\(\) => UI\.println\("Connecting to Altimate Base…"\), (\d+)\)/)
93+
expect(match, "tui.ts must set a delayed status line before autoRegisterWithin()").not.toBeNull()
94+
const delayMs = Number(match![1])
95+
// Zero (or missing) would flash on every launch, including the fast/already-registered
96+
// path this delay exists to protect; too long would defeat the "no feedback during a
97+
// fresh-install hang" fix End User flagged. Bounded to a sane window around the ~250-300ms
98+
// suggestion rather than pinned to one exact value.
99+
expect(delayMs).toBeGreaterThan(0)
100+
expect(delayMs).toBeLessThanOrEqual(500)
101+
})
102+
103+
test("the feedback timer is always cleared, even if autoRegisterWithin() throws", () => {
104+
const source = readTui()
105+
const start = source.indexOf("const registerFeedback = setTimeout(")
106+
expect(start, "must find the registerFeedback timer declaration").toBeGreaterThan(-1)
107+
const scope = source.slice(start, start + 400)
108+
// Must be a try/finally around the await, not a bare await — a throw from
109+
// autoRegisterWithin() (it currently never throws, but must not be relied upon) would
110+
// otherwise leak the timer and could still print the status line after the process is
111+
// already tearing down.
112+
expect(scope).toMatch(/try\s*\{[\s\S]*?await FreeTier\.autoRegisterWithin\(\)[\s\S]*?\}\s*finally\s*\{[\s\S]*?clearTimeout\(registerFeedback\)/)
113+
})
114+
115+
test("autoRegisterWithin() is still called with no arguments in tui.ts (unchanged contract: TUI renders its own onboarding, no headless callback)", () => {
116+
const source = readTui()
117+
// Regression guard: wrapping the call in a delayed-feedback block must not have also,
118+
// accidentally, started passing a headless disclosure callback — the TUI's own
119+
// useAltimateBaseDisclosureNotice() owns that surface; a second notice source here would
120+
// double-print.
121+
expect(source).toMatch(/await FreeTier\.autoRegisterWithin\(\)\s*$/m)
122+
})
123+
})

0 commit comments

Comments
 (0)