Skip to content

chore(upstream): sync v2.0.30 (775d1d0d713) - #15136

Merged
marius-kilocode merged 177 commits into
v2from
sync-v2-0-30
Oct 16, 2026
Merged

marius-kilocode merged 177 commits into
v2from
sync-v2-0-30

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Upstream sync of the v2 line (#15020) to OpenCode v2.0.30. Previous sync: #15029 (v2.0.27).

Merge with 'Create a merge commit'. Do not squash or rebase. A squash drops the upstream ancestry, and the next sync conflicts again. The annotation check and the shared-patch counter also find the pinned upstream release from the merge commit message.

Release

Item Value
Target upstream v2.0.30, tag commit f16ef9ad887 (2026-10-15 19:48)
Merged commit release commit 775d1d0d713 (parent of the tag, on upstream/dev, newest v2.x.y tag at merge time)
Included releases v2.0.28 (044d8b7d2e5, 2026-10-13), v2.0.29 (3a69bae8459, 2026-10-14), v2.0.30 (775d1d0d713, 2026-10-15)
Previous pin v2.0.27 release commit 4d9678a79d6
Merge commit 3b7876cce03 chore(upstream): sync v2.0.30 (775d1d0d713)
Lag before 3 releases (v2.0.28, v2.0.29, v2.0.30), 3.6 days
Lag after 0 releases, 0 days
History added 171 upstream commits
Harness change 208 files, +8,101 / -2,250

Why three releases in one PR

The plan delta (migration-tracking/plans/v2-plan-delta-2026-10-13.md) asks for one PR per release. This PR merges three releases on purpose, because the Kilo shared diff is small. Per release, measured against the files Kilo changed since v2.0.27:

Release Commits Files changed upstream Overlap with Kilo-changed files
v2.0.28 59 866 (mostly the packages/console removal) publish.yml, bun.lock, package.json, packages/core/package.json, packages/core/test/tool-execute.test.ts
v2.0.29 48 209 bun.lock, package.json, packages/core/package.json
v2.0.30 64 480 bun.lock, package.json, packages/core/package.json, packages/tui/src/component/dialog-integration.tsx, turbo.json

Together, the three releases touch 7 Kilo-changed files, and only 2 of them conflict. Three stacked PRs would repeat the same checks, self-tests and CI three times for no extra isolation. The merge used --allow-skip.

How it was made

bun script/upstream/merge.ts --version v2.0.30 --base-branch HEAD --allow-skip on a fresh branch from origin/v2 (f6fc61ca7d9), with Bun 1.4.2 on PATH. The tool merged with --no-ff --no-commit, ran script/check-workflows.ts --fix, resolved the lock file, regenerated bun.lock with Bun 1.4.2, reported 2 unexpected workflows and stopped.

Conflicts and resolutions

File Kind Resolution
.github/workflows/publish.yml modify/delete Kept deleted (in removed). Done by the tool
bun.lock content Kept ours, regenerated with Bun 1.4.2. Done by the tool. The result is upstream's lock plus Kilo's two workspace packages (@kilocode/gateway-core, @kilocode/kilo-plugin), 31 added lines. bun install --frozen-lockfile reports no changes
.github/workflows/deploy-changelog.yml (v2.0.28) new upstream workflow Reviewed: on push to dev, it typechecks, tests and deploys upstream's services/changelog to Cloudflare. Guarded by github.repository == 'anomalyco/opencode'. Not for Kilo. Added to removed and deleted
.github/workflows/models-snapshot.yml (v2.0.30) new upstream workflow Reviewed: daily cron that refreshes packages/core/src/models-dev/snapshot.txt and pushes it to upstream dev. Guarded by github.repository == 'anomalyco/opencode', and it needs upstream's app secrets. Kilo models come from the Kilo Gateway. Added to removed and deleted

v2.0.29 adds no new workflow. Kilo's check.yml trigger and comment and its lint:changed condition are unchanged (upstream did not change check.yml in these releases). No code conflict. No upstream code was dropped.

Plugin-first check: no conflict hit a Kilo code patch, so no Kilo patch was re-applied or moved. packages/tui/src/component/dialog-integration.tsx (rung 3, chooseKiloAccount after a Kilo login) merged cleanly, although upstream moved the dialogs onto DialogLayout (anomalyco/opencode#55742). The Kilo hunk in connected() is unchanged.

Kilo changes kept

Kilo's diff against upstream was compared before the sync (4d9678a79d6..origin/v2, 235 files) and after it (775d1d0d713..HEAD, 236 files), file by file on the added and removed lines. All Kilo patches are identical. The only differences are intended:

  • deploy-changelog.yml and models-snapshot.yml: now deleted (see above).
  • script/check-workflows.ts: the two workflows added to removed.
  • packages/core/test/tool-execute.test.ts and script/upstream/shared-patches.json: skip removed, baseline lowered (see Tests).
  • publish.yml: still deleted. Only the upstream content that Kilo deletes changed.

Kilo-owned paths (packages/kilo-*, src/kilocode/, test/kilocode/), .github/ and .kilo/ have no change from upstream. Upstream changed its release scripts (script/publish.ts, script/release.ts, new script/publish-winget.ts), which no Kilo workflow calls. The new script/native-arch.ts is imported by packages/cli/script/build.ts and build-node.ts (anomalyco/opencode#54982), which test.yml runs; it verifies the native binary architecture after each build, and unit (linux) and unit (windows) pass with it.

Shared files touched

Kilo-patched shared files that upstream also changed: publish.yml (kept deleted), bun.lock (generated), package.json (auto-merged, Kilo's dev script unchanged), packages/core/package.json (auto-merged, @kilocode/gateway-core dependency unchanged), packages/tui/src/component/dialog-integration.tsx (auto-merged, see above), turbo.json (auto-merged, @kilocode/gateway-core#test unchanged), and packages/core/test/tool-execute.test.ts (skip removed).

Shared-patch counter against 775d1d0d713: 12 shared files, 45 marked lines, 17 unmarked lines, 0 deleted shared files, 28 deleted upstream workflows (not counted). Annotation check: ok (41 shared files). Against origin/v2, the skip removal lowers the limits by one file and one line, and the temporary Windows guard in test.yml (see CI) adds one marked line in an already patched file. The README.md progress-map patch came from v2 (#15138), merged into this branch in 67de2f7f05e.

What upstream removed

The diff deletes about 224k lines. Almost all of it is upstream's hosted backend, not CLI code:

Lines Upstream change What it removes
~184k b9ca4d21b4f refactor(console): remove legacy database from Console (anomalyco/opencode#54585) The PlanetScale MySQL database of upstream's hosted Console (user, account, auth, workspace, keys, Stripe billing, subscriptions, referrals, quota), with 170 migrations, and the Console routes that used it. Upstream moved to a new Console outside the repository
~18k 25053bbdc7d docs: replace old Zen and Go pages with V2 console docs (anomalyco/opencode#54761) Old Zen and Go docs in packages/web
~8k 4ffede49416 chore(console): remove unused translation strings (anomalyco/opencode#55093) Unused Console strings
~7k 9e687700741 chore: retire session sharing backend (anomalyco/opencode#55716) Upstream's share service (packages/enterprise, infra/enterprise.ts) and the session.share TUI command

Kilo v1 never used upstream's Console, packages/enterprise or packages/web, and Kilo sharing uses Kilo's own backend (app.kilo.ai/s). The local session database (packages/core/src/database) has a one-line change and no new migration. Note for the v1 port: v1 /share (TUI command, session.share event, share routes) has no v2 counterpart now, and needs a Kilo plugin command or a seam when it is ported.

Upstream behavior that affects Kilo

  • Managed config (fix(core): discover system configuration directory at lowest precedence anomalyco/opencode#54921, fix(core): give managed configuration highest precedence anomalyco/opencode#55267): the CLI now loads /Library/Application Support/opencode, /etc/opencode or %ProgramData%\opencode, and on macOS the MDM plist ai.opencode.managed. These managed settings load last and override all other config (packages/core/src/config.ts, "Managed settings load last"). packages/cli/src/server-process.ts does not pass system: false. On a machine with such a directory or profile, bun dev (script/dev-isolated.ts) is no longer fully isolated, and a Kilo build applies OpenCode's managed model, provider and policies settings. Follow-up (not in this sync PR): set Config.Options.system to the Kilo directories or false in the Kilo host. The test machine has no such directory, so the self-test is not affected.

Gateway impact

Checked for the open Gateway PRs #15072 and #15116:

Tests

Same commands on origin/v2 (f6fc61ca7d9) and on this branch: bun run test in each package, with OPENCODE_TEST_HOME and XDG_* in a temp directory, from detached worktrees outside the repository (local Bun 1.4.2, macOS).

Package origin/v2 This branch New failures
kilo-gateway-core 33 pass, 0 fail 33 pass, 0 fail 0
core 6595 pass, 13 fail 6616 pass, 13 fail 0 (same 13 tests)
cli 326 pass, 1 fail 329 pass, 1 fail 0 (same test)
server 82 pass, 0 fail 81 pass, 1 fail 0 (flake, see below)
tui 1465 pass, 0 fail 1488 pass, 0 fail 0
plugin 9 pass, 0 fail 9 pass, 0 fail 0

The failures in both columns are local-environment failures: Session.shell timing (6), shell compound syntax and process substitution with the local bash (7), and debug paths command (1).

server opens no file for HEAD and closes it when a download is aborted (test/fs.test.ts) failed once in the full run. Run alone, it passes 3 of 3 times on this branch, and on a pristine checkout of 775d1d0d713 it fails 1 of 3 times. Classified as an upstream flake.

packages/core/test/tool-execute.test.ts "execute rejects filesystem fetches" runs again: the second commit removes the temporary skip from #15029, because upstream fixed the test in anomalyco/opencode#54699 (e5f4bf4c241, in v2.0.28). Skipped tests: 0.

CI

e2e (windows) failed in Run app component tests. These are the OpenCode desktop GUI component tests (packages/app, hosted by Storybook), which Kilo does not ship and plans to remove. The cause is in v2.0.30, not in Kilo code:

  • v2.0.30 (4ea42c47df3, fix(session-ui): render user message attachments above text and admit inline files anomalyco/opencode#54650) aliases @tanstack/solid-query into packages/app/node_modules, which does not exist in the hoisted install of Windows CI (--linker hoisted in .github/actions/setup-bun/action.yml). Vite fails with Failed to resolve import "@tanstack/solid-query", reproduced locally with a hoisted install.
  • A port of upstream's main.ts fix (17229d24f56, chore(ci): speed up and stabilize the test workflow anomalyco/opencode#55866) got past that (13 tests passed), but then the Storybook dev server crashed under Bun on Windows (write after end, ERR_STREAM_WRITE_AFTER_END). Upstream fixed Windows component tests only with a larger CI restructure in the same commit (isolated install on Windows, split component jobs), after v2.0.30.
  • Upstream CI did not catch it: its e2e (windows) job for 775d1d0d713 skipped all app steps.
  • Resolution (617e5d07a48): the Storybook port is reverted, and the Run app component tests step runs on Linux only, with a marked kilocode_change guard in test.yml and a note in its shared-patches.json entry. Linux still runs all 119 app component tests, and Windows still runs the production e2e and session UI component suites. Remove the guard in the next sync, which brings 17229d24f56.

Flakes seen on the way (one occurrence each, no code change involved): e2e/regression/review.spec.ts:817 on Windows (Chromium native fullscreen on double click, fixed upstream in 17229d24f56), and e2e/regression/timeline-history.spec.ts:72 on Linux (scroll timing poll; the same app code passed on 31b0c65bc3d).

Verification

  • bun install --frozen-lockfile with Bun 1.4.2: no lock change.
  • bun script/check-workflows.ts: ok (3 workflows: check.yml, kilo-v2.yml, test.yml).
  • bun script/check-opencode-annotations.ts: ok (40 shared files against 775d1d0d713).
  • bun script/check-shared-patches.ts: ok (counts above).
  • bun typecheck in packages/kilo-gateway-core, packages/core, packages/plugin: pass. In packages/tui and packages/kilo-plugin: pass from a worktree outside the repository (see Tooling gaps).
  • bun run check from a worktree outside the repository: pass (37 of 37 tasks).
  • Self-test (D2), from the Agent Manager worktree at this branch's head, fresh KILO_V2_PROFILE per test, signed out:
    • env KILO_V2_PROFILE=$(mktemp -d) bun dev run --standalone --model kilo/kilo-auto/free "Reply with only the word ok.": ok, no level=ERROR log lines. Pass.
    • TUI with the skill harness (XDG_DATA_HOME empty): home screen shows Build · Auto Free Kilo Gateway. Pass.
    • Prompt What is 2 + 2? Reply with only the number.: answered 4. Pass.
    • Model picker (ctrl+x m): lists the Kilo free models (Auto Free, the Kilo (free) models). /connect search lists Kilo Gateway. Pass.
    • No level=ERROR lines in the CLI log. Pass.
    • bun dev models --standalone on this branch and on origin/v2: identical kilo/ list (14 models) and opencode/ list (12 models). Pass.
  • Limit: the chooseKiloAccount team chooser after /connect needs a real Kilo login, so it was not run. Its code merged without change, and typecheck passes.

Tooling gaps

  • Per-package bun typecheck in packages/tui, cli, server and kilo-plugin fails from .kilo/worktrees/* with node:zlib (zstdCompressSync) and node:module (registerHooks) errors. The worktree sits inside the main checkout, and TypeScript resolves the main checkout's older @types/node (22.13.9). From a worktree outside the repository these errors are gone. Not caused by the sync.
  • Per-package bun typecheck in packages/cli (5 errors) and packages/server (2 errors) also fails on a pristine upstream checkout of 775d1d0d713. bun run check (Turbo order) passes. Not caused by the sync.
  • merge.ts needs --allow-skip for a multi-release sync. This works as designed.
  • New upstream workflows need a manual review. This is by design.

opencode and others added 30 commits October 12, 2026 04:17
Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
…54047)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: uyencss <uyencss@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: Emre Şafak <3928300+esafak@users.noreply.github.com>
@github-actions github-actions Bot added area:cli CLI, TUI and core engine area:sdk SDK labels Oct 16, 2026
@socket-security

socket-security Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​bun-pty@​0.4.9 ⏵ 0.4.11100 +1100100 +191 +1100

View full report

Comment thread packages/app/src/workspaces/files/artifact.ts
Comment thread packages/app/src/session/timeline/turn-diffs.ts
Comment thread packages/console/app/src/lib/enterprise.ts
Comment thread packages/core/src/config/plugin/instruction.ts
@kilo-code-bot

kilo-code-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Incremental review of 617e5d07a4 (the only new commit after the previously reviewed ad7cd991df3) found no new issues. That commit reverted the temporary Storybook port in packages/storybook/.storybook/main.ts - the file is now byte-identical to the pinned upstream v2.0.30, so its shared-patches.json entry is correctly removed - and added a temporary runner.os == 'Linux' guard to the Run app component tests step in .github/workflows/test.yml. The guard is correct: the e2e matrix is linux/windows only, so it skips exactly the Windows job the PR describes. The lowered limits (files 13 to 12, markedLines 45) stay within the checker's max-limit semantics, and the removed test.skip marker offsets the new test.yml marker. The README.md npm rename to @opencode/cli matches packages/cli/package.json. The items below are the previous findings, re-verified as still present in current HEAD.

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
packages/app/src/workspaces/files/artifact.ts 22 MAX_MEDIA_BYTES raised to 256 MiB while the content cache budget is 20 MiB and open files are exempt from eviction; a single opened media file can keep up to 256 MiB resident.
packages/console/app/src/lib/enterprise.ts 100 Public form fields (message, name, role, company, phone, email, subject) interpolated unescaped into the SES HTML body and subject.

SUGGESTION

File Line Issue
packages/app/src/session/timeline/turn-diffs.ts 24 Per-tab turn-diff cache keeps every finished turn for the tab lifetime with no LRU/size cap.
packages/core/src/config/plugin/instruction.ts 144 Remote instructions URLs fetched server-side with no host restriction (SSRF / indirect prompt injection from a cloned repo config).
services/changelog/.wrangler/state/v3/cache/** 1 Local wrangler dev Miniflare cache (sqlite .shm/.wal + blob) is committed and services/changelog has no .gitignore covering .wrangler. Reported summary-only because the targets are binary (uncommentable); remove them and add services/changelog/.gitignore.
Files Reviewed (incremental + re-verified)
  • .github/workflows/test.yml - 0 new issues (Windows skip guard matches the linux/windows matrix)
  • packages/storybook/.storybook/main.ts - 0 new issues (equals upstream pin; shared-patches.json entry removal correct)
  • script/upstream/shared-patches.json - 0 new issues (limits consistent with the checker)
  • README.md - 0 new issues (upstream @opencode/cli rename correct)
  • packages/app/src/workspaces/files/artifact.ts - prior WARNING re-verified present
  • packages/console/app/src/lib/enterprise.ts - prior WARNING re-verified present
  • packages/app/src/session/timeline/turn-diffs.ts - prior SUGGESTION re-verified present
  • packages/core/src/config/plugin/instruction.ts - prior SUGGESTION re-verified present
  • services/changelog/.wrangler/state/v3/cache/** - prior SUGGESTION re-verified present

Fix these issues in Kilo Cloud

Previous Review Summaries (2 snapshots, latest commit ad7cd99)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit ad7cd99)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

Incremental review of ad7cd991df3 (the only commit after the previously reviewed 31b0c65bc3) touched two files: the temporary Storybook Vite-config port (packages/storybook/.storybook/main.ts) and its shared-patches.json entry. No new issues were found in that change: the port is a faithful, kilocode_change-marked backport of upstream 17229d24f56, the @tanstack/solid-query dedupe assumption holds (both packages/storybook and packages/app declare 5.91.4), glob entries are normalized and Windows-safe, and the raised limits (files 11→12, markedLines 33→74) match the added patch. The items below are the previous findings, re-verified as still present in current HEAD.

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
packages/app/src/workspaces/files/artifact.ts 22 MAX_MEDIA_BYTES raised to 256 MiB while the content cache budget is 20 MiB and open files are exempt from eviction; a single opened media file can keep up to 256 MiB resident.
packages/console/app/src/lib/enterprise.ts 100 Public form fields (message, name, role, company, phone, email, subject) interpolated unescaped into the SES HTML body and subject.

SUGGESTION

File Line Issue
packages/app/src/session/timeline/turn-diffs.ts 24 Per-tab turn-diff cache keeps every finished turn for the tab lifetime with no LRU/size cap.
packages/core/src/config/plugin/instruction.ts 144 Remote instructions URLs fetched server-side with no host restriction (SSRF / indirect prompt injection from a cloned repo config).
services/changelog/.wrangler/state/v3/cache/** 1 Local wrangler dev Miniflare cache (sqlite .shm/.wal + blob) is committed; services/changelog has no .gitignore covering .wrangler. Reported summary-only because the targets are binary (uncommentable). Remove these and add services/changelog/.gitignore.
Files Reviewed (incremental + re-verified)
  • packages/storybook/.storybook/main.ts - 0 new issues (temporary upstream port, reviewed fully)
  • script/upstream/shared-patches.json - 0 new issues (limits match the added patch)
  • packages/app/src/workspaces/files/artifact.ts - prior WARNING re-verified present
  • packages/console/app/src/lib/enterprise.ts - prior WARNING re-verified present
  • packages/app/src/session/timeline/turn-diffs.ts - prior SUGGESTION re-verified present
  • packages/core/src/config/plugin/instruction.ts - prior SUGGESTION re-verified present
  • services/changelog/.wrangler/state/v3/cache/** - prior SUGGESTION re-verified present

Fix these issues in Kilo Cloud

Previous review (commit 31b0c65)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

This is a mechanical upstream sync of v2.0.28–v2.0.30 (171 upstream commits, 1310 changed files). The sync-specific deltas were verified clean: .github/workflows is byte-identical to the base, the un-skipped packages/core/test/tool-execute.test.ts assertion matches packages/core/src/web.ts (now fetch cannot be used for filesystem access.), the two newly-removed upstream workflows (deploy-changelog.yml, models-snapshot.yml) are correctly added to script/check-workflows.ts removed, the shared-patch limits were lowered consistently, and the Kilo chooseKiloAccount hunk in dialog-integration.tsx is intact. The findings below are in changed (imported) code.

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 3
Issue Details (click to expand)

WARNING

File Line Issue
packages/app/src/workspaces/files/artifact.ts 22 MAX_MEDIA_BYTES raised to 256 MiB while the content cache budget is 20 MiB and open files are exempt from eviction; a single opened media file can keep up to 256 MiB resident.
packages/console/app/src/lib/enterprise.ts 100 Public form fields (message, name, role, company, phone, subject) interpolated unescaped into the SES HTML body and subject.

SUGGESTION

File Line Issue
packages/app/src/session/timeline/turn-diffs.ts 24 Per-tab turn-diff cache keeps every finished turn for the tab lifetime with no LRU/size cap.
packages/core/src/config/plugin/instruction.ts 144 Remote instructions URLs fetched server-side with no host restriction (SSRF / indirect prompt injection from a cloned repo config).
services/changelog/.wrangler/state/v3/cache/** 1 Local wrangler dev Miniflare cache (sqlite .shm/.wal + blob) is committed; services/changelog has no .gitignore covering .wrangler. Reported summary-only because the targets are binary (uncommentable). Remove these and add services/changelog/.gitignore.
Files Reviewed (1310 files, sharded)
  • Backend sync deltas - script/check-workflows.ts, script/upstream/shared-patches.json, packages/core/test/tool-execute.test.ts, package.json, packages/core/package.json, turbo.json, .github/workflows/* (no diff) - reviewed fully, 0 issues
  • packages/core, packages/ai, packages/schema, packages/protocol, packages/server, packages/sdk, packages/client, packages/plugin - 2 issues (1 warning, 1 suggestion)
  • packages/tui, packages/session-ui, packages/ui, packages/storybook - 0 issues
  • packages/app, packages/desktop, packages/gui-extensions, packages/web, sdks/vscode - 2 issues (1 warning, 1 suggestion)
  • packages/plugins, services/*, script/*, sst.config.ts, packages/stats, packages/enterprise - 1 issue (summary-only)
  • packages/console, packages/cli - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 94K · Output: 26K · Cached: 1.8M

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

➖ v2 migration progress: 0.1% → 0.1% (+4 done, 0 total, 0 dropped; 12/9854 cells)

Feature Before After Change
gateway 8/87 12/87 +4 modules done
4 cells closed
  • module:packages/kilo-gateway/src/api/modes.ts
  • module:packages/kilo-gateway/src/api/notifications.ts
  • module:packages/kilo-gateway/src/api/trpc.ts
  • module:packages/kilo-gateway/src/autocomplete.ts

v2 migration progress map at this commit

Full map · how cells close

@marius-kilocode
marius-kilocode merged commit 5b13cbb into v2 Oct 16, 2026
13 of 14 checks passed
@marius-kilocode
marius-kilocode deleted the sync-v2-0-30 branch October 16, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli CLI, TUI and core engine area:sdk SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.