Repository navigation
Fix the runner's post-merge review findings - #210
Merged
Merged
Conversation
Quest-Claim: aefbabad75ebea92
…text A runner records itself in <home>/running before looking for others, so a second runner on the same home refuses; a crashed holder's record is ignored and removed. A replaced runner now settles only once its agents exit, so it never lets go of the home while they still stop. The context read follows reviewThreads cursors until every thread is examined, so a busy pull request's newer unresolved threads are kept. Finishes quest/m0/kix/runner-hardening.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 24, 2026 06:18
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. |
Collaborator
Author
|
Landing
(Written by Claude Opus 5.5) |
kixelated
added a commit
that referenced
this pull request
Oct 24, 2026
Keep both the plan context test and #210's busy review threads test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
added a commit
that referenced
this pull request
Oct 24, 2026
Resolve the publish test conflict with #210's review-thread paging: keep the seeded GitHub fake, teach it to page review threads 100 at a time, and port the busy pull request test onto it. 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/runner-hardening.md. It fixes the two findings from Codex's post-merge review of kixelated/quest#188.
Summary
quest runnernow holds its home throughRunnerHome.hold()and releases it on exit. A second runner on the same home refuses withanother quest runner is running in <home> (process N on host); stop it first(exit 1).<home>/running/before it looks for other records. If two runners start at the same moment, at least one sees the other and refuses, so the two never run together. This is the same patternquest agentuses to claim a worktree insrc/cli/agent.ts.kill -9) is removed and ignored. Liveness comes fromalive()insrc/cli/supervise.ts. On Linux that function compares the process start time, so a reused PID does not count as the old holder. This works on Linux and macOS.doneonly after its agents have exited, asshutdown()already did. Before this, it could give up the home while its agents were still stopping inside job checkouts.contextread incloudflare/src/github/service.tsfollowsreviewThreadspageInfocursors until it has read every thread, and only then filters for unresolved ones. Pages after the first fetch onlyreviewThreads. A cursor that is missing or repeats raises an error instead of looping forever.quest runnerruns in a home at a time.Tests
test/runner.test.ts:SIGKILLrunner.tschange)cloudflare/test/publish.test.ts: a pull request with 250 review threads returns the unresolved threads from all three pages, with cursorsnull,"100","200".just checkandjust testpass locally.Choices made without asking
flock. Bun and Node have no built-inflock. Calling it throughbun:ffiwould not run under vitest on Node. Instead this reuses the record-then-scan pattern the repo already has. The cost: if two runners start at the very same moment, both may refuse; they never both run.alive(). The cost is a refusal until someone removes the stale record by hand.Suggested follow-ups
contextstill caps each thread at its first 50 comments, and also reads only the last 100 PR comments, the last 50 reviews, and 100 check contexts. A busy PR can lose data at any of these caps, just as it did with threads.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code