Repository navigation
fix: repair conflicting PRs in idle pickup - #34
Conversation
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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughIdle pickup now runs every 15–30 minutes around the clock. Its precheck can start a run for an eligible conflicting PR even when the issue limit is reached. Issue selection skips issues blocked by open issues and avoids concurrent issues that allocate in the same generated file. A new procedure repairs eligible conflicting PRs before issue claims. The merge-gate Skip description now assigns conflict handling to idle pickup until the PR merges. Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to Human-blocked repairs can be dispatched repeatedly, and the repair command omits required task and launch metadata. These issues can waste scheduled capacity and prevent the new conflict-repair workflow from operating correctly; fix them before merging. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 072d5cf85c
ℹ️ 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".
| Before claiming new issues, list the user's open, non-draft PRs whose | ||
| `mergeable` is `CONFLICTING`. Take each one whose worktree has no `working` | ||
| agent and whose branch no live Dispatch in any Run owns; never add a second |
There was a problem hiding this comment.
Restrict repair dispatches to idle-pickup PRs
This selection includes every open, non-draft PR authored by the user, rather than only PRs created by this idle-pickup workflow. If a manually maintained PR or a PR owned by another automation conflicts while its agent is idle, this job can start a worker that merges and pushes to that branch without the branch-specific authority assumed here. Require durable pickup ownership, such as the linked issue/worktree claim, before dispatching a repair.
AGENTS.md reference: AGENTS.md:L19-L21
Useful? React with 👍 / 👎.
| Before claiming new issues, list the user's open, non-draft PRs whose | ||
| `mergeable` is `CONFLICTING`. Take each one whose worktree has no `working` | ||
| agent and whose branch no live Dispatch in any Run owns; never add a second |
There was a problem hiding this comment.
Skip PRs already handed over for human review
The repair worker adds needs-human-review when a conflict requires a behavioral choice, but this eligibility test ignores that label. Once that worker settles, the PR remains conflicting with no working agent or live Dispatch, so every 15–30 minute run can launch another repair worker and post the same handoff again. Exclude needs-human-review and human-only PRs from both the precheck and repair selection.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (2)
skills/origin89-orca/references/unattended-run.md-278-280 (1)
278-280: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPass the repair spec and launch metadata to
worker-start.This is a supervised scheduled launch. The documented contract requires
--spec,--repo,--name, and--agent. The current command passes only--worktree, so it does not provide the required repair task and launch context.Suggested fix
-worker-start --worktree path:<worktree>`. Its spec applies the Wait for merge +worker-start --spec "<repair task>" --worktree path:<worktree> --repo <repo> --name <branch> --agent <agent> --json`. Its spec applies the Wait for mergeskills/origin89-orca/references/unattended-run.md-193-195 (1)
193-195: 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick winExclude human-blocked PRs from repair pickup.
After the coordinator adds
needs-human-reviewfor an ambiguous conflict, the PR still satisfies both the idle-pickup precheck and repair-selection criteria. The next run can dispatch another repair before a human removes the label.Suggested fix
-or when one of the user's open, non-draft PRs conflicts with its base and no -agent in its worktree is `working`. That condition starts a run even when the -issue limit is reached; see [Repair conflicting PRs](#repair-conflicting-prs). +or when one of the user's open, non-draft PRs conflicts with its base, lacks +`needs-human-review`, and no agent in its worktree is `working`. That condition +starts a run even when the issue limit is reached; see [Repair conflicting PRs](#repair-conflicting-prs). -Take each one whose worktree has no `working` -agent and whose branch no live Dispatch in any Run owns; never add a second -writer. +Take each one whose worktree has no `working` agent, whose branch no live +Dispatch in any Run owns, and which lacks `needs-human-review`; never add a +second writer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: QUIET
Plan: Advanced
Run ID: 02779302-ca92-4069-abb3-8fb6de6bb9f8
📒 Files selected for processing (1)
skills/origin89-orca/references/unattended-run.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
A picked-up PR that starts conflicting after its worker settles had no owner. The author's review follow-up handles conflicts only while it runs, the merge gate skips a conflicting PR for 24 hours and then hands it to the user, and idle pickup only claims issues. On 2026-09-27, km43 #159, #162 and #164 each went stale when a sibling allocation in
protocol.tomlmerged first, and waited until someone noticed.Idle pickup now owns that repair:
needs-human-review.Validation:
just checkpasses. Exercised live in origin89-firmware's issue coordinator: its precheck flagged km43 #164 with both issue slots full, and the run dispatched a repair worker to it.