From 152042a498ca32748938c4bfbb0f76e88c773366 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 10:02:36 -0800 Subject: [PATCH 1/3] quest: plan keying review sessions by upstream branch Co-Authored-By: Claude Opus 5.5 --- quest/m0/README.md | 1 + quest/m0/review-session-key.md | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 quest/m0/review-session-key.md diff --git a/quest/m0/README.md b/quest/m0/README.md index 244ada26..bcacf6e6 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -94,6 +94,7 @@ ownership-manifest design: - [Merge through a host gate](/quest/m0/host-land/README.md) - the host's fixer containers, and the frozen batched gate for the repositories not yet switched, with merge-commit landing as its one exception - [The land fixer resolves every mechanical failure](/quest/m0/land-fixer/README.md) - workflow pushes and the PR's own CI as context - [Reviewer usage limits](/quest/m0/review-quota.md) - `quest review` exits distinctly on a reviewer's quota and prints the reset time +- [Review sessions keyed by upstream branch](/quest/m0/review-session-key.md) - a round from a local branch tracking the PR branch continues that branch's review session - [Drafts in quest waiting](/quest/m0/waiting-drafts.md) - `quest waiting` lists open draft PRs' `## Waiting` items beside the tree's - [Kix decision UI](/quest/m0/kix/README.md) - planning and implementation through prompts and summaries, run on the maintainer's own runners - [Codex cloud off](/quest/m0/codex-cloud-off.md) - automatic Codex cloud reviews stop once no open PR relies on them diff --git a/quest/m0/review-session-key.md b/quest/m0/review-session-key.md new file mode 100644 index 00000000..dca2119e --- /dev/null +++ b/quest/m0/review-session-key.md @@ -0,0 +1,37 @@ +# [S] Review sessions keyed by upstream branch + +## Goal + +A `quest review` round run from a local branch that tracks the PR's branch, +such as a temporary branch made because another worktree holds the PR branch, +continues the PR branch's review session, so its round count and design +checkpoint carry over. The iterate and review skills tell agents what to do +when another worktree holds the PR branch. + +## Plan + +Decided 2026-11-04 (user, /quest-complete follow-up of +[moq-dev/quest#474](https://github.com/moq-dev/quest/pull/474)). That day, +iterate agents on #464, #469, #472, and #474 found the PR branch checked out +in another worktree. Each reviewed from a temporary local branch, so +`quest review`, which keys sessions by the checked-out branch name +(`sessionBranch` and `sessionFile` in `src/cli/review.ts`), started a new +session that resets the round-4 design checkpoint, or later resumed the wrong +one. + +- What should the quest's goal be? + - ✅ Key by upstream branch: without `--branch`, the session branch is the + local branch's upstream branch name when it has one, else its own name. + The skills say to check out a PR branch another worktree holds detached + and pass `--branch `. + - Rejected: skill guidance only; keying sessions by PR number through the forge +- Which milestone? + - ✅ m0 + - Rejected: m1; m2 + +Implementation guidance: + +- The upstream's branch name, without the remote, is what matters, so a + fork's tracking branch keys the same session as the PR's head branch. +- Nothing is in production, so sessions already stored under temporary names + need no migration. From b0899869705fec1076b192ffb908b7d190e66650 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 10:04:15 -0800 Subject: [PATCH 2/3] quest: key no session by an upstream that is the base branch Co-Authored-By: Claude Opus 5.5 --- quest/m0/review-session-key.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/quest/m0/review-session-key.md b/quest/m0/review-session-key.md index dca2119e..2e77c3b4 100644 --- a/quest/m0/review-session-key.md +++ b/quest/m0/review-session-key.md @@ -12,10 +12,12 @@ when another worktree holds the PR branch. Decided 2026-11-04 (user, /quest-complete follow-up of [moq-dev/quest#474](https://github.com/moq-dev/quest/pull/474)). That day, -iterate agents on #464, #469, #472, and #474 found the PR branch checked out -in another worktree. Each reviewed from a temporary local branch, so -`quest review`, which keys sessions by the checked-out branch name -(`sessionBranch` and `sessionFile` in `src/cli/review.ts`), started a new +iterate agents on [moq-dev/quest#464](https://github.com/moq-dev/quest/pull/464), +[moq-dev/quest#469](https://github.com/moq-dev/quest/pull/469), +[moq-dev/quest#472](https://github.com/moq-dev/quest/pull/472), and #474 found +the PR branch checked out in another worktree. Each reviewed from a temporary +local branch, so `quest review`, which keys sessions by the checked-out branch +name (`sessionBranch` and `sessionFile` in `src/cli/review.ts`), started a new session that resets the round-4 design checkpoint, or later resumed the wrong one. @@ -33,5 +35,12 @@ Implementation guidance: - The upstream's branch name, without the remote, is what matters, so a fork's tracking branch keys the same session as the PR's head branch. +- An upstream that is the review's base branch (`--base`, or origin's default + branch) names no PR, so such a branch keys by its own name. Branches made + with `git switch -c origin/main` track the base by default (23 local + branches in the maintainer's clone did on 2026-11-04, this plan's own + included); keying them by upstream would merge every one into a single + `main` session. `review` names the session before it resolves the default + base today, so the base's branch has to be known first. - Nothing is in production, so sessions already stored under temporary names need no migration. From 6efcd769c0e4259d43aa1bdda7b8434276f27987 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 10:30:27 -0800 Subject: [PATCH 3/3] quest: link the remaining bare PR number Co-Authored-By: Claude Opus 5.5 --- quest/m0/review-session-key.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quest/m0/review-session-key.md b/quest/m0/review-session-key.md index 2e77c3b4..703f76f0 100644 --- a/quest/m0/review-session-key.md +++ b/quest/m0/review-session-key.md @@ -14,8 +14,9 @@ Decided 2026-11-04 (user, /quest-complete follow-up of [moq-dev/quest#474](https://github.com/moq-dev/quest/pull/474)). That day, iterate agents on [moq-dev/quest#464](https://github.com/moq-dev/quest/pull/464), [moq-dev/quest#469](https://github.com/moq-dev/quest/pull/469), -[moq-dev/quest#472](https://github.com/moq-dev/quest/pull/472), and #474 found -the PR branch checked out in another worktree. Each reviewed from a temporary +[moq-dev/quest#472](https://github.com/moq-dev/quest/pull/472), and +[moq-dev/quest#474](https://github.com/moq-dev/quest/pull/474) found the PR +branch checked out in another worktree. Each reviewed from a temporary local branch, so `quest review`, which keys sessions by the checked-out branch name (`sessionBranch` and `sessionFile` in `src/cli/review.ts`), started a new session that resets the round-4 design checkpoint, or later resumed the wrong