fix: harden auto-pilot stall handoffs - #2826
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 5 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe auto-pilot workflows now preserve stall-rotation state, assess keepalive agents against available credentials and current assignment, and explicitly dispatch ordered keepalive workflows. The worker attempt metadata also advances to PR 2826. ChangesStall rotation and keepalive handoff
Worker attempt metadata
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant monitor-pr
participant agent_stall_rotation.js
participant GitHubSecrets
participant KeepaliveWorkflows
monitor-pr->>agent_stall_rotation.js: load registry and current agent
monitor-pr->>GitHubSecrets: verify available repository secrets
GitHubSecrets-->>monitor-pr: secret names
monitor-pr->>agent_stall_rotation.js: compute eligible keepalive agents
agent_stall_rotation.js-->>monitor-pr: eligible alternatives
monitor-pr->>KeepaliveWorkflows: dispatch ordered handoff workflow
KeepaliveWorkflows-->>monitor-pr: dispatch result
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Automated Status SummaryHead SHA: 1e671dc
Coverage Overview
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdeee7d91e
ℹ️ 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".
bdeee7d to
cde185e
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/agents-auto-pilot.yml:
- Around line 3370-3404: Extract the duplicated ordered workflow-dispatch
fallback logic from the current block and the local
dispatchFirstAvailableWorkflow implementation into a shared helper under
.github/scripts/*.js. Update both github-script steps to import and reuse that
helper, preserving ordered attempts, 404-only fallback behavior, failure
collection, and the existing no-dispatch error semantics.
- Around line 3370-3404: Ensure the agent:auto label update occurs only after
the dispatch loop successfully sets dispatchedWorkflow. Move the unconditional
label-add logic associated with the handoff below the successful dispatch
confirmation, or remove the label when both workflow dispatch attempts fail, so
the outer catch cannot leave agent:auto blocking future retries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7b098871-9dde-44fd-a747-f822c7b62d2d
📒 Files selected for processing (2)
.github/workflows/agents-auto-pilot.ymltemplates/consumer-repo/.github/workflows/agents-auto-pilot.yml
|
Runner dispatch state for codex on PR #2826. Do not edit. |
🤖 Bot Comment Handler
The agent has been assigned to this PR to address the bot review comments. Instructions for agent
The bot comment handler workflow has prepared context in the artifacts. |
There was a problem hiding this comment.
Pull request overview
This PR hardens auto-pilot’s stalled-PR recovery by improving agent handoff routing, making secret-availability checks registry-driven, and ensuring the workflow can safely dispatch an available keepalive handoff workflow from either the consumer surface or the repo root.
Changes:
- Remove stale
agent:autobefore assigning an explicit next agent during belt stall rotation. - Derive keepalive eligibility from the agent registry’s
required_secrets, and attempt dispatch via eitheragents-81-gate-followups.yml(consumer) oragents-keepalive-loop.yml(root) to avoid dead-end handoffs. - Update LangSmith worker attempt metadata for this PR run.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/agents-auto-pilot.yml |
Adds stall-handoff hardening: clears conflicting routing labels, computes registry-based secret availability, and dispatches an available keepalive handoff workflow. |
templates/consumer-repo/.github/workflows/agents-auto-pilot.yml |
Mirrors the same hardened handoff semantics for consumer templates to keep behavior aligned. |
langsmith-fleet-worker-attempt.json |
Updates emitted metadata (timestamp / PR number) for the recorded worker attempt. |
Suppressed comments (2)
.github/workflows/agents-auto-pilot.yml:3404
- If no handoff workflow can be dispatched, this path currently leaves
agent:autoon the issue/PR. That contradicts the stated goal of keeping routing state retryable when dispatch fails (a later run will seehasAutoand skip delegation). Consider cleaning upagent:autobefore throwing so the next monitor attempt can retry delegation once dispatch becomes available.
if (!dispatchedWorkflow) {
throw new Error(
`No keepalive handoff workflow could be dispatched: ${dispatchFailures.join('; ')}`
);
}
templates/consumer-repo/.github/workflows/agents-auto-pilot.yml:3404
- If no handoff workflow can be dispatched, this path currently leaves
agent:autoon the issue/PR. That contradicts the stated goal of keeping routing state retryable when dispatch fails (a later run will seehasAutoand skip delegation). Consider cleaning upagent:autobefore throwing so the next monitor attempt can retry delegation once dispatch becomes available.
if (!dispatchedWorkflow) {
throw new Error(
`No keepalive handoff workflow could be dispatched: ${dispatchFailures.join('; ')}`
);
}
Mergeability restored — conflict resolved, out-of-scope artifact droppedMerged The conflict was almost entirely artificial. Diffing the merge base ( The one true conflict was Verified after the merge: no conflict markers, the v7 SHA is present and the v6 SHA is gone, and both copies parse as YAML. What remains is the review feedback in #2864's task list — six unresolved threads on the stalled-PR handoff routing ( The Actions-approval outage that previously blocked this PR is no longer the gating factor: the conflict is resolved without keepalive, and the remaining review threads can be addressed directly by the closer lane the same way #2867's were. The scoped blocker on #2864 is cleared accordingly. |
3bd36a7 to
0d50588
Compare
Provider Comparison ReportProvider Summary
📋 Full Provider Details (click to expand)openai
anthropic
Agreement
Disagreement
Unique Insights
🔍 LangSmith Traces |
Closes #2864
Automated Status Summary
Scope
Stalled PR recovery must route to a viable registered agent, dispatch an available handoff workflow, and avoid permanently setting
agent:autowhen dispatch fails.Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria
Summary by CodeRabbit