Skip to content

[3688 by Claude Opus 5.5] A run reports completion without opening a pull request - #3710

Merged
integry merged 1 commit into
3686-epic-0-9-g6ifrom
3688/claude-opus-5-5-a-run-reports-completion--20261118-1325-a57
Nov 18, 2026
Merged

integry merged 1 commit into
3686-epic-0-9-g6ifrom
3688/claude-opus-5-5-a-run-reports-completion--20261118-1325-a57

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3688

Branch: 3688/claude-opus-5-5-a-run-reports-completion--20261118-1325-a57
Commits: ✅ 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:

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 Nightly test fails on hosts without /usr/local/bin/node; an older image on a newer database dies with "migration directory is corrupt" #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.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (6 files)
    • 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)
  • Low risk (3 files)
    • 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!

…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.
@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix goal=8 max=3
Triggered automatically by the requested execution settings.

@propr-dev propr-dev Bot added the ultrafix label Nov 18, 2026
@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 3)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The 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 blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Test the complete recovery handoff

The recovery tests call handlePRValidation directly. An additional test covering performFinalValidation through terminal-state recording would protect the important caller assignment added in processGitHubIssueJob.ts. The supplied implementation carries the result correctly, so this is optional coverage.

S2: 🟢 Reconcile failure comments after recovery

handlePostProcessingFailure posts a definitive failure comment before final validation retries publication. Successful recovery updates the task outcome and labels but leaves that comment unchanged. Updating it or posting the recovered PR link would make the issue history clearer. This is a reporting improvement; the comment accurately describes the initial failed attempt.

S3: 🟢 Consolidate outcome classification

getTaskCompletionStatus still returns claude_success_no_changes for publication failures, while markPublicationFailure and determineResultStatus recognize them separately. The terminal-state guard handles the current path correctly, but sharing classification would reduce future divergence. This cleanup is optional because the supplied callers do not demonstrate an incorrect persisted outcome from that discrepancy.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 42s
  • Tokens: 61,922 (61,018 in / 904 out)
  • Cost: $0.53

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2 S3

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 18, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3688 by Claude Opus 5.5] A run reports completion without opening a pull request ✅❽ [3688 by Claude Opus 5.5] A run reports completion without opening a pull request Nov 18, 2026
@integry
integry merged commit 749ab88 into 3686-epic-0-9-g6i Nov 18, 2026
57 checks passed
@propr-dev propr-dev Bot changed the title ✅❽ [3688 by Claude Opus 5.5] A run reports completion without opening a pull request [3688 by Claude Opus 5.5] A run reports completion without opening a pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant