Repository navigation
Conversation
Quest-Claim: dd078214e50a6435
…ions A maintainer opts a project in, optionally per milestone, and their hub starts the next unclaimed ready quest in `quest unblocked` order whenever a runner slot frees. Start jobs first check the quest is worth starting and ask start, skip, deprioritize, or delete when in doubt. Held PRs name their holder, a starter's draft quiet for a week is offered for takeover, and a handed-back draft can be marked ready. The quest now covers only delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt-ins with membership Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
# Conflicts: # quest/m0/kix/README.md
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 0b5c329 with PR base 3b971f6.
Two P2 correctness findings are recorded inline. Recommended direction: include originating jobs in the mark-ready guard, and enforce per-quest skip/history exclusions atomically when creating automatic starts.
Validation: static GitHub-only review of the 20-file diff, relevant job dispatch/publication/authorization and inbox code, and the added tests. No builds or tests were run. This is a COMMENT review, not approval.
(Written by review (OpenAI))
| // A job may still push to the pull request, so it stays as the job leaves it. | ||
| if (await store.active(c.env.DB, repo.id, `pulls/${number}`)) | ||
| throw new JobError("Stop this pull request's job before marking it ready"); |
There was a problem hiding this comment.
[P2] Include active jobs that originally published this PR
store.active only compares jobs.target, but a start or plan job keeps its quest/issue/plan target after publishing; store.delivered records the PR number in jobs.pull without changing that target. Consequently, a running or waiting originating job that has already opened this draft is invisible to the pulls/${number} lookup, and the new endpoint can mark its PR ready even though that job can still push. Check active jobs associated through pull as well as direct PR targets, and cover a delivered draft whose originating job is still running/waiting.
(Written by review (OpenAI))
| { ...job, repository: project.id, actor: owner, pinRunner: null, pinAccount: null, automatic: true }, | ||
| Date.now(), | ||
| ); | ||
| if (created.created) started++; | ||
| } catch (error) { | ||
| if (error instanceof NotMaintainer) { |
There was a problem hiding this comment.
[P2] Recheck per-quest exclusions at automatic job insertion
The taken and skipped sets are read once before the awaited GitHub checks, while this insert only rechecks the opt-in. If the maintainer skips this quest at its current text while jobSource is reading GitHub, the skip can commit first and this code still queues and dispatches the quest. The same snapshot gap lets another in-flight pass restart a quest if a job was created and then cancelled/failed after its initial history read. Enforce the matching skip and any prior-job exclusions in the automatic insert, alongside the existing opt-in guard, so an explicit skip/cancel that commits first is respected. The opt-out-during-read test provides a useful pattern for these regressions.
(Written by review (OpenAI))

Summary
kix now starts ready work by itself and gives open PRs more of the
/quest-completeactions, toward quest/m0/kix/execution.md. The quest file now covers only what's left: delete in the PR decision.quest unblockedorder. Projects take turns, round-robin. Each one is an ordinary start job requested by that maintainer, created only after the same live GitHub checks as a manual start (jobSource). Two things keep failures from repeating: a quest that already had a job doesn't start again, and neither does one the maintainer skipped at its current text. The five-minute scheduled sweep wakes opted-in hubs so newly ready quests start too. The job insert itself checks that the opt-in still covers the quest's milestone, so an opt-out that commits during the GitHub read leaves no job for any dispatch to find. Projects rotate by whichever one the maintainer started work on least recently. An opt-in ends with its project membership, through a foreign key, so losing the role ends it and regaining access doesn't bring it back. The GitHub reads run outside the hub's serialized pass, so runner messages never wait on them.instructionstell the agent to check first whether the quest is still worth starting. When in doubt it asks one decision: Start, Skip, Deprioritize (quest mvto a later milestone), or Delete (quest rm).quest:*label.## Waitingoffers "Mark ready for review". This isPOST …/pulls/<n>/readybound to the head on screen, and it's refused while a job on that PR is active.Choices made without asking
STALE), so a draft left over a weekend isn't offered./quest-deletejob, because closing it would leave its branch still claiming the quest. That's a new workflow touching the runner, publication, and landing.Public API and wire impact
POST /projects/github/:owner/:repository/autostart(formenabled=1|0,milestones; JSONenabled: boolean) andPOST /projects/github/:owner/:repository/pulls/:number/ready(head).0023_autostart.sql(tableautostart, cascading fromgithub_project_members).store.createJobtakesautomaticand can throwNotOptedIn.assignmessage for astartjob now carries non-nullinstructions. The protocol is unchanged.updatedAt.Validation
tsc --noEmitfor the Worker.cloudflare/test/autostart.test.ts: ranking, milestone scope, skip, and taken rules; an opted-in runner gets its assignment; no restart after a cancel; opt-out (including during the GitHub read); project rotation; the membership cascade; role loss; mark ready at the head on screen.just checkandjust testpass (vitest 1184 passed, 5 skipped; Worker 550 passed) on the reviewed head.Suggested follow-ups
Models
Implementer: Claude Code, claude-opus-5-5
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.01a1b8ab-8de1-75c3-a497-8a5cfb0d53cc, round 4The latest head only merges the updated base, and static review found no new branch-specific defects or merge regressions.