You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: line-by-line audit of v1.4.0 bridge merge regressions
Comprehensive audit found 16 user-impacting regressions across 28 files.
Fixes batched here. Each change is wrapped in altimate_change markers
(`upstream_fix:` tag) so the next bridge merge re-evaluates them.
CRITICAL — would crash or hang at runtime
- `control-plane/workspace-router-middleware.ts` — `(adaptor as any).fetch(...)`
threw TypeError when `OPENCODE_EXPERIMENTAL_WORKSPACES=1`. The Adaptor API was
renamed `fetch → target` in v1.4.0; the misleading marker comment said the
opposite. Rewrote to use `adaptor.target()` + `ServerProxy.http()` (same
pattern as `src/server/router.ts:98`); skip routing for local targets so they
fall through to next().
HIGH — user-visible regressions
- `cli/cmd/serve.ts`, `web.ts`, `uninstall.ts` — describe/log strings said
"opencode server" / "opencode" (yargs help text shown to every user).
- `cli/error.ts` — three error messages referenced `opencode` /
`opencode models` / `opencode.json`.
- `cli/cmd/tui/component/dialog-status.tsx` — auth hint said
"run: opencode mcp auth".
- `cli/cmd/mcp.ts` — `Remote MCP servers ... opencode.json` info text;
`opencode x ...` placeholder; `opencode-debug` MCP client name (sent to MCP
servers as the client identity); resolveConfigPath wrote new MCP entries to
`opencode.json`. Restored main's `altimate-code.json` precedence with
`opencode.json` as fallback for existing installs.
- `cli/cmd/tui/component/error-component.tsx` — bug-report titles prefixed
"opentui: fatal:" instead of "altimate-code: fatal:".
- `cli/ui.ts` — non-TTY path used a hardcoded "opencode" wordmark for piped
output / CI logs / the WebCommand banner. Replaced with the same
ALTIMATE | CODE glyphs used by the TTY path (sans ANSI).
- `cli/cmd/github.ts` — sweeping brand revert: `AGENT_USERNAME`,
`WORKFLOW_FILE` (committed to user repos), GitHub App slug, provider
priority key, workflow YAML name + job + mention triggers + step name,
console logs, OIDC audience, branch prefix, share-image URL, share link
text, "opencode infrastructure" in the system prompt. Verified domain
changes (`altimate-code.dev` → `altimate.ai`) match the rest of our
codebase and are intentional — kept those.
- `server/routes/global.ts` — new `/upgrade` route OpenAPI summary +
description said "opencode" (ships in SDK codegen).
- `plugin/codex.ts` — three User-Agent strings sent to OpenAI auth servers
reverted to `opencode/${VERSION}`; OAuth refresh retry loop (3 attempts,
4xx-vs-5xx aware) removed; 30s token-expiry skew buffer removed.
- `session/.../message-v2.ts` (via `util/error.ts`) — opaque-error
augmentation from PR #118/#133 replaced with bare `errorMessage(e)`, which
only handles empty messages, not bare-name messages like "Error" /
matching `error.name`. Centralized the augmentation in `errorMessage()` so
every caller benefits, plus 4 new tests.
- `provider/models.ts` — `setTimeout(..., 0)` deferral on initial refresh was
removed, re-introducing the circular-dep risk that altimate commit
`980efaab64` was added to fix.
- `project/bootstrap.ts` — `Truncate.init()` call dropped. Without it the
hourly scheduler that prunes `Global.Path.data/tool-output/tool_*` never
registers, so the directory grows unboundedly.
MEDIUM — observability / robustness
- `cli/cmd/tui/util/clipboard.ts` (6 sites) — `Log.Default.debug` replaced
with `console.log`, which writes directly to the terminal mid-render and
corrupts the TUI display. Restored structured logger.
- `cli/cmd/tui/component/dialog-workspace-list.tsx` — same pattern, plus a
stray `console.log(JSON.stringify(result, null, 2))` debug-print of every
workspace creation result. Removed. Restored "workspace created" info log.
- `cli/cmd/tui/component/dialog-mcp.tsx` — same pattern.
- `control-plane/workspace.ts` — fetch lost its defensive
`.catch(() => undefined)`, so a transient network blip kills the SSE
reconnect loop forever; local workspaces also `return`ed out of the loop
permanently. Restored both.
- `plugin/install.ts` — new plugin installs wrote to `.opencode/opencode.json`
instead of `.altimate-code/altimate-code.json`. Now writes to
`.altimate-code/` for new installs, keeps using `.opencode/` if it exists
to avoid orphaning existing plugin configs.
LOW
- Catppuccin themes (3 variants) — `textMuted` darkened from `Subtext1` to
`Overlay2` (upstream a11y regression). Restored.
- `cli/cmd/tui/context/route.tsx` — navigate debug log dropped.
- `plugin/github-copilot/copilot.ts` (4 sites) — User-Agent reverted to
`opencode/${VERSION}`.
- `server/instance.ts:37` — `import("opencode-web-ui.gen.ts")` is dead in
our build (no embedded UI; we proxy to app.altimate.ai). Marker added so
the next merge knows it's intentional.
False positives flagged in audit but verified out of scope:
- `tool/plan.ts` PlanEnter `answer === "No"` — the entire PlanEnterTool is
commented out (`/* */`) in both main and current branch. Dead code.
- `cli/cmd/pr.ts` `spawn("opencode", ...)` — pre-existing in main, not a
v1.4.0 regression. Track separately.
Verified
- bun turbo typecheck — 5/5 packages clean
- bun test (focused: util, upstream, permission, server) — 553 pass / 0 fail
- Marker check — 107 warnings before/after (no new warnings introduced;
every edit wrapped in `altimate_change` markers)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments