Skip to content

feat(resolve): say when the merge driver falls back, and pin quest in the dev shell - #344

Merged
moq-bot[bot] merged 3 commits into
mainfrom
quest/m0/helpers/merge-driver
Nov 1, 2026
Merged

moq-bot[bot] merged 3 commits into
mainfrom
quest/m0/helpers/merge-driver

Conversation

@kixelated

@kixelated kixelated commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Implements quest/m0/helpers/merge-driver.md and deletes it, with its links from the helpers epic and required-heading.md.

Summary

  • Visible fallback. When the merge.quest.driver command can't use quest resolve, it still falls back to git merge-file. If that fallback leaves conflicts, it now prints the reason and the file (git's %P) to stderr:
    • quest: no quest resolve on PATH, so link lists in quest/foo.md were not auto-resolved, when quest help resolve fails (no quest, or one without resolve)
    • quest: quest resolve failed, so link lists in quest/foo.md were not auto-resolved, when an installed quest resolve exits with 2 or more (for example, an older build that rejects the label options)
  • Dev shell quest. flake.nix adds a quest-pinned input with flake = false, pointing at github:moq-dev/quest. flake.lock pins it to 7a191e6, the current main. The dev shell builds that source's nix/package.nix, so this repository's merges resolve link lists without running a PR head's code. To bump it, run nix flake update quest-pinned.
  • README, quest resolve --help, and AGENTS.md describe the new behavior. AGENTS.md notes that the dev shell's quest is the pinned build, and that bun run --silent quest still runs the checkout.
  • test/resolve.test.ts checks the stderr line in the missing, older, and working-quest cases.

Decisions

The maintainer picked the recommended option in a /quest-complete session on 2026-11-01:

  1. Pin a reviewed main commit, not a release. The quest's Plan asks for "a pinned quest release" in the dev shell. The only release, v0.1.0 (2026-10-07), predates quest resolve (moq-dev/quest#219, 2026-10-24), so pinning it would never resolve a link list. A reviewed main commit still meets the Plan's reason for a pin, since merging a PR head never runs that head's code, and it matches m0's recorded pin mechanism, "a nix flake input (any rev, built from source)".
    • ✅ (a) Keep the pinned main commit as a source-only flake input. Already implemented; nix flake update quest-pinned bumps it.
    • (b) Cut a new release that includes quest resolve, then pin its tag.
    • (c) Pin the v0.1.0 release binary now, which has no resolve.

Choices made without asking

  • The warning appears only when the fallback leaves conflicts. A clean git merge-file result is the same as quest resolve's, so a warning there would just be noise on every file both sides touched.
  • The two causes ("not on PATH" and "failed") get different messages, because each one needs a different fix.
  • The input is flake = false instead of a flake input. A flake input would bring in the pinned commit's own lock. Once a pinned commit has quest-pinned too, each bump would add one more older pin to the chain. The follows = "" workaround prints a warning on every nix command until such a commit is pinned.
  • Clones that already have an older driver command registered keep it. heal never overwrites a configured driver, and the README already tells those clones to clear merge.quest.driver and run any quest command. A follow-up below covers this.

Checks

Merged origin/main (clean, no rebase) at edc3d9d.

  • just check: passes.
  • just test: passes (762 passed, 2 skipped; 426 for each build's lifecycle) with CLAUDE_CONFIG_DIR and QUEST_WORKTREE_HOME unset.
  • nix develop -c quest help resolve: the pinned build provides resolve.
  • nix flake check: passes on x86_64-linux at edc3d9d.

Suggested follow-ups

  • Upgrade quest-generated drivers in place. heal registers the driver only when none is configured, so existing clones (this one included) keep an older merge.quest.driver command and never print the new warning. heal could recognize earlier quest-generated driver strings and replace them with the current DRIVER, while leaving custom drivers alone.
  • Keep the pin current. Bumping quest-pinned is manual. It could go into the release checklist or a recurring quest, so the dev shell picks up driver fixes such as moq-dev/quest#323.

Review

  • Reviewer: Codex, gpt-6.1-sol, medium effort (quest review --base origin/main).
  • Round 1 on head edc3d9d720e3939ecb4b52b08fe5bd0b314c36df: 0 findings.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits October 31, 2026 23:28
… the dev shell

The quest merge driver fell back to `git merge-file` without a word when
`quest resolve` could not run, leaving plain conflict markers in link lists.
When that fallback leaves conflicts, it now prints to stderr why and which
file's link lists were not auto-resolved.

The dev shell now carries a quest built from a pinned, reviewed commit of this
repository (a non-flake input, bumped with `nix flake update quest-pinned`),
so this repository's own merges resolve link lists without running a PR
head's code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Make the merge driver's fallback visible feat(resolve): say when the merge driver falls back, and pin quest in the dev shell Nov 1, 2026
@kixelated
kixelated marked this pull request as ready for review November 1, 2026 21:19
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fa5e1e7-9e91-4d40-9260-6f1d4c64bf0b
Commits

Reviewing files that changed from the base of the PR and between 1733726 and edc3d9d.

Files ignored due to path filters: 1
  • flake.lock is excluded by !**/*.lock
Files selected for processing: 9
  • AGENTS.md
  • README.md
  • flake.nix
  • quest/m0/helpers/README.md
  • quest/m0/helpers/merge-driver.md
  • quest/m0/required-heading.md
  • src/cli/main.ts
  • src/cli/resolve.ts
  • test/resolve.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated

Copy link
Copy Markdown
Collaborator Author

Landing edc3d9d.

  • Decision (maintainer, /quest-complete on 2026-11-01): (a), keep the pinned reviewed main commit as a source-only flake input, already implemented.
  • Merged origin/main (clean, no rebase). just check, just test, and nix flake check pass, and nix develop -c quest help resolve works with the pinned build. Codex review round 1 on this head found 0 issues, and CI passed.
  • Overlap: moq-dev/quest#353, queued ahead, edits quest/m0/helpers/merge-driver.md (dropping a Related link), while this PR deletes that file. Whichever lands second hits a modify/delete conflict, which should resolve by keeping the deletion.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge (squash) November 1, 2026 22:03
@moq-bot
moq-bot Bot merged commit 0f076cf into main Nov 1, 2026
16 checks passed
@moq-bot
moq-bot Bot deleted the quest/m0/helpers/merge-driver branch November 1, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant