Repository navigation
feat(board): ignore quest branches left at a merged PR's head - #217
Merged
Merged
Conversation
Quest-Claim: 5be1a07c9e2d4f13
The Worker counted every observed quest/* branch as a claim, while the CLI already skipped a branch whose tip is the head of a merged PR. The rule now lives in quest/core as `landed`, which both use: the occupancy pass reads each quest branch's tip and its merged PRs' heads, and drops landed branches. A branch whose PR closed unmerged, or with commits pushed after its merge, still claims its quest. The fake GitHub models merged PRs and branches kept after their PR closed, and the seeded test covers all three cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 24, 2026 06:21
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Resolves conflicts with #213 and #214: - `landed` in quest/core now returns the merged PR it finds, so the CLI's `mergedPull` (renamed in #214 to return the PR's URL) keeps using the one shared rule, and the Worker checks it for undefined. - The fake GitHub's merged-claims additions now build on #213's `Repo.branches` model: a quest ref is any listed `quest/*` branch or open upstream PR's branch, at its tip, with the PRs from it that merged. A kept branch is just a listed branch; a closed PR's optional `head` pins the commit it ended at once its branch moves on. The fake's merge endpoint marks the PR merged. - The seeded test lists the kept branches itself, and checks the inbox against the quest a pushed branch claims, since #215's agent cards now show every queued job's quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Landing summaryLanding head 8346d7f with a squash merge. Changes since the last reviewed head (f355b40)
(Written by Claude Opus 5.5) |
kixelated
added a commit
that referenced
this pull request
Oct 24, 2026
Keep main's merged flag on the fake's pull requests (#217) for both its REST merge and the merge mutation, and document both meanings of a listed upstream branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes quest/m0/kix/merged-claims.md.
Problem
The kix board and inbox counted every observed
quest/*branch as a claim. Since kixelated/quest#192,quest unblocked --unclaimedskips a branch whose tip is the head of a merged PR. So in a repository that keeps head branches after merge, the board showed landed quests as Claimed while the CLI offered them.Change
quest/coregainslanded(tip, pulls), the one definition of the rule. It returns the merged PR whose head is the branch's tip, if any. A branch at a merged PR's head holds nothing. A branch whose PR closed unmerged, or that got commits after its merge, still holds its quest. The CLI'smergedPull()(which returns that PR's URL since kixelated/quest#214) and the Worker both call it.target { oid }andassociatedPullRequests(states:MERGED, first:10, newest first) { headRefOid }.reconciledrops landed refs before it records claims.cloudflare/dev/github.ts), on theRepo.branchesmodel from kixelated/quest#213, gets two optionalPullfields:merged(the PR reportsMERGED; its merge endpoint sets it) andhead(the commit a closed PR ended at once its branch moved on). A branch kept after its PR closed is just a listed branch. Refs now return their tips and the heads of the PRs from them that merged. The shared seed world is unchanged.cloudflare/GITHUB.mddocuments the rule.Validation
cloudflare/test/seed.test.tscovers three branches: one left at a merged head shows Available on the board, one whose PR closed unmerged shows Claimed, and one pushed to after its merge shows Claimed and is not offered in the inbox. With the Worker filter disabled, the test fails.just checkandjust testpass locally.Choices made without asking
quest/branch still doesn't invalidate candidates, as before. A push to a landed branch therefore becomes a claim on the next occupancy pass, not immediately.quest startreplacing a landed branch opens its draft PR right away, and thatpull_request openedevent already invalidates.seeded(edit)hook rather than growing the shared seed world. This keeps fake-GitHub changes small next to quest/m0/kix/github-fake.md.Follow-ups
quest startclaims by pushing tooriginand then opening the PR. Here its first push failed with a barefailed to push some refs, and a manual retry of the same push succeeded. The error printed only stderr, which hid git's porcelain status line. Consider including stdout in that error so the cause is visible.🤖 Generated with Claude Code
(written by Claude Opus 5.5)