Skip to content

quest: merge the base only on a conflict or a refused head - #516

Merged
kixelated merged 2 commits into
mainfrom
quest/m0/token-waste/base-merges
Nov 7, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m0/token-waste/base-merges

Conversation

@kixelated

@kixelated kixelated commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Finishes Base merges only when needed, part of the token waste epic.

  • assets/CONTEXT.md (Pull requests): merge the base only when the branch conflicts with it or a landing step (quest merge, GitHub's merge queue) refuses the head. A branch that is only behind needs no merge: quest review covers only the branch's own change, a merge queue or quest land tests each PR on the current base, and every merge reruns CI. This replaces "merge the base instead, and fix any merge conflicts", which read as "keep merging the base".
  • Deletes the quest and its link from the epic README.

Findings

  • The CLI needed no change. quest merge runs the moq-dev/quest#253 preflight (refusing a head that doesn't contain the base) only on ungated bases, where nothing tests base+head before the merge. It skips that preflight on quest land bases and on merge-queue bases. test/hold.test.ts covers this: it enqueues a BEHIND/diverged head on a queue base without comparing, and queues a gated base without comparing. /quest-merge already scopes its "merge the base" step to ungated bases. Per the quest Plan, the preflight stays where it is.
  • Where the churn came from. I sampled the last 40 merged PRs in moq, moq.pro and quest: 139 base merges. 35 were quest land: merge tested base, the gate's own merge on moq.pro, which is needed. Most of the rest were agent "Merge remote-tracking branch 'origin/main'" commits. On moq-dev/quest, git merge-tree re-merged 20 agent merges: 14 had no conflict, even without the quest merge driver. So agents were merging on their own initiative, not because a tool required it. The only standing instruction about merging was the CONTEXT.md sentence above.

Choices made without asking

  • One rule in the always-loaded CONTEXT.md instead of edits to each skill. /quest-iterate ("Fix merge conflicts") and /quest-merge already fit the rule, so per Prompting they aren't repeated.
  • quest status still prints merge-state behind. That is accurate data, so I left it alone.

Models

Size: S
Implementer: Claude Code, claude-opus-5-5, medium effort

Validation

  • just check: pass
  • just test: pass
  • quest check --base origin/main: pass

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1addd-fd4c-7390-953f-b85a8492f151, round 1
  • Head: 88215b1
  • Base: origin/main at 73e0caf
  • Score: 10/10, The instruction change matches the existing landing workflow, and the completed quest and its reference are removed consistently.
  • Findings: none

@pullfrog

pullfrog Bot commented Nov 5, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

A branch only behind its base needs no merge: quest review covers the
branch's own change, and the merge queue or quest land tests each PR on
the current base. quest merge already skips its ancestry preflight on
those bases, so only the shared rule changes. Finishes
quest/m0/token-waste/base-merges.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Base merges only when needed quest: merge the base only on a conflict or a refused head Nov 5, 2026
@kixelated
kixelated marked this pull request as ready for review November 5, 2026 22:40
@coderabbitai

coderabbitai Bot commented Nov 5, 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 20 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: e79c295d-0be0-436c-ba86-d1633b8a3fc6
Commits

Reviewing files that changed from the base of the PR and between 73e0caf and 88215b1.

Files selected for processing: 3

  • assets/CONTEXT.md
  • quest/m0/token-waste/README.md
  • quest/m0/token-waste/base-merges.md
  • 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 kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed head: 88215b1

Findings: No actionable defects found. Reviewed the complete three-file diff and checked the rule against src/cli/hold.ts, assets/skills/merge.md, and test/hold.test.ts. Queue and quest-land paths already bypass base containment; ungated landings still reject stale heads. Existing tests cover BEHIND/diverged queue heads, gated heads, and the ungated refusal, so a documentation-only change fits the implementation.

Direction: Keep the scoped instruction change and existing ungated safeguard; complete the required landing checks.

Verification limits: GitHub-only static review; tests were inspected but not executed. The PR reports local check/test passes. Available GitHub Check and Queue runs were skipped, not test passes.

(Written by unknown OpenAI model)

@kixelated
kixelated added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit c32690d Nov 7, 2026
14 checks passed
@kixelated
kixelated deleted the quest/m0/token-waste/base-merges branch November 7, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant