Avoids the ls-remote + merge-base --is-ancestor walk in last() for the
common case by reading the recorded tag from .opencode-version. merge.ts
writes the file as part of the pre-merge compat commit so future runs of
fix-kilocode-markers, reset-to-upstream, and find-reset-candidates can
resolve the base tag instantly. Seeded with v1.14.33 (PR #9978).
Update `findLatestCompatCommit` to use semantic versioning when identifying the latest compatibility commit. This ensures the correct commit is selected even when upstream tags diverge or are not strictly linear.
- Add semver parsing and comparison utilities
- Implement `targetSemver` to resolve versions from tags or commit messages
- Filter and sort compatibility candidates by version relative to the target version
- Add test case for diverging upstream tags
Add a new setup script to configure `merge.conflictStyle=zdiff3` locally
within the repository. This ensures that the common ancestor is visible
during merge conflicts, which is required for structural resolution by
`mergiraf` and simplifies manual conflict resolution.
The configuration is applied during `bun install` via the `postinstall`
hook and remains as a fallback for the upstream merge utilities.
Fixes hang when running the finder from the repo root without a path
scope. Root cause: upstream-only packages (packages/console, packages/web,
packages/desktop, etc. in config.skipFiles) contain multi-megabyte
media assets that stall concurrent Bun `git show` subprocesses on the
pipe buffer.
Changes:
- Batch upstream blob sizes in one `git cat-file --batch-check`
subprocess before classifying anything. Files with missing upstream
land directly in `upstream-missing`; files > 256 KB land in the new
`too-large` bucket. Only sane-sized survivors get per-file `git show`.
- Filter out files matching the merge config's `keepOurs` and
`skipFiles` globs (.github workflows, translated READMEs, upstream-
only packages, etc.) — these are intentionally preserved or removed
in Kilo and would otherwise pollute the report and tempt incorrect
resets.
Full-repo dry-run now completes in ~2s.
Replace the subprocess-based line diff in classifyDrift with an
in-process multiset diff (approxDiff) so concurrent classifications
don't deadlock on big text files like sprite.svg via Bun $.quiet()
pipe-buffer stalls.
Also filter non-code assets (SVG, PNG, fonts, archives, lock files,
etc.) before classification so they don't bloat the report or stress
git subprocesses. Switch kilo-only path excludes to glob pathspecs so
every packages/kilo-*/ and **/kilocode/** dir is excluded without
maintaining a hand list.
Rename the 'whitespace-only' bucket to 'cosmetic-only' — with the
multiset diff it also catches line reordering, so the old label was
misleading.
Bulk-finds files that have drifted insignificantly from the last merged
upstream and (optionally) resets them. Extracts shared clean/changed
marker helpers into utils/markers.ts and shared reset logic into
utils/reset.ts so both the single-file reset helper and the new finder
use the same classification pipeline.
Add .github/TEAM_MEMBERS and other files Kilo has deleted to skipFiles
so future upstream merges auto-remove them via git rm instead of
surfacing delete-by-us conflicts that need manual resolution.
Also drop the stale github/.gitignore entry from keepOurs (the file
does not exist in Kilo main; keepOurs was a no-op) and move it to
skipFiles so upstream's copy is dropped on merge instead of added.
Update the upstream merge script to identify and link to the previous compatibility commit. This ensures that pre-merge transformations maintain a proper commit history by using multiple parents when a prior compatibility base is found, rather than creating disconnected commits.
- Add `findLatestCompatCommit` to locate previous compatibility commits
- Implement `commitTree` and `updateBranch` for low-level git manipulation
- Update `merge.ts` to integrate compatibility base detection and multi-parent commits
Pass merge.conflictStyle=zdiff3 on the git merge invocation so every
conflicted file gets base-aware (|||||||) markers from the start, not
just the ones runMergiraf happens to touch. Benefits:
- Mergiraf always has a base section to work from, so its structural
heuristics apply uniformly.
- Remaining manual conflicts show both sides relative to the common
ancestor, which is dramatically easier to resolve than a 2-way marker.
Since the working tree already carries diff3 markers after the merge,
drop the per-file `git checkout --conflict=diff3` in runMergiraf.
The skip list in script/upstream/utils/config.ts matched .github/VOUCHED.md,
but upstream actually ships .github/VOUCHED.td (typo extension), so the file
fell through to manual resolution every merge. Broaden the pattern to
.github/VOUCHED.* so both variants are handled.
Also make skip-files removeFile report the real git rm stderr on failure
and retry once. Transient index contention silently flipped a file to
not-found in a recent run with no signal about why — now we'll see the
error and shake off intermittent lock failures automatically.
Uses 'git merge-base --is-ancestor' per tag (parallelized) to mark
upstream versions reachable from HEAD with a '✓ merged' annotation.
Kilo's own package version no longer tracks upstream, so semver
comparison isn't reliable; the ancestor check is the source of truth
and handles non-linear merge history correctly.
Append --tags --force flags to the git fetch upstream command so that
upstream tag references are always updated and locally diverged tags
are overwritten to match the remote state.
- Update AGENTS.md to reflect main as default branch
- Update GitHub Actions workflows to trigger on main branch
- Update publish scripts to cherry-pick from origin/main
- Update upstream merge scripts and documentation
- Update CONTRIBUTING.md links in PR standards workflow
- Fix disabled workflow and documentation links
All development commands (bun dev, npm run dev) and external services
(models.dev, ai-sdk.dev) remain unchanged as they are unrelated to branch names.