Repository navigation
docs(guide): claim quests with a draft PR, forks included - #157
Conversation
A claim was only a quest branch pushed upstream, so contributors without push access had no way to claim and their fork PRs went unseen. Any open PR whose head branch is the quest's branch now counts, and contributors without push access claim by opening a draft PR from their fork. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3ecefb3f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Check for its branch and any open PR before starting. | ||
| On GitHub, a quest is claimed by its branch on the upstream repository or by any | ||
| open PR whose head branch has that name, including PRs from forks | ||
| (`gh pr list --head <quest-branch>`). |
There was a problem hiding this comment.
Target the upstream repository when listing claim PRs
In the no-push contributor scenario, a clone may have only the contributor's fork as origin, so this command queries that fork and misses claim PRs opened against the upstream repository. gh pr list --help documents -R, --repo as selecting another repository, while gh repo set-default --help says API queries use the configured default repository. Pass the upstream explicitly, such as gh pr list --repo <owner/repo> --head <quest-branch>, or require it as the gh default; otherwise the new fork-aware check can still let duplicate work start.
AGENTS.md reference: assets/AGENTS.md:L103-L106
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b620adb: the check now passes --repo <upstream> and says to check against the upstream repository, since a fork's origin is the fork.
(Written by Claude Opus 5.5)
| Without, push it to your fork and open a draft PR from it right away; that PR | ||
| becomes the quest's PR. |
There was a problem hiding this comment.
Resolve concurrent fork claims after opening the PR
When two contributors without upstream push access claim at roughly the same time, both can pass the initial check, push the same branch name to separate forks, and open draft PRs; unlike competing pushes to one upstream ref, neither operation rejects the second claimant. Both agents then regard their PR as the claim and implement the quest concurrently. Recheck matching upstream PRs after creation and deterministically retain one claim, or use another serialized claiming mechanism.
Useful? React with 👍 / 👎.
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b620adb3dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Fork pushes never collide, so recheck after opening: the earliest open PR holds | ||
| the claim, and a later one closes and stops. |
There was a problem hiding this comment.
Recheck the upstream branch after opening a fork PR
When a fork claimant and a push-enabled claimant start concurrently, both can pass the initial checks; the latter can then push the upstream branch while the former opens its PR. The new PR-only tie-break resolves the two-fork race, but the fork claimant can still see itself as the earliest PR and proceed while the upstream claimant proceeds with the branch, leaving two owners. Recheck both claim mechanisms after opening the PR and define which wins when an upstream branch and fork PR appear concurrently.
AGENTS.md reference: assets/AGENTS.md:L103-L106
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a111f82: every claimant, upstream or fork, now opens a draft PR right after pushing and rechecks, and the earliest open PR holds the claim. With claims always PRs, the branch-vs-fork window is gone; an upstream branch still counts while its PR is being opened.
(Written by Claude Opus 5.5)
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
A branch push and a fork PR could both claim a quest at once. Every claimant now opens a draft PR right away and rechecks, so the earliest open PR decides the claim. Finishing marks that PR ready instead of opening a new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a111f8249f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| runner goes offline. On GitHub, a draft PR | ||
| opened from the quest's branch, including from a fork, claims the work. These |
There was a problem hiding this comment.
Update the hosted lifecycle to describe PR claims
The production home page still presents the old workflow: cloudflare/src/home.tsx:142 says that pushing the branch claims a quest, while line 151 says the draft PR arrives only when the work is ready to turn in. Under the new workflow the draft PR is opened immediately and is what lets fork contributors claim work, so users following the hosted lifecycle can overlook fork claims and start duplicate work. Update that lifecycle copy alongside this documentation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 9c56a39: the home page lifecycle now says an agent pushes an empty commit to the quest's branch (from a fork too) and opens a draft PR right away, with the earliest open PR holding the claim, and that the work lands on that PR once it is marked ready. design/theme.md had the same stale sentence and is updated too. It avoids any label, matching kixelated/quest#159.
(Written by Claude Opus 5.5)
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c56a39488
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <p>A live runner lock takes active work. On GitHub, pushing the quest's branch claims it.</p> | ||
| <p> | ||
| A live runner lock takes active work. On GitHub, an agent pushes an empty commit to the | ||
| quest's branch, from a fork too, and opens a draft pull request right away. The earliest |
There was a problem hiding this comment.
Keep claim drafts out of Ready to turn in
When an agent follows this lifecycle and opens its draft immediately, the board presents the unfinished claim as “Ready to turn in”: cloudflare/src/github/state.ts:205-218 converts every open associated PR into a change without retaining isDraft, and cloudflare/src/board/model.ts:136-139 maps every such change to turn-in ahead of branch claims. Thus the new claim stage never appears as “Accepted” for GitHub PR claims and can invite review of an empty or in-progress PR; preserve the draft/claim state through reconciliation and classify it separately until the PR is marked ready.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid, but I'm leaving this out of this docs PR. Draft claim PRs still occupy their quest: readState adds every open quest-branch PR to occupied, so the quest never shows as Available and kix won't hand it out again. What's wrong is only the label, which says Ready to turn in instead of Accepted.
The right rule isn't just "draft means claim". Under kixelated/quest#159, a draft with a ## Decisions needed section is a hand-back waiting on the maintainer, and treating every draft as a claim would hide those. That marker and kix showing the owner on each card are already planned in quest/m0/helpers/start.md and quest/m0/kix/execution.md. I'm suggesting it to the maintainer as a follow-up.
(Written by Claude Opus 5.5)
| Check both against the upstream repository; in a fork's clone, `origin` is | ||
| usually the fork. |
There was a problem hiding this comment.
Update getting-started to query upstream claims
In the contributor-fork scenario called out here, docs/getting-started.md:54-57 still tells users only to check the quest's “remote branch and open PRs.” Because that checkout's remote is normally the fork, following the public getting-started guide can miss both the upstream branch and claims opened from other forks, allowing duplicate work despite the corrected agent guide. Update that page to direct the check at the upstream repository and include fork PRs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 482f7ed: getting-started now says to check the upstream repository for the quest's branch and its open PRs, including PRs from forks.
(Written by Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge summary for /quest-merge:
(Written by Claude Opus 5.5) |
Problem
A quest was claimed only by pushing its branch to the upstream repository, and that took push access. Contributors without push access had no way to claim. Their fork PRs also weren't counted as claims, so two people could pick up the same quest without knowing (this just happened on moq-dev/moq: moq-dev/moq#6137). Review then showed that claims made partly by branch push and partly by fork PR can still race, whatever priority rule you choose.
Behavior
gh pr list --repo <upstream> --head <quest-branch>), sinceoriginis usually the fork in a fork's clone.--headmatches PRs from forks too; I confirmed this on moq-dev/moq#6061.quest-startgives up a claim by closing its PR and deleting its branch.quest-spawnexpects each agent's work to land on its claim PR.design/theme.mddescribe the same claim flow.quest startfrom kixelated/quest#158 (a draft PR as the claim, earliest wins; kixelated/quest#159 since dropped its label). That quest still adds the command and the## Decisions neededhand-back.Validation
just checkandjust testpass.🤖 Generated with Claude Code
(written by Claude Opus 5.5)