Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- [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
- [Codex project-config skip](/quest/m0/codex-project-config.md) - once Codex keeps a supported way to skip a project's `.codex/` layer, reviews keep the user's config
Expand Down
47 changes: 47 additions & 0 deletions quest/m0/review-session-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# [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 [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
[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
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 <pr-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.
- 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 <name> 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.