42 Commits
Author SHA1 Message Date
marius-kilocode f1e22ebf21 fix(upstream): preserve compatibility tree overlays 2026-07-22 17:20:05 +02:00
Catriel Müller 2e4b59399a fix: address Bun merge validation review 2026-06-11 11:31:04 -03:00
Catriel Müller fee5cf441a fix: prevent Bun downgrades during upstream merges 2026-06-11 10:44:33 -03:00
Mark IJbema 08a3e0a099 Merge pull request #10131 from Kilo-Org/mark/opencode-version-file
feat(upstream): record last merged tag in .opencode-version
2026-05-11 11:31:28 +02:00
Mark IJbema 8155e3a50f Merge pull request #10003 from Kilo-Org/mark/fix-root-pkgjson-regressions
fix: restore root package.json entries dropped by upstream-compat
2026-05-11 11:31:03 +02:00
kiloconnect[bot] 8710e9d9de feat(upstream): record last merged tag in .opencode-version
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).
2026-05-11 08:11:40 +00:00
Mark IJbema ee3ee5b06b fix(upstream-merge): always reconcile package.json post-merge
git rerere learns conflict resolutions from past upstream merges and
replays them on the next merge. When past resolutions used the buggy
mergeWithNewestVersions ordering, rerere auto-resolves package.json
files with stale content before transformConflictedPackageJson ever
gets a chance to run — so the fixed merge logic never reaches the
file.

Add reconcileAllPackageJson, which runs after every merge (clean,
auto-resolved, or partially conflicted) and rewrites every package.json
that the merge touched from the kilo branch's pre-merge HEAD and the
opencode compat branch using the same merge logic. Files that are
still conflicted are skipped so manual resolution isn't silently
overwritten.

This makes our merge logic the source of truth for package.json
content, regardless of what rerere or git's textual merge produced.
2026-05-11 10:02:35 +02:00
Mark IJbema 76f49645f6 Merge remote-tracking branch 'origin/main' into mark/upstream-compat-base 2026-05-07 16:12:34 +02:00
kiloconnect[bot] e88dd31421 feat: support HEAD as upstream merge base 2026-05-06 09:38:26 +00:00
Mark IJbema 694773a7c9 Merge remote-tracking branch 'origin/main' into mark/upstream-compat-base 2026-05-05 11:30:58 +02:00
kiloconnect[bot] 5c14ec2bed fix: preserve upstream ancestry on kilo merge 2026-05-05 08:10:36 +00:00
kiloconnect[bot] 4b22bfbc57 fix: keep compat branches linear 2026-05-05 07:57:01 +00:00
kiloconnect[bot] 4b1c1930c2 fix: preserve upstream compat merge bases 2026-05-04 15:54:19 +00:00
kiloconnect[bot] d22d08bbce chore: remove stale desktop package references 2026-05-04 15:00:59 +00:00
kiloconnect[bot] 419ddea52a chore(upstream): implement compatibility base tracking for merges
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
2026-05-04 14:06:37 +00:00
kiloconnect[bot] 26046c9b2b chore: add opencode merge reference worktrees 2026-04-29 16:06:32 +00:00
Mark IJbema bb06f4d2ac fix: skip removed packages during upstream merge 2026-04-29 11:50:14 +02:00
Mark IJbema 98654b289a fix(upstream): skip mergiraf for non-textual conflicts (delete/modify, binary)
Files in UD/DU/binary/etc. conflict states have no <<<<<<< markers in
the working tree. My earlier simplification that removed the
`git checkout --conflict=diff3` pre-check caused mergiraf to run on
them: it would exit 0 (nothing to solve), after which the unconditional
`git add` silently staged our side as resolved, losing the signal that
upstream deleted the file (or that we deleted what upstream modified).

