diff --git a/README.md b/README.md index c35075c7..789f6256 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,17 @@ command registers the driver in a fresh clone or worktree whose falls back to `git merge-file`, and GitHub's merges ignore drivers, so a PR shows as conflicting until a local merge from its base is pushed. +The registered driver passes Git's conflict marker length and revision labels +to `quest resolve`, including the ancestor label for `diff3` conflicts. A direct +invocation defaults to seven-character markers and `ours`/`base`/`theirs`; +`--marker-size`, `--ours-label`, `--base-label`, and `--theirs-label` override +them. Labels must fit on one line. The fallback carries the same Git metadata +when `quest` is missing or too old to accept those options. + +Existing configured drivers are preserved. For a checkout still using the old +quest-generated command, clear its local `merge.quest.driver` entry and run any +quest command to register the current one. + ## Wait for pull request activity `quest wait` blocks until a GitHub PR has a review, comment, review-thread diff --git a/quest/m1/README.md b/quest/m1/README.md index c9e22fd0..22e8082b 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -17,6 +17,5 @@ additional login providers. This milestone does not gate the first release. - [ChatGPT approval](/quest/m1/chatgpt-waitlist.md) - resolve hosted-use approval before implementation - [Live inbox](/quest/m1/inbox-polish.md) - live agent cards, active quests on the log, runner choice for every job, expiring offers - [Worker dev setup](/quest/m1/worker-dev.md) - per-server cookies, seeded raw output, one fake GitHub, each test run alone -- [Merge driver tuning](/quest/m1/resolve-tuning.md) - measure `quest resolve` on moq's history and match git's markers - [Incremental history](/quest/m1/history-pass.md) - each history pass reads only what changed since the last - [Gate owns descendants](/quest/m1/gate-owns-descendants.md) - cancelling `quest gate` leaves none of its command's processes behind, on Linux and macOS diff --git a/quest/m1/resolve-tuning.md b/quest/m1/resolve-tuning.md deleted file mode 100644 index 9145d17f..00000000 --- a/quest/m1/resolve-tuning.md +++ /dev/null @@ -1,20 +0,0 @@ -# [S] Measure and refine the quest merge driver - -## Goal - -The `quest resolve` merge driver's real effect is measured on moq-dev/moq's -merge history, and its unresolved conflict markers match git's own labels -and marker size. - -## Plan - -Decided 2026-10-24 (user) as follow-ups of -[kixelated/quest#219](https://github.com/kixelated/quest/pull/219), ranked -after launch: - -- **Replay.** Rerun the plan's replay of 280 merges of `main` into PR - branches in moq-dev/moq through the driver, and record how many of the 29 - quest-only conflicts it resolves and which shapes still conflict. -- **Marker labels.** Register the driver with git's `%L`, `%X`, and `%Y` and - pass them to `git merge-file`, so markers carry git's branch labels and - marker size. diff --git a/src/cli/main.ts b/src/cli/main.ts index 43fdc2c9..60f5aebb 100644 --- a/src/cli/main.ts +++ b/src/cli/main.ts @@ -36,7 +36,7 @@ import { type Hold, type State, finish, land, release, take } from "./hold"; import { LAND_CHECK, checkQueue, parsePlan, parseResult, pushQueue, resolveQueue } from "./land"; import { landed } from "./landed"; import { type Report, moveQuest, removeQuest } from "./move"; -import { resolveFile } from "./resolve"; +import { type ResolveOptions, resolveFile } from "./resolve"; import { heal, init, uninstall } from "./setup"; import { Refusal, describe, notUpstream, releaseQuest, startQuest } from "./start"; import { GUIDE, SKILLS, skill } from "./skills"; @@ -953,8 +953,12 @@ export function main(argv: string[], out: Output): number | Promise { .argument("", "Our version, overwritten with the result (git's %A)") .argument("", "The common ancestor (git's %O)") .argument("", "Their version (git's %B)") - .action((ours: string, base: string, theirs: string) => { - if (resolveFile(ours, base, theirs) > 0) code = 1; + .option("--marker-size ", "Conflict marker length (git's %L; default: 7)", positiveInteger("marker-size")) + .option("--ours-label