From 0b250ec42d82fd7e2030c7f7aa83a62d4d5cb7a4 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 5 Nov 2026 14:33:23 -0800 Subject: [PATCH 1/2] chore(quest): claim quest/m0/token-waste/base-merges.md Quest-Claim: c41a09accda88ea6 From 88215b1994309e9b62fb711e9e8f809c928d570e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 5 Nov 2026 14:39:07 -0800 Subject: [PATCH 2/2] quest: merge the base only on a conflict or a refused head 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 --- assets/CONTEXT.md | 4 +++- quest/m0/token-waste/README.md | 1 - quest/m0/token-waste/base-merges.md | 37 ----------------------------- 3 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 quest/m0/token-waste/base-merges.md diff --git a/assets/CONTEXT.md b/assets/CONTEXT.md index f5f7e747..2c1ffbc6 100644 --- a/assets/CONTEXT.md +++ b/assets/CONTEXT.md @@ -103,7 +103,9 @@ A decision about an open PR never authorizes closing it. Confirm a close as its Push with an explicit refspec: `git push refs/heads/:refs/heads/`. A bare branch name can push to the base branch instead, for example under `push.default=upstream` when the branch tracks it. -Never rebase or force-push, even a branch only you hold; merge the base instead, and fix any merge conflicts. +Never rebase or force-push, even a branch only you hold; merge the base instead. +Merge it only when the branch conflicts with it or a landing step, such as `quest merge` or GitHub's merge queue, refuses the head, and resolve the conflicts in that merge. +A branch that is only behind its base 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. A PR that another session pushed to in the last hour is theirs: report its events instead of pushing to it. Before each push to a branch that already has a PR, confirm the PR is still open: a push after it merges brings the deleted branch back. Run the repository's checks locally while the PR is a draft; CI may run only on PRs ready for review. diff --git a/quest/m0/token-waste/README.md b/quest/m0/token-waste/README.md index 8c9e9763..7181f2f7 100644 --- a/quest/m0/token-waste/README.md +++ b/quest/m0/token-waste/README.md @@ -72,7 +72,6 @@ Decision prompts, chosen options marked ✅: - [Rules load once](/quest/m0/token-waste/rule-loading.md) - skills and rules arrive in the first turn and survive compaction - [Coordinators and waits](/quest/m0/token-waste/coordinator-waits.md) - coordinators lean on compaction, children report briefly, and waits block - [Epics list no children](/quest/m0/token-waste/child-lists.md) - an epic's children are its directory, so finishing a quest edits no README -- [Base merges only when needed](/quest/m0/token-waste/base-merges.md) - a branch merges its base on a conflict, not before every queue attempt - [Mechanical rules become checks](/quest/m0/token-waste/rule-checks.md) - hooks enforce em dashes, push refspecs, no rebase or force-push, the footer, and `.tmp/`, and their prose leaves the always-loaded rules - [quest usage](/quest/m0/token-waste/usage.md) - per quest and PR: which models and efforts worked on it, their tokens and API-equal cost, and how the work went; the epic's re-measure runs it - [token-max](/quest/m0/token-waste/token-max.md) - a standalone Rust CLI that replays Claude Code and Codex transcripts against API prices and recommends cache TTL, compaction, and Bash cap settings diff --git a/quest/m0/token-waste/base-merges.md b/quest/m0/token-waste/base-merges.md deleted file mode 100644 index fd8e846e..00000000 --- a/quest/m0/token-waste/base-merges.md +++ /dev/null @@ -1,37 +0,0 @@ -# [S] Base merges only when needed - -## Goal - -A PR branch merges its base only when it conflicts with it or GitHub refuses -to enqueue it. `quest merge` enqueues a head that is behind the base on a -base that lands through GitHub's merge queue, since the queue tests every -PR against the live base. - -## Plan - -Decided 2026-11-05 (user, /quest-plan, the -[token waste](/quest/m0/token-waste/README.md) audit). - -Measured, moq-dev PRs created 2026-10-06 to 11-05: 16,013 of 48,907 commits -(33%) were base merges, 48% on merged PRs and 70% in moq.pro, rising from 2.6 -to 3.4 per merged PR after 11-01. Many moq CI runs were cancelled (1,527 of -5,735 PR runs), most likely superseded by the next push or base merge. - -`/quest-merge` says `quest merge` refuses a head that does not contain the -current base, which sends agents to `/quest-iterate` to merge it before -every queue attempt. That preflight came from -[moq-dev/quest#253](https://github.com/moq-dev/quest/pull/253) on 10-28, -before repositories moved to GitHub's merge queue. - -Decision prompts, chosen options marked ✅: - -- Merge churn: ✅ the watcher merges quest files, and agents merge the base - only on a real conflict or at queue time (rejected: stop editing READMEs, - which [Epics list no children](/quest/m0/token-waste/child-lists.md) now - does a cleaner way; membership from directories, adopted there too). The - watcher half already exists: it merges a dropped PR's conflict with the - quest merge driver before using a fixer slot - ([moq-dev/quest#389](https://github.com/moq-dev/quest/pull/389)). - -Keep the preflight on bases that land through `quest land`, if any remain, -and check what #253 guarded against before removing it on queue bases.