Guard runMergiraf by inspecting the file before calling mergiraf: if
there are no conflict markers, skip the file entirely so it falls
through to manual review. Surface a skipped-count line in the normal
log output so the operator can see how many non-textual conflicts were
left alone.
2026-04-28 14:50:50 +02:00
Mark IJbema 80d848d3e3 feat(upstream): use zdiff3 conflict markers during upstream merge
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.
2026-04-28 14:35:50 +02:00
Mark IJbema e6f387e2dd chore(upstream): disable mergiraf .orig backups
mergiraf defaults to writing a .orig sibling file for every file it
touches. Pass --keep-backup=false so the merge script doesn't leave a
pile of .orig files across the working tree after running.
2026-04-28 14:26:17 +02:00
Mark IJbema 24146a2171 fix(upstream): preserve partial mergiraf results without staging them
mergiraf exit 2 means it reduced conflicts but didn't fully close them.
Previously we bailed on any non-zero exit, throwing away the useful
partial reduction in the working tree. Now we always read the file after
mergiraf runs: if no conflict markers remain we stage, if markers remain
we keep the reduced content in the working tree for manual review but
leave the file unstaged so nothing half-resolved is auto-committed. Also
clean up the debug wording and surface a partial-resolution count in the
normal log output.
2026-04-28 14:25:41 +02:00
Mark IJbema 37b4440603 fix(upstream): make runMergiraf resilient to per-file failures
Previously git add and mergiraf solve could bubble up exit 128 (e.g. on
files missing the base version) and abort the entire merge. Wrap every
shell call in .nothrow() and skip to the next transform pass on failure.
2026-04-28 14:11:01 +02:00
kiloconnect[bot] 815e44a042 chore(upstream): run mergiraf on conflicted files during upstream merge
Invokes `mergiraf solve` (syntax-aware git merge tool) on each conflicted
file before the kilocode-specific transform cascade, re-materializing the
file with diff3 markers first so mergiraf can reconstruct the base
revision. This auto-resolves the common pattern of neighbouring import
additions around kilocode_change markers plus most JSON/YAML/TOML and
other structural conflicts, leaving the existing transforms to handle
only what's genuinely ambiguous.

mergiraf is required at startup; if missing the script aborts early with
install instructions (brew / cargo / nix) rather than failing mid-merge.
2026-04-28 13:46:33 +02:00
Mark IJbema 85cab8764d fix(cli): chdir to repo root in upstream merge script
Transforms feed git-reported repo-relative paths into Bun.file() and
Glob.scan(), both of which resolve against cwd. Running the script from
script/upstream/ (as the README suggests) silently broke every file
lookup, causing pre-merge transforms to return zero results and i18n
auto-resolve to crash with ENOENT.
2026-04-28 12:39:46 +02:00
kiloconnect[bot] 18a1f289ff fix: include lowercase 'resolve merge conflicts' in rerere training grep
The training grep only matched uppercase 'Resolve merge conflict', missing the
lowercase convention used by most historical upstream merges. This dropped ~70
past merges from the rerere training set on kilocode, leaving the cache mostly
empty and causing rerere to miss resolutions that involve the opencode -> kilo
rename.
2026-04-27 13:59:58 +00:00
Catriel Müller 83fd7f6cc8 fix: ui merge icons 2026-04-10 16:55:42 -03:00
Catriel Müller 98f1716216 fix: cleanup lsf icons 2026-04-10 15:17:09 -03:00
Catriel Müller a06d0b89ab fix: cleanup lsf icons 2026-04-10 15:12:04 -03:00
Catriel Müller eb662661ca feat: enable git rerere 2026-03-17 07:46:48 -03:00
Catriel Müller c29dcdcc60 refactor: clean kilo artifacts before compat commit 2026-03-17 07:46:48 -03:00
Catriel Müller c0a3b2f325 fix: fix sdk generation // vscode test 2026-03-17 07:27:25 -03:00
Catriel Müller 5b796226c3 refactor: consider kilocode change markers on merge 2026-03-17 07:27:25 -03:00
Mark IJbema 9a0ac0c0ee docs: update default branch references from dev to main
- 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.
2026-02-23 11:19:39 +01:00
Catriel Müller 85ffa660f1 feat: add support for base branch 2026-02-05 13:31:47 -03:00
Catriel Müller 1e18ea466c refactor: improve lock files resolution 2026-02-05 13:31:46 -03:00
Catriel Müller 13e37b7cdf refactor: not push if there is conflicts 2026-02-05 13:31:46 -03:00
Catriel Müller 947b8a96f4 refactor: improve branch backup 2026-02-05 13:31:45 -03:00
Catriel Müller 033490587f refactor: improve premerge transforms 2026-02-05 13:31:16 -03:00
Catriel Müller 0960e6a85b refactor: improve upstream script 2026-02-05 13:31:16 -03:00
Catriel Müller 6352beb85e fix: use commit hash directly for conflict analysis instead of upstream/tag ref 2026-02-05 13:31:16 -03:00
Catriel Müller c543e4b13f refactor: improve README and i18n translations 2026-02-05 13:31:16 -03:00
Catriel Müller b79517acb8 feat: upstream script wip 2026-02-05 13:31:15 -03:00