Repository navigation
[3688 by Claude Opus 5.5] A run reports completion without opening a pull request - #3710
Conversation
…failed task, with an issue comment naming the step that failed. Runs with no changes still end with a "No code changes needed" comment. Why #3620 was reported done without a PR. The run's records show the commit was made and pushed, but nothing reached GitHub afterwards: - The commit and push worked. Commit `c1e1862e` was made at 03:18:50 and pushed at 03:18:52. - PR creation was reached. The "Review digest" event at 03:18:55 is recorded inside the PR creation step. - Then nothing was posted. No PR, no failure comment, no label change (`AI-processing` stayed on, `AI-done` was never added). PR #3652 was opened by hand at 07:06. - The task was still marked a success. It was recorded at 03:19:00 as "Task completed successfully", with status `claude_success_no_changes`, `pr: null`, and a commit attached. So this was a swallowed PR creation error, not "no commits" and not a push failure. Three gaps in `src/jobs` let it reach the success path (the pipeline lives there, not in `packages/core/src`): 1. When opening the PR failed, the error was caught and the fallback comment was posted. If that comment also failed, nothing showed on the issue at all. 2. The final-validation step can open the missing PR, but its result was thrown away. 3. The step that sets the task's final status only checked "agent succeeded" and "a PR exists". "Agent succeeded, no PR" became `claude_success_no_changes`, even with a commit. The worker log with the exact GitHub error isn't kept; the task logs only hold the agent conversation. The fact that both the PR request and the comment failed points to GitHub rejecting all API calls at that moment, possibly the installation rate limit in #3680 item 10. That part is unconfirmed. What changed: - Failed state. A successful agent run with a commit, or with a failed step, but no PR is now marked failed with status `publication_failed`. The reason names the step, e.g. "Opening the pull request failed: …". Runs with no changes still complete as "no changes". The fix is in `src/jobs/issueJob/completion.ts`, the same check as `getTaskCompletionStatus`. - Comment names the step. Post-processing now tracks the current step (commit, push, opening the PR). The comment reads, for example: "❌ Opening the pull request failed. The changes were committed (`c1e1862`) and pushed to `<branch>`, so no pull request was opened." The issue no longer gets `AI-done` in this case; it keeps its `AI` label and loses `AI-processing`. - No silent success. A PR creation call that returns no PR is now treated as a failure. - Comment is harder to suppress. A failed label change or report can no longer stop the failure comment from being posted. If GitHub rejects every call, as it seems to have for #3620, the comment can still be lost; the failed task state is what stays reliable then. - Recovered PRs count. A PR opened by the final-validation retry now becomes the run's outcome. - Cancellation unchanged. A user cancel is not reported as a failed step. I moved the failure handler into `src/jobs/issueJobPostProcessingFailure.ts` to stay under the 400-line lint limit. The step names live in `src/jobs/postProcessingStep.ts`. Tests: typecheck and lint pass on `src/jobs/`. - New tests. `test/issueJobPublicationFailure.test.ts` (8 tests) covers both outcomes: commit then PR failure, a PR call returning nothing, commit failure, no changes, and recovered or still-missing PR. `test/issueJobCompletion.test.ts` has 5 new tests on the final task status. - Negative check. Against the old `completion.ts`, 3 of the new status tests fail. - Changed test. In `test/prCompletionTriggerReleaseFailure.test.ts` I updated one test that asserted the old "Post-processing encountered an error" comment and the `AI-done` label. - Existing suites. The other 22 root suites and 1 API suite that use these modules all pass. Not covered: if the agent commits on its own and leaves nothing staged, the run still takes the "no changes" path. That didn't happen in #3620 (ProPR made that commit), so I left it out of this fix. No preview images, since nothing here is visual.
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses false “no changes” completion by recording publication failures and propagating recovered PRs into the final outcome. It is merge-ready within the reviewed scope, conditional on the five pending checks passing. ✅ Explicit failure classification — Committed work without a PR, and recorded commit-step failures, now produce failed task states with step-specific reasons. ✅ Recovery reaches completion — Final validation returns recovered PR information, and the job uses it when recording its outcome. ✅ Resilient failure reporting — Report-generation and processing-label errors no longer suppress the publication-failure comment. This review used static tracing of the supplied diff and context; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test the complete recovery handoffThe recovery tests call S2: 🟢 Reconcile failure comments after recovery
S3: 🟢 Consolidate outcome classification
ScoreThe targeted fix and regression tests support the intended behavior, with no verified merge blocker. Current checks show no failures, although five remain pending. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3688
Branch:
3688/claude-opus-5-5-a-run-reports-completion--20261118-1325-a57Commits: ✅ Changes committed (d52a50e)
AI Processing Completed
Execution Details:
Summary:
I fixed it: a run that commits changes but opens no PR now ends as a failed task, with an issue comment naming the step that failed. Runs with no changes still end with a "No code changes needed" comment.
Why #3620 was reported done without a PR. The run's records show the commit was made and pushed, but nothing reached GitHub afterwards:
c1e1862ewas made at 03:18:50 and pushed at 03:18:52.AI-processingstayed on,AI-donewas never added). PR [3620 by Claude Opus 5.5] Nightly test fails on hosts without /usr/local/bin/node; an older image on a newer database dies with "migration directory is corrupt" #3652 was opened by hand at 07:06.claude_success_no_changes,pr: null, and a commit attached.So this was a swallowed PR creation error, not "no commits" and not a push failure. Three gaps in
src/jobslet it reach the success path (the pipeline lives there, not inpackages/core/src):claude_success_no_changes, even with a commit.The worker log with the exact GitHub error isn't kept; the task logs only hold the agent conversation. The fact that both the PR request and the comment failed points to GitHub rejecting all API calls at that moment, possibly the installation rate limit in #3680 item 10. That part is unconfirmed.
What changed:
publication_failed. The reason names the step, e.g. "Opening the pull request failed: …". Runs with no changes still complete as "no changes". The fix is insrc/jobs/issueJob/completion.ts, the same check asgetTaskCompletionStatus.c1e1862) and pushed to<branch>, so no pull request was opened." The issue no longer getsAI-donein this case; it keeps itsAIlabel and losesAI-processing.I moved the failure handler into
src/jobs/issueJobPostProcessingFailure.tsto stay under the 400-line lint limit. The step names live insrc/jobs/postProcessingStep.ts.Tests: typecheck and lint pass on
src/jobs/.test/issueJobPublicationFailure.test.ts(8 tests) covers both outcomes: commit then PR failure, a PR call returning nothing, commit failure, no changes, and recovered or still-missing PR.test/issueJobCompletion.test.tshas 5 new tests on the final task status.completion.ts, 3 of the new status tests fail.test/prCompletionTriggerReleaseFailure.test.tsI updated one test that asserted the old "Post-processing encountered an error" comment and theAI-donelabel.Not covered: if the agent commits on its own and leaves nothing staged, the run still takes the "no changes" path. That didn't happen in #3620 (ProPR made that commit), so I left it out of this fix.
No preview images, since nothing here is visual.
Review digest
Risk-tiered paths
src/jobs/issueJob/completion.ts(+19/−0)src/jobs/issueJobHelpers.ts(+8/−3)src/jobs/issueJobPostProcessing.ts(+95/−128)src/jobs/issueJobPostProcessingFailure.ts(added, +98/−0)src/jobs/postProcessingStep.ts(added, +34/−0)src/jobs/processGitHubIssueJob.ts(+2/−1)test/issueJobCompletion.test.ts(+99/−0)test/issueJobPublicationFailure.test.ts(added, +210/−0)test/prCompletionTriggerReleaseFailure.test.ts(+5/−3)Diff size: 9 files changed, +570/−135 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3688.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!