Skip to content

chore(migration): land the v2 bootstrap on v2 - #15014

Closed
marius-kilocode wants to merge 21 commits into
v2from
kilo-v2-clean-bootstrap
Closed

marius-kilocode wants to merge 21 commits into
v2from
kilo-v2-clean-bootstrap

Conversation

@marius-kilocode

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The Kilo v2 work merges into kilo-v2-clean-bootstrap, but the integration branch is v2. origin/v2 is still the plain upstream base (5e73d5cb1f7) with no Kilo changes. Because of this:

  • v2 does not have the migration plan, the v2 migration skill, the isolated bun dev, or the Kilo CI lane.
  • v2 still has all 27 upstream workflows. The push that created v2 (2026-10-12, 16:19 UTC) started upstream publish (startup failure), check, test, nix-eval, deploy-www and deploy-files (skipped). Each new push to v2 starts them again.

Why This Change Was Made

This lands the working base on the integration branch, as agreed in the 2026-10-12 sync (the bootstrap branch was only to keep the plan PR readable). It contains everything on kilo-v2-clean-bootstrap:

Source Commits
Seeded migration docs, pushed directly to the bootstrap branch (no PR) 6: c4042b3, a876c29, 56416ab, b16f4bd, 160ce87, 490703e
#14987 v2 migration plan 4
#14989 isolated bun dev profile 1
#14994 v2 migration skill 3
#14996 remove upstream workflows and guard the workflow list 3
Merge commits of the 4 PRs 4

The 6 seed commits were not reviewed in a PR, because #14987 used the bootstrap branch as its base. Most of this PR's diff is c4042b3 (90 files, 18,133 lines of migration-tracking/ docs seeded from the archived port). Review those commits here.

v2 has no commits that are missing from kilo-v2-clean-bootstrap, so the merge has no conflicts.

Merge with "Create a merge commit". Do not squash. The open stacked PRs (#14997, #14998, #14999) contain the bootstrap history. A squash would make their diffs against v2 show all bootstrap commits again.

User Impact

None for users. For the team:

Evidence

  • git rev-list --count kilo-v2-clean-bootstrap..v2 is 0. The merge has no conflicts.
  • 21 commits (17 non-merge), 125 files. Most of the diff is migration docs under migration-tracking/ and the removed upstream workflows under .github/workflows/. Use the Files tab with a commit filter to review the seed commits on their own.
  • git grep "kilo-v2-clean" finds no reference to the old branch name, except the kilo-v2-clean-bootstrap branch name itself.
  • CI was green on chore(ci): remove upstream workflows and guard the workflow list #14996, which is the current tip of kilo-v2-clean-bootstrap.

fpliger and others added 21 commits October 9, 2026 18:31
chore(dev): run bun dev in an isolated v2 profile
Upstream OpenCode workflows that publish, deploy, post, label or close
things do not belong in Kilo CI. Remove them, and remove the pure check
workflows that never trigger on Kilo branches.

Keep test.yml as the test gate and run check.yml on every pull request,
so v2 PRs get `bun run check`.

Add script/check-workflows.ts, modeled on the v1 guard, and run it from
the new kilo-v2.yml so an upstream merge cannot bring a workflow back
without review.
Port the v1 merge tooling `skipFiles` behavior for workflows:
`bun script/check-workflows.ts --fix` runs `git rm -f` on the upstream
workflows that Kilo removed, which also resolves their modify/delete
conflicts. A new upstream workflow still fails the check for review.

Add the step to the v2 upstream merge procedure in the fork conventions.
docs: add v2 migration skill with TUI self-test recipe
chore(ci): remove upstream workflows and guard the workflow list
Comment thread script/dev-isolated.ts
path.join(process.env.XDG_DATA_HOME ?? path.join(os.homedir(), ".local", "share"), "kilo", "auth.json"),
)
if (!(await file.exists())) return config({})
const auth = (await file.json()).kilo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Unguarded auth.json parse can abort bun dev

