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.
This commit is contained in:
kiloconnect[bot]
2026-04-27 13:59:58 +00:00
parent e3476be3bb
commit 18a1f289ff
+5 -1
View File
@@ -148,8 +148,12 @@ async function main() {
// Train rerere from past upstream merge commits so the cache is populated
// even on a fresh clone. This replays past merges to learn their resolutions.
// The grep covers both the current convention ("merge: upstream vX.Y.Z") and the
// historical convention used by older upstream merges ("[Rr]esolve merge conflicts").
// Without the lowercase alternative, ~70 past merges are dropped from training on
// this repo, since most older resolution commits use a lowercase "resolve".
logger.info("Training rerere cache from past merge history...")
const learned = await git.trainRerere("merge: upstream\\|Resolve merge conflict")
const learned = await git.trainRerere("merge: upstream\\|[Rr]esolve merge conflict")
if (learned > 0) {
logger.success(`Learned ${learned} conflict resolution(s) from history`)
} else {