Skip to content

Commit e675b3c

Browse files
anandgupta42claude
andcommitted
release: v0.9.7
- fix(core): ripgrep record-level error isolation (#1094) - fix(codex): gpt-5.5/gpt-5.6 allowlist (#1133, closes #1132) - fix(models): models.dev catalog crash/poison hardening (#1085) - feat(workspace): Workspaces pilot — post-scan prompt, `link` subcommand, browser-based handoff, cloud memory mirroring (#1099, #1100, #1116, #1123), all gated behind ALTIMATE_WORKSPACE=1 (off by default) - chore(hygiene): pre-push tracker-leak scanner, build staleness stamp (#1085) Plus release-review-driven fixes: - disclose memory sync at workspace bind time (TUI + all 3 CLI bind paths) - fix project_name leaking into browser-handoff URL query string - add DNS-rebinding Host-header test + AbortSignal cancellation tests - harden Provider.state() against a malformed models.dev catalog entry - widen tracker-leak scanner with an internal-hostname rule - cross-reference ALTIMATE_WORKSPACE vs OPENCODE_EXPERIMENTAL_WORKSPACES - document the `link` subcommand in docs/docs/usage/cli.md - add release adversarial test suite (ripgrep record edge cases, mergeOverlay, memory-read scope confusion, refresh concurrency) Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VEDkZvEvmHSS3SWuJ7tDAh
1 parent ca9b34a commit e675b3c

12 files changed

Lines changed: 873 additions & 24 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ 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.9.7] - 2026-08-25
9+
10+
Grep/search reliability fix for everyone, a Codex model-picker unblock, and a first, opt-in look at Workspaces — shared project binding with cloud-synced memory.
11+
12+
### Fixed
13+
14+
- **`grep`/`glob` no longer return nothing because of a single bad match.** One oversized, unparseable, or non-UTF-8 ripgrep record — a minified bundle, a source map, a one-line JSON/CSV fixture, anywhere in the searched tree — used to fail the entire search stream and silently discard every match already found in unrelated files. Telemetry showed 74 machines / 83 sessions over 7 days on v0.9.3/v0.9.4. Records are independent of their neighbours, so a bad one is now logged and skipped instead of aborting the rest of the search; the same fix landed in the legacy `/find` parser, and an invalid search pattern now correctly returns HTTP 400 instead of 500. (#1094)
15+
- **ChatGPT Pro/Plus (Codex tier) users can pick `gpt-5.5` and `gpt-5.6`.** Both were live on OpenAI's side already, but the fork's OAuth allowlist hadn't been bumped past `gpt-5.4-mini` — any snapshot model not on the allowlist (and not containing "codex") was silently deleted from the picker before it ever reached you. Fixed; API-tier-only variants (`pro`, `luna`, `sol`, `terra`) stay out until confirmed available on the subscription tier. (#1133, closes #1132)
16+
- **The models.dev catalog cache no longer crashes or poisons itself on a bad response.** A non-JSON or malformed 2xx body is now rejected before it's parsed or cached, instead of throwing mid-load or writing garbage the next run would trust. The unconditional fetch that used to run at module import — the cause of a v0.9.4 CI hang under restricted DNS — is gone; short-lived commands now rely on the bundled snapshot / disk cache rather than a live network call, so models added to models.dev between releases won't show up in short-lived commands until the next release. A narrower hang path can still occur in dev-mode builds without the bundled snapshot (tracked in #1144). (#1085)
17+
18+
### Added
19+
20+
- **Workspaces — pilot, opt-in via `ALTIMATE_WORKSPACE=1`, off by default.** A first look at linking a project to a shared Altimate workspace: a post-scan prompt plus a new `altimate-code link` subcommand to create or bind one, a browser-based setup handoff, and memory blocks that sync to the bound workspace so a team shares context. Nothing about this is visible unless the pilot flag is set — no new prompts, network calls, or CLI surface for anyone not opted in. Binding now explicitly tells you that saved memory blocks sync to the workspace if memory is enabled for it. (#1099, #1100, #1116)
21+
- **`altimate_memory_refresh` tool.** Ask the CLI mid-session to re-fetch workspace memory instead of waiting for a new session — closes a gap where a running session could never pick up a memory block written after it started. `altimate_memory_read` now shows the same workspace-merged view the model actually sees, rather than local content only. (#1123)
22+
23+
### Changed
24+
25+
- **Public-repo hygiene: a pre-push scan for internal tracker references, and a hardened build-staleness guard.** A local pre-push hook scans branch names, commit messages, and diff content for Jira-key-shaped and known internal-hostname references before they can land in the public repo (no CI-side backstop yet — local hook only, tracked in #1141). The staleness guard behind the release smoke test now hashes every embedded build input — workspace packages, `tsconfig.json`, the lockfile — instead of only walking `src/`/`script/` mtimes, closing several ways a binary could go stale without the guard noticing. (#1085)
26+
827
## [0.9.6] - 2026-08-23
928

1029
Correctness release: `check --checks {validate,semantic,grade,pii,safety,policy}` and the `altimate-core-*` tools (`migration`, `compare`, `track-lineage`, `query-pii`, `classify-pii`) now tell you the truth. Several previously returned false-clean or wrong output — teams gating CI on `check --fail-on error|warning` may see new failures on unchanged SQL. **These are real findings the tool previously missed, not regressions in your code.** Also fixes a data-hygiene bug where truncated tool-output files were being deleted the moment they were written.

‎docs/docs/usage/cli.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ altimate --agent analyst
3939
| `export` | Export session data |
4040
| `import` | Import session data |
4141
| `session` | Session management |
42+
| `link` | Link this project to an Altimate workspace (pilot, requires `ALTIMATE_WORKSPACE=1`) |
4243
| `trace` | List and view session traces (recordings of agent sessions) |
4344
| `github` | GitHub integration |
4445
| `pr` | Pull request tools |

‎packages/core/src/flag/flag.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const Flag = {
6161
OPENCODE_DB: process.env["OPENCODE_DB"],
6262

6363
OPENCODE_WORKSPACE_ID: process.env["OPENCODE_WORKSPACE_ID"],
64+
// Unrelated to ALTIMATE_WORKSPACE (SaaS project-binding pilot) — this gates upstream's multi-instance/worktree control plane.
6465
OPENCODE_EXPERIMENTAL_WORKSPACES: enabledByExperimental("OPENCODE_EXPERIMENTAL_WORKSPACES"),
6566

6667
// altimate_change start — pilot flag for the Workspaces feature (post-scan prompt +
@@ -71,6 +72,7 @@ export const Flag = {
7172
// ``enabledByExperimental`` would). The pilot ships behind its own explicit
7273
// gate so users already opted into other experimental features don't get
7374
// this one turned on for them. (Kilo cycle 6.)
75+
// Unrelated to OPENCODE_EXPERIMENTAL_WORKSPACES (multi-instance control plane) — this gates the SaaS project-binding pilot.
7476
get ALTIMATE_WORKSPACE() {
7577
return truthy("ALTIMATE_WORKSPACE")
7678
},

‎packages/opencode/src/altimate/workspace/browser-handoff.ts‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ export type HandoffResult = HandoffSuccess | HandoffFailure
156156
export function resolveWorkspaceWebUrl(altimateUrl: string, tenant: string): URL | null {
157157
const override = process.env["ALTIMATE_WORKSPACE_WEB_URL"]
158158
if (override) {
159+
log.warn("ALTIMATE_WORKSPACE_WEB_URL dev override is set; skipping tenant-scoped URL resolution", {
160+
override,
161+
})
159162
try {
160163
const u = new URL(override)
161164
if (u.protocol !== "http:" && u.protocol !== "https:") return null
@@ -526,12 +529,12 @@ export async function runHandoffWithOpener(
526529
target.searchParams.set("client", "altimate-code")
527530
target.searchParams.set("redirect", redirect)
528531
target.searchParams.set("state", state)
529-
target.searchParams.set("project_name", input.projectName)
530-
// Project path + remote go in the URL FRAGMENT, not the query, so
531-
// they don't land in SaaS access logs, WAF logs, or browser history
532-
// as query params. Same rationale as ``cli_context`` in altimate.ts
533-
// (see altimate.ts:135-137). (m6)
532+
// project_name, project path, and remote go in the URL FRAGMENT, not
533+
// the query, so they don't land in SaaS access logs, WAF logs, or
534+
// browser history as query params. Same rationale as ``cli_context``
535+
// in altimate.ts (see altimate.ts:135-137). (m6)
534536
const fragment = new URLSearchParams()
537+
fragment.set("project_name", input.projectName)
535538
if (input.identifier.repoRemote) fragment.set("project_remote", input.identifier.repoRemote)
536539
if (input.identifier.projectPath) fragment.set("project_path", input.identifier.projectPath)
537540
if (cliContext) fragment.set("cli_context", cliContext)

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async function runBrowserHandoff(
214214
directory: string,
215215
): Promise<void> {
216216
const spin = prompts.spinner()
217-
spin.start("Waiting for browser approval...")
217+
spin.start("Waiting for browser approval (up to 15 min)...")
218218
const result: HandoffResult = await openWorkspaceBrowserHandoff({ identifier, projectName })
219219
if (!result.ok) {
220220
spin.stop(handoffFailureMessage(result), 1)
@@ -262,6 +262,7 @@ async function runBrowserHandoff(
262262
linkedAt: Date.now(),
263263
}, { awaitBackfill: true })
264264
bindSpin.stop(`Linked to "${res.binding.datamate_name}".`)
265+
prompts.log.info("Saved memory blocks will sync to this workspace if memory is enabled for it.")
265266
const manageUrl = await manageUrlFor(res.binding.datamate_id)
266267
if (manageUrl) prompts.log.info(`Manage it at: ${manageUrl}`)
267268
prompts.outro("Done.")
@@ -387,6 +388,7 @@ async function createThenBindOrRebind(
387388
projectPath: created.binding.project_path,
388389
linkedAt: Date.now(),
389390
}, { awaitBackfill: true })
391+
prompts.log.info("Saved memory blocks will sync to this workspace if memory is enabled for it.")
390392
prompts.log.info(`Manage it at: ${created.manage_url}`)
391393
// Guard against a server that hands back a non-http(s) manage_url — ``open``
392394
// delegates to the OS handler, so a rogue value could launch an unrelated
@@ -511,6 +513,7 @@ async function bindOrRebind(
511513
? `Re-linked to "${res.binding.datamate_name}".`
512514
: `Linked to "${res.binding.datamate_name}".`,
513515
)
516+
prompts.log.info("Saved memory blocks will sync to this workspace if memory is enabled for it.")
514517
const manageUrl = await manageUrlFor(res.binding.datamate_id)
515518
if (manageUrl) prompts.log.info(`Manage it at: ${manageUrl}`)
516519
prompts.outro("Done.")

‎packages/opencode/src/plugin/tui/altimate/workspace.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ interface LinkedProps {
259259
function WorkspaceLinkedDialog(props: LinkedProps) {
260260
const title = () => {
261261
const suffix = props.manageUrl ? ` — ${props.manageUrl}` : ""
262-
return `${props.verb} workspace "${props.workspaceName}"${suffix}`
262+
// DialogSelect doesn't take a top-level description block, so the
263+
// memory-sync disclosure is packed into the title, matching the
264+
// AlreadyLinkedDialog convention above.
265+
return `${props.verb} workspace "${props.workspaceName}"${suffix} — Saved memory blocks will sync to this workspace if memory is enabled for it.`
263266
}
264267
const options = () => {
265268
if (props.manageUrl) {
@@ -341,7 +344,8 @@ async function runBrowserHandoff(
341344
api.ui.dialog.clear()
342345
api.ui.toast({
343346
variant: "info",
344-
message: "Opening browser to set up your workspace — approve there, then check back here for the confirmation.",
347+
message:
348+
"Opening browser to set up your workspace (up to 15 min) — approve there, then check back here for the confirmation.",
345349
})
346350
// Supersede any still-open handoff before starting a new one.
347351
if (activeHandoffAbort) activeHandoffAbort.abort()

‎packages/opencode/src/provider/models-catalog.ts‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,36 @@
1818
// cache on it meant nothing was ever cached and every load fell through to a
1919
// network fetch, which hangs in sandboxed CI. So the check asserts only what
2020
// consumers actually rely on: a non-empty map whose values are provider objects
21-
// carrying a `models` map.
21+
// carrying a string `id` and a `models` map.
2222
//
2323
// Module shape follows packages/opencode/AGENTS.md: flat exports plus a
2424
// self-reexport, not `export namespace`.
2525

26+
// altimate_change start — upstream_fix: `isCatalog` only required one entry in
27+
// the map to be well-formed before caching (and trusting) the whole catalog.
28+
// `Provider.state()` then unconditionally maps every entry through
29+
// `fromModelsDevProvider`, which reads `provider.id` and `provider.models`
30+
// with no validation of its own — a single malformed entry (e.g. from a
31+
// misbehaving proxy mixing garbage with real data) crashed `Provider.state()`
32+
// for every provider, not just the bad one. `isCatalogEntry` is the per-entry
33+
// predicate, extracted so callers can filter individual entries with the same
34+
// rule `isCatalog` uses to gate the whole map.
35+
/** True when `entry` is shaped like a single models.dev provider entry. */
36+
export function isCatalogEntry(entry: unknown): entry is { id: string; models: Record<string, unknown> } {
37+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return false
38+
const id = Reflect.get(entry, "id")
39+
if (typeof id !== "string") return false
40+
const models = Reflect.get(entry, "models")
41+
return !!models && typeof models === "object" && !Array.isArray(models)
42+
}
43+
// altimate_change end
44+
2645
/** True when `value` is shaped like a models.dev catalog rather than junk. */
2746
export function isCatalog(value: unknown): value is Record<string, unknown> {
2847
if (!value || typeof value !== "object" || Array.isArray(value)) return false
2948
const entries = Object.values(value)
3049
if (entries.length === 0) return false
31-
return entries.some((entry) => {
32-
if (!entry || typeof entry !== "object" || Array.isArray(entry)) return false
33-
const models = Reflect.get(entry, "models")
34-
return !!models && typeof models === "object" && !Array.isArray(models)
35-
})
50+
return entries.some(isCatalogEntry)
3651
}
3752

3853
/** Parse a models.dev response body, returning undefined unless it is a catalog. */

‎packages/opencode/src/provider/provider.ts‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Hash } from "../util/hash"
1616
import { Plugin } from "../plugin"
1717
import { NamedError } from "@opencode-ai/core/util/error"
1818
import { ModelsDev } from "./models"
19+
import { ModelsCatalog } from "./models-catalog"
1920
import { Auth } from "../auth"
2021
import { Env } from "../env"
2122
// altimate_change start — bridge Effect InstanceRef into legacy Instance ALS for Provider.Service methods
@@ -1116,7 +1117,23 @@ export namespace Provider {
11161117
using _ = log.time("state")
11171118
const config = await Config.get()
11181119
const modelsDev = await ModelsDev.get()
1119-
const database = mapValues(modelsDev, fromModelsDevProvider)
1120+
// altimate_change start — upstream_fix: `ModelsCatalog.isCatalog` only
1121+
// requires ONE entry in the map to be well-formed before the whole
1122+
// catalog is cached and trusted (see models-catalog.ts). A single
1123+
// malformed entry alongside otherwise-valid ones (e.g. a misbehaving
1124+
// proxy mixing garbage with real data) would reach `fromModelsDevProvider`
1125+
// unvalidated and crash `Provider.state()` for every provider, not just
1126+
// the bad one. Re-screen each entry here with the same predicate so a
1127+
// malformed one is dropped instead of taking down the whole map.
1128+
const validModelsDev = Object.fromEntries(
1129+
Object.entries(modelsDev).filter(([providerID, entry]) => {
1130+
if (ModelsCatalog.isCatalogEntry(entry)) return true
1131+
log.error("models.dev entry is malformed; skipping", { providerID })
1132+
return false
1133+
}),
1134+
) as typeof modelsDev
1135+
const database = mapValues(validModelsDev, fromModelsDevProvider)
1136+
// altimate_change end
11201137

11211138
const disabled = new Set(config.disabled_providers ?? [])
11221139
const enabled = config.enabled_providers ? new Set(config.enabled_providers) : null

0 commit comments

Comments
 (0)