kiloLogin() is awaited at top level (line 12), so if $XDG_DATA_HOME/kilo/auth.json exists but is empty or truncated (v1 Kilo rewrites it on token refresh), or holds valid JSON that is not an object, (await file.json()).kilo throws and the whole dev launcher fails instead of falling back to signed-out. The exists()/json() pair is also a TOCTOU: a delete in between throws ENOENT. Consider (await file.json().catch(() => undefined))?.kilo so it degrades gracefully.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread script/dev-isolated.ts
// The CLI uses the working directory as the project directory.
cwd: process.env.INIT_CWD ?? process.cwd(),
env: {
...process.env,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Isolation guarantee can be bypassed by inherited env vars

The header promises that no store outside the profile "is read or changed", but ...process.env forwards OPENCODE_CONFIG_DIR (used in packages/util/src/global.ts:79 and taking precedence over XDG_CONFIG_HOME) and OPENCODE_DB (packages/cli/src/database-path.ts:6), and HOME is not overridden. A developer with either variable set reads and writes outside .kilo-v2-dev. Consider explicitly clearing or overriding these for the child process.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.


## Isolation: never touch the v1 setup

- Run the CLI only through `bun dev` (`script/dev-isolated.ts`). It keeps all data in one profile directory. Never run `bun run --cwd packages/cli`, `dev:live` or `opencode` directly. They use the installed OpenCode data and service.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Conflicts with AGENTS.md on dev:live

This line says to never run dev:live, but the repo AGENTS.md says to prefer dev:live over plain bun run dev for live TUI testing. Both files are active agent guidance, so they now give opposite instructions for the same workflow. Please reconcile, or scope this rule explicitly to isolation-sensitive tests.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

> [!WARNING]
> **Stale; rewrite pending in U-L4-01 ([plan](../plans/kilo-v2-migration-plan.md)).** Expected behavior was quoted from the archived port, not v1 (Decision 3), and scenarios carry no gate tags. Keep the scenario IDs; do not use the expectations as acceptance.

Separate from the [implementation plan](kilo-opencode-v2-issue-13750.md).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Broken internal link target

kilo-opencode-v2-issue-13750.md does not exist under test-plans/ (nor anywhere in the repo); discovery/doc-inventory.md:170 already records this as a dangling index link. The current plan is plans/kilo-v2-migration-plan.md.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

## Evidence and scope — 2026-09-05

This audit expands the acceptance checklist behind the existing
[43-row port inventory](../../plans/kilo-opencode-v2-issue-13750.md#inventory-kilo-orgkilocode).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Broken internal link target

../../plans/kilo-opencode-v2-issue-13750.md does not exist — migration-tracking/plans/ contains no kilo-opencode-v2-issue-13750.md. Point at the current plan (plans/kilo-v2-migration-plan.md) or an existing anchor.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

### B4 — Manual scenario statuses stay NOT RUN

`UI-081`/`UI-082`/`UI-083` remain **NOT RUN** in the root-owned
[UI test plan](../plans/kilo-opencode-v2-test-plan-ui.md). The automated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Wrong relative link path

../plans/kilo-opencode-v2-test-plan-ui.md resolves to technical-notes/plans/..., which does not exist. The UI test plan is at migration-tracking/test-plans/kilo-opencode-v2-test-plan-ui.md, i.e. ../../test-plans/kilo-opencode-v2-test-plan-ui.md from this file.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

feature-specific services (FIM/next-edit, speech, image generation, Claw and
remaining cloud/indexing paths), presence integration handback, and full native
end-to-end acceptance. Existing logs still contain unrelated missing-method
errors. Review the detailed [existing-port evidence](../kilocode/baseline/existing-vscode-port.md)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Systematic broken link prefix in this file

This link and ~32 others use the ../kilocode/baseline/... prefix, but that directory is now ../technical-notes/baseline/... (and session sharing is ../technical-notes/session-sharing.md), so all of them 404. Line 1838 of this same file already uses the correct ../technical-notes/baseline/ prefix.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 8 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
script/dev-isolated.ts 62 Unguarded auth.json parse can crash bun dev instead of falling back to signed-out (also an exists()/json() TOCTOU)
script/dev-isolated.ts 27 ...process.env forwards OPENCODE_CONFIG_DIR/OPENCODE_DB, so the documented "nothing outside the profile is read or changed" isolation can be bypassed
.kilo/skills/v2-migration/SKILL.md 34 "Never run dev:live" contradicts AGENTS.md, which says to prefer dev:live for live TUI testing
migration-tracking/test-plans/kilo-opencode-v2-test-plan.md 6 Link targets non-existent kilo-opencode-v2-issue-13750.md
migration-tracking/technical-notes/baseline/extension-surface-inventory.md 6 Link targets non-existent plans/kilo-opencode-v2-issue-13750.md
migration-tracking/technical-notes/baseline/cli-tui-closure-verification.md 164 Wrong relative path (../plans/... should be ../../test-plans/...)
migration-tracking/plans/kilo-opencode-v2-working-log.md 66 ~33 links use the wrong ../kilocode/baseline/ prefix (technical-notes/ is the real path)
script/release.ts 96 Summary-only (deleted line has no commentable target): the release script still runs gh workflow run publish.yml, which this PR removes

Note: the PR was closed at 2026-10-13T08:15:04Z (not merged) with head 8aed2092 unchanged; this review was completed against that SHA.

Files Reviewed (125 files)
  • script/dev-isolated.ts - 2 issues
  • .kilo/skills/v2-migration/SKILL.md - 1 issue
  • migration-tracking/test-plans/kilo-opencode-v2-test-plan.md - 1 issue
  • migration-tracking/technical-notes/baseline/extension-surface-inventory.md - 1 issue
  • migration-tracking/technical-notes/baseline/cli-tui-closure-verification.md - 1 issue
  • migration-tracking/plans/kilo-opencode-v2-working-log.md - 1 issue
  • .github/workflows/* (25 upstream workflows removed, check.yml changed, kilo-v2.yml added), script/check-workflows.ts, package.json, .gitignore, migration-tracking/technical-notes/script/v2-baseline.ts, and the remaining migration-tracking docs - no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 127.5K · Output: 19.2K · Cached: 704.8K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants