Repository navigation
[3621 by Claude Opus 5.5] Completion comments and commit messages sometimes contain the agent's reply to an internal notification instead of the summary of the change - #3644
propr-dev[bot] wants to merge 12 commits into
Conversation
…e agent's real final answer, not from a later reply to a background notification. The new tests pass, and so do 29 existing suites that touch result parsing, completion comments and commit messages. Typecheck and lint are clean. I did not run the full test suite. Choosing the summary (new `packages/core/src/agents/impl/utils/runSummary.ts`, called from `dockerResultProcessor.ts`): - Split by turn: the conversation is split wherever a user message arrives that isn't a tool result. In a one-shot run that is a background notification; the "output token limit" continuation is not counted as one. A second result line in the stream also starts a new turn. Each turn's final answer is a candidate. - Status notes: the last answer is published unless it is only a status note: a short reply right after a notification, one whose first sentence is about a monitor or watcher, a back-reference like "my summary above still holds", "Summarizing now.", or "Verification is complete." - Fallbacks: when the last answer is a status note, ProPR uses the most recent substantive earlier answer. Failing that, it takes the longest of the last 6 assistant messages, or reports no summary. - Ordinary runs: these are unchanged. A short real summary such as "Fixed the typo in README.md." is kept, and so is a full new summary the agent writes after a notification. Still-waiting runs (the #3479 case): if a run reports success but its last short message says it is still waiting ("Still running… Waiting for the completion notification"), it now ends with a new `unfinished_work` reason. That reason is handled like the existing early-stop reasons (timeout, max turns), so a follow-up gets the "Applied partial follow-up changes" comment. The error quotes the agent's last message, and the status note is never published as the summary. Comment and commit message: - In `src/jobs/prCompletionComment.ts`, the summary taken from the conversation now skips status notes. When nothing is left, it no longer shows the last thing the agent said. A finished run says "The agent did not provide a summary."; a partial run still lists its changed files. - The commit builders in `prCommentJobUtils.ts` and `issueJobPostProcessing.ts` never use a status note. They fall back to the existing default subjects: "Apply follow-up changes from PR comment" or "Resolve issue #N - <title>". The commit message format is otherwise unchanged. Tests: `test/runSummarySelection.test.ts` replays streams shaped like the issue's examples: - a monitor reply with "summary above still holds" - a second result line after a watcher timeout - "Verification is complete. Summarizing now." - a reply to a probe notification with no earlier summary - the "Still running… Waiting for the completion notification" run - a real new summary after a notification - an ordinary short summary - the token-limit continuation - the resulting comment and commit text Six existing suites replace `@propr/core` with a fixed list of exports, so I added the new exports to those lists. Limits: - Codex runs are not covered. Codex stores its conversation in a different format and has no background-notification turns. Codex summaries are only checked for status notes when the commit subject is built. - Spotting status notes partly relies on wording, so an unusually phrased reply to a notification could still get through. There's no visual change, so I made no preview.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR centralizes summary selection and connects unfinished runs to existing partial-execution handling. It needs changes before merge: genuine summaries can be discarded, rejected notification replies can reappear through fallback selection, and formatting can prevent unfinished-work detection. ✅ Shared selection logic — Docker result processing now selects the summary before deriving its commit message, keeping those outputs consistent. ✅ Partial-result propagation — The new termination reason survives the supplied result adapters and reaches the existing partial follow-up disposition. ✅ Focused regression coverage — The added tests cover late notifications, multiple result lines, ordinary short summaries, and commit fallbacks. The supplied current-head status has no failures and four pending test shards. This review used static tracing only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Preserve genuine short summaries after notifications
F2: 🔴 Retain notification context during fallback selection
F3: 🔴 Detect unfinished work independently of formatting
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation has useful integration and focused tests, but three reachable selection and outcome-classification defects remain. The current checks show no failures; the outstanding corrections are established by static tracing. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
2 similar comments
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
|
/ultrafix goal=8 max=5 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 5) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR centralizes summary selection and connects unfinished runs to partial-execution reporting. It needs changes before merge: the new heuristics can discard genuine summaries and incorrectly classify execution outcomes. ✅ Partial-result propagation — ✅ Targeted regression coverage — Tests cover late notifications, multiple result lines, fallback commit subjects, and ordinary short summaries. Current-head checks report 17 passed and no failures. This review uses static tracing of the supplied diff and context; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Preserve short summaries after notifications
F5: 🔴 Detect formatted unfinished-work messages
F6: 🔴 Avoid treating quoted labels as unfinished work
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation is focused and current checks pass, but summary preservation and execution classification still have concrete correctness defects. These require localized heuristic corrections and regression coverage before merge. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
1 similar comment
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
|
✅ Applied the requested follow-up changes in commit 650a8aa
Summary of ChangesI've fixed all six findings (F1–F6). The new regressions fail against HEAD and pass with the fix. I also ran 18 related suites: 236 tests, all passing. Typecheck and lint are clean for the changed files. I did not run the full test suite. F1 / F4 – short summaries after a notification are kept (
F2 – notification replies can't come back through the fallback
F3 / F5 – formatting no longer hides unfinished work (
F6 – quoted labels don't count as unfinished work
Worth knowing (not changed): a long summary written after a notification is still dropped if its first sentence mentions a notification-type word and doesn't open with a completed-change verb. For example, "After the background run finished, fixed…" would be treated as a status note. The code before this PR behaved the same way, so I left it. There's no visual change, so I made no preview. Review digestRisk-tiered paths
Validation evidence
Diff size: 11 files changed, +217/−44 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…il against HEAD and pass with the fix. I also ran 18 related suites: 236 tests, all passing. Typecheck and lint are clean for the changed files. I did not run the full test suite.
I've fixed all six findings (F1–F6). The new regressions fail against HEAD and pass with the fix. I also ran 18 related suites: 236 tests, all passing. Typecheck and lint are clean for the changed files. I did not run the full test suite.
**F1 / F4 – short summaries after a notification are kept** (`runSummary.ts`, `isRunStatusNote`)
- Being short and coming after a notification is no longer enough to reject an answer. It needs actual evidence of being a status note:
- a back-reference ("summary above still holds").
- a first sentence about the notification (monitor, watcher, timeout, probe…).
- or a short "nothing else to do" reply.
- A first sentence that opens with a completed change ("Fixed…", "Added…", "Changed…") doesn't count as being about the notification. So "Fixed the timeout in the retry test…" is still kept as a summary.
- Regression: a notification about a failing suite, then fix-up tool calls, then "Fixed the failing retry assertion. All 28 suites now pass." That answer stays as the summary and the commit subject.
**F2 – notification replies can't come back through the fallback**
- The conversation is now split into turns once. The recent-message fallback checks each message with its own turn's notification context, so a long "The watcher timed out. …" reply that was rejected earlier can't win as the "longest recent message".
- **Same defect in the completion comment:** `getLatestUsefulConversationSummary` in `src/jobs/prCompletionComment.ts` filtered messages the same way, without context. A long "Summary: the watcher timed out…" reply could still be published there. It now uses a new core export, `notificationTurnEntryIndexes`, to get the same context.
- Six test suites replace `@propr/core` with a fixed list of exports, so I added the new export to those lists.
- Regressions: two notification replies in a row now give no summary and no commit message, and the completion comment shows "The agent did not provide a summary."
**F3 / F5 – formatting no longer hides unfinished work** (`reportsUnfinishedWork`)
- Detection no longer uses the summary length/structure check. It first strips headings, list markers, bold/italics and label-only lines like "## Summary", then looks at the plain text.
- A length cap still applies to that plain text, so a long report doesn't count as a waiting note.
- Regressions: heading, bullet and bold versions of the "Still running (7 of ~110 suites done)…" message all end as `unfinished_work`, with no summary and no commit message.
**F6 – quoted labels don't count as unfinished work**
- Quoted text (straight quotes, curly quotes, backticks) is removed before checking.
- The waiting statement must start a sentence. I removed the old pattern that matched "waiting for … notification" anywhere in the text.
- "Waiting for…" also needs an object that sounds like the agent's running work (notification, suite, tests, run, job…). So "Waiting for review." doesn't trigger it.
- Regression: three versions of "Changed the status label to 'Waiting for the completion notification'" (curly quotes, straight quotes, no quotes) all stay successful runs with that text as the summary.
**Worth knowing (not changed):** a long summary written after a notification is still dropped if its first sentence mentions a notification-type word and doesn't open with a completed-change verb. For example, "After the background run finished, fixed…" would be treated as a status note. The code before this PR behaved the same way, so I left it.
There's no visual change, so I made no preview.
PR: #3644
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds turn-aware summary selection and routes explicitly unfinished runs through partial-execution handling. It needs localized corrections before merge: Markdown status notes can still be published, and substantive summaries after notifications can be discarded. ✅ Partial-execution integration — ✅ Targeted regression coverage — Tests cover notification replies, ordinary short summaries, formatted waiting messages, and commit/comment fallbacks. The supplied current-head checks report 17 passed and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F7: 🔴 Markdown status notes bypass filtering
F8: 🔴 Notification openings discard real summaries
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation is focused and has useful coverage with passing current-head checks, but two classifier defects still undermine its central publication behavior. Both appear fixable without redesign. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 1306126
Summary of ChangesI've fixed F7 and F8 in F7: formatted status notes
F8: replies that open with the notification
The shared function has two other effects:
This change has no visual effect, so I made no preview. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +105/−7 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…s/runSummary.ts`. The new tests fail on the old classifier and pass with the fix. I also ran 13 related suites (193 tests), and all pass. Typecheck and lint are clean for the core package. The root ESLint config doesn't cover these two files, so the test file isn't linted. I did not run the full test suite. I've fixed F7 and F8 in `packages/core/src/agents/impl/utils/runSummary.ts`. The new tests fail on the old classifier and pass with the fix. I also ran 13 related suites (193 tests), and all pass. Typecheck and lint are clean for the core package. The root ESLint config doesn't cover these two files, so the test file isn't linted. I did not run the full test suite. **F7: formatted status notes** - **Fix:** `isRunStatusNote` now strips the Markdown first and checks every sentence of what's left, whatever the formatting. If every sentence is only a status line, the message is a status note. That covers "Summarizing now.", "Verification is complete." and "summary above still holds". - **Long sentences:** a sentence over 120 characters, or one with text after a colon, doesn't count as a status line. - **Still kept:** a message with any real content, such as `## Summary\n\nFixed the retry backoff… Summarizing now.`. - **Where it applies:** this check runs before the short-message check, so a heading or bullet no longer lets an announcement through. The fix covers summary selection, the recent-message fallback, and the completion comment and commit-subject checks, because they all use this function. - **Tests:** the status message is formatted with a heading, a bullet and bold text. Each case checks the stored summary, the commit message and the published comment. On the old code the heading and bullet cases fail. The bold case already passed, because that message was never treated as formatted. **F8: replies that open with the notification** - **Fix:** the old check (`opensAboutNotification`) is replaced by `isNotificationOnlyReply`. A reply that opens with the notification is now discarded only when none of its sentences report a change. Bullet items are checked as sentences too. - **Wording:** the "reports a change" pattern now also accepts "I've fixed" and "I have fixed". - **Tests:** one test replays the exact sequence from F8. It checks that the new answer becomes the summary and commit subject, and that it's kept when there's no reported result line. It also checks that the comment shows the fix. A reply about a watcher timeout that reports no change is still discarded. The shared function has two other effects: - A message of nothing but status lines is now rejected even if it doesn't come after a notification. - A reply to a notification that starts with something like "I've fixed…" is now kept. Before, it was discarded when its first sentence mentioned the notification. This change has no visual effect, so I made no preview. PR: #3644 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds turn-aware summary selection and propagates unfinished-work status through existing partial-execution handling. It needs changes before merge: valid summaries can still be discarded, and fallback selection can publish an outdated answer. ✅ Partial execution integration — ✅ Targeted regression coverage — Tests exercise notification replies, Markdown-formatted status notes, and resulting comment and commit text. This review used static analysis only; no commands were run. The supplied current-head status reports 12 passed checks, no failures, and four pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F9: 🔴 Preserve substantive summaries containing back-references
F10: 🔴 Prefer the latest valid earlier answer
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation has useful coverage and integrates with existing partial-execution handling, but two summary-selection defects undermine its central objective. Both appear addressable with localized corrections. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit d8bae2f
Summary of ChangesI've fixed F9 and F10 in F9: a back-reference no longer discards a real fix summary.
F10: the newest valid earlier answer wins over an older, longer one.
Verification: all 25 tests in Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +72/−10 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ls/runSummary.ts` and added a regression test for each. Both tests fail on the previous classifier and pass now.
I've fixed F9 and F10 in `packages/core/src/agents/impl/utils/runSummary.ts` and added a regression test for each. Both tests fail on the previous classifier and pass now.
**F9: a back-reference no longer discards a real fix summary.**
- **Cause:** a phrase like "the earlier summary still applies" made a reply a status note no matter what else it said. That happened in both the after-notification check and the general check for short text, which the commit builders in `prCommentJobUtils.ts` and `issueJobPostProcessing.ts` use.
- **Fix:** if any sentence reports a completed change ("Fixed…", "Added…", "I've updated…"), those matches no longer mark the reply as a status note. "All 28 suites now pass. The earlier summary still applies." with no change reported is still a status note.
- **Same flaw nearby:** the check for "nothing else to do" after a notification, and the check for announcements like "Summarizing now." on short texts, had the same problem, so the fix covers them too. "Fixed the retry assertion; nothing else to do." is now kept.
- **Test:** the finding's example is kept as the run summary in both the after-notification and general checks. It becomes the commit subject from the run result, and `buildCommitMessage` uses it instead of the default "Apply follow-up changes from PR comment".
**F10: the newest valid earlier answer wins over an older, longer one.**
- **Fix:** when the final reply is a status note, the summary is now the most recent earlier answer that isn't a status note, short or long. The longest of the last few assistant messages is used only when no such answer exists.
- **Test:** a run with a long first summary, then "Fixed the retry assertion. All 28 suites now pass.", then "The monitor expired; my summary above still holds." now gets the concise fix as its summary and commit subject. This holds with and without a reported result.
**Verification:** all 25 tests in `test/runSummarySelection.test.ts` pass. The six suites that use the new `runSummary` exports, those that replace `@propr/core` with a fixed export list, also pass: 42 tests. Typecheck and lint are clean for `packages/core`. I did not run the full test suite. There's no visual change, so I made no preview.
PR: #3644
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves summary selection by separating notification turns and filtering status replies before publication. It needs localized correctness fixes before merge: legitimate summaries can be discarded, and ordinary future-work statements can incorrectly mark successful runs as incomplete. ✅ Chronological fallback — The selector prefers the newest qualifying earlier answer, preserving later fixes over older, longer summaries. ✅ Termination propagation — The new ✅ Focused coverage — Added tests cover notification replies, Markdown formatting, concise fix summaries, and comment/commit fallbacks. This review is based on static inspection; no commands were run. The supplied current-head status shows 15 passed checks, no failures, and one pending check. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F11: 🔴 Completed fixes can become status notes
F12: 🔴 Future plans incorrectly terminate successful runs
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation and focused tests address the main notification-summary problem, but two classifier false positives affect published summaries and execution status. Both appear fixable without redesign; the pending check alone does not lower the score. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves summary selection by tracking notification turns and result boundaries, but needs changes before merge: the sentence classifier can discard a genuine new summary and retain a notification-only reply. ✅ Boundary propagation — Result indexes are adjusted when the prompt is prepended and preserved through both job adapters. ✅ Focused regression coverage — Tests cover multiple result lines, formatted status notes, unfinished runs, and published comment/commit text. Current checks report 17 passed, none failed or pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F18: 🔴 Preserve summaries describing previously failed requests
F19: 🔴 Preserve sentence boundaries around quoted task names
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation has useful structural handling and substantial passing coverage, but two reproducible classification defects still undermine the central summary-selection behavior. Both permit localized corrections. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 14a3940
Summary of ChangesI fixed F18 and F19, both in F18: a new summary was mistaken for a notification reply when a later clause mentioned an event.
F19: quoted task names split sentences.
Found but not changed (outside F18/F19):
There's no visual change, so I made no preview. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +95/−6 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…/utils/runSummary.ts`, and added a regression test for each. Both tests fail on the previous code and pass now. The 27 suites that touch the changed code pass (517 tests). Typecheck and lint are clean for the core package. I didn't run the full test suite.
I fixed F18 and F19, both in `packages/core/src/agents/impl/utils/runSummary.ts`, and added a regression test for each. Both tests fail on the previous code and pass now. The 27 suites that touch the changed code pass (517 tests). Typecheck and lint are clean for the core package. I didn't run the full test suite.
**F18: a new summary was mistaken for a notification reply when a later clause mentioned an event.**
- **Fix:** the event wording ("timed out", "expired", "is the …") now only counts when it belongs to the background job, monitor or watcher the sentence is about. Words like "that", "which", "when" or "whose" before it mean it belongs to a different clause. A clause set off by commas is still allowed, so "The background job, which I started earlier, timed out." still counts as a notification reply.
- **Same flaw elsewhere:** the words before the job, monitor or watcher had the same problem ("The requests that background jobs timed out are now retried."). So did the "It was the …" pattern ("It was the retry that background jobs needed."). Both are fixed the same way.
- **Test:** "The background job now retries requests that timed out." after a notification now becomes the summary and commit subject. The test also checks variants with "whose" and "when", and that real replies like "The background job I started earlier timed out." are still recognised.
**F19: quoted task names split sentences.**
- **Fix:** quoted or code-formatted text is now replaced with a plain word instead of `…`, which had been read as the end of a sentence. If the quote itself ends a sentence (`He wrote "Done." Then…`), the sentence still ends there.
- **Same flaw elsewhere:** the check for runs that are still waiting had the same bug. "Waiting for the `full-suite` run to finish." was split in two, so the run wasn't reported as unfinished. The same change fixes it.
- **Test:** "The watcher `full-suite` timed out; nothing else to do." after a notification no longer replaces the earlier summary or the commit subject. The test also covers straight, curly and single quotes, the still-waiting case, and that quoted text in a real change is still kept as a summary.
**Found but not changed (outside F18/F19):**
- An event word that follows the job without a "that"/"which" in between is still treated as a notification. For example, "The background job now retries requests timed out by the proxy." would still be read as a reply.
- The still-waiting check accepts any sentence that opens with "Waiting for…" and later names a run, job, test and so on. So a completed change phrased that way, like "Waiting for the token refresh no longer blocks the build.", would be treated as unfinished work.
There's no visual change, so I made no preview.
PR: #3644
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves summary selection by tracking notification turns and result boundaries, but needs changes before merge: two classification errors can discard valid summaries or mark completed work as unfinished. ✅ Boundary propagation — Result indexes survive prompt insertion and both job adapters, preserving notification context downstream. ✅ Focused regression coverage — Tests cover late notifications, newer concise fixes, formatted status notes, and resulting commit and comment text. The supplied current-head checks show 15 passed, none failed, and one pending. This review uses static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F20: 🔴 Quoted waiting text marks completed work unfinished
F21: 🔴 Product descriptions are mistaken for notifications
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation has substantial targeted coverage and sound boundary propagation, but valid completed summaries can still produce incorrect publication text or execution status. Both defects admit localized fixes. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 80010fd
Summary of ChangesI fixed F20 and F21 in F20: quoted waiting text no longer marks a run unfinished. The check for "still waiting" wording now skips Markdown blockquotes, nested ones included, and fenced code blocks using ``` or ~~~. A fence that is never closed runs to the end of the message, as Markdown shows it. The wording is still caught in the agent's own sentences, headings and lists, including around a quoted or fenced example. The length limit for status notes works as before. Everything that uses this check now gets the fix: the run outcome (
F21: product descriptions are no longer taken for notifications. Before, "background job" followed by
A related gap I left alone: when a short answer after a notification starts with "It", "That" or "This", such as Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +81/−4 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…/runSummary.ts` and added a regression test for each. Both tests fail on the previous code and pass now. The 27 suites that touch the changed code pass (316 tests). Typecheck and lint are clean for the core package. I didn't run the full test suite.
I fixed F20 and F21 in `packages/core/src/agents/impl/utils/runSummary.ts` and added a regression test for each. Both tests fail on the previous code and pass now. The 27 suites that touch the changed code pass (316 tests). Typecheck and lint are clean for the core package. I didn't run the full test suite.
**F20: quoted waiting text no longer marks a run unfinished.** The check for "still waiting" wording now skips Markdown blockquotes, nested ones included, and fenced code blocks using ``` or ~~~. A fence that is never closed runs to the end of the message, as Markdown shows it. The wording is still caught in the agent's own sentences, headings and lists, including around a quoted or fenced example. The length limit for status notes works as before. Everything that uses this check now gets the fix: the run outcome (`resolveUnfinishedWork` via `selectRunSummary`), the status-note check, the completion comment and both commit builders.
- **Regression test:** a completed change ending in a quoted or fenced waiting message, such as `Updated the progress message to:\n\n> Waiting for the completion notification.`, now stays successful and keeps its summary. The same wording outside the quote is still reported as unfinished.
**F21: product descriptions are no longer taken for notifications.** Before, "background job" followed by `is`/`was` and an article was enough to count as a reply to a notification. Now the words after the article must also name a notifier, like "the probe I started", or the sentence must use `is from`/`was from`.
- **Regression test:** after a notification and further repairs, the new answer `The background job is a persistent worker that retries failed requests.` is kept as the summary and the commit subject. "The monitor is the only place that…" is kept too. Replies like "That notification is the depth-measurement probe I started earlier." are still recognised as replies.
**A related gap I left alone:** when a short answer after a notification starts with "It", "That" or "This", such as `It is a background job that retries failed requests.`, it is still treated as a reply to the notification. That form only counts when the words after the article name a notifier. Telling it apart from a real reply ("It was the background watcher on the full suite, which…") would take a broader wording change than F21 asked for.
PR: #3644
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds turn-aware summary selection and an ✅ Boundary propagation — Result-line indexes are preserved through parsing, prompt insertion, and job adapters. ✅ Partial execution handling — Recognized unfinished-work messages produce an explicit termination reason that routes follow-ups through the existing partial-publication path. ✅ Regression coverage — Tests cover notification boundaries, formatted status messages, quoted product text, and genuine summaries after additional fixes. All reported current-head checks passed or were skipped. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F22: 🔴 Verification-only replies replace substantive summaries
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Add captured stream fixturesThe synthetic tests thoroughly exercise individual wording rules. Anonymized fixtures from actual affected runs would additionally validate message grouping and result boundaries against provider output. This is optional coverage beyond the localized regression required above. ScoreThe implementation has substantial coverage and passing current-head checks, but one central summary-selection case remains incorrect. The required correction is localized. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved the one conflict, in What the conflict was about: both branches added a different import on the same line, right after the
How I resolved it: I kept both imports, one after the other, and removed the markers. Why: the two changes don't overlap. Each import is used elsewhere in the merged file, and both source modules exist, so dropping either one would break the code from that branch. 🤖 Resolution Details
System-triggered merge conflict resolution |
…-5-5-completion-comments-and-c-20261117-0458-4qk Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - src/jobs/prCommentJobUtils.ts PR: #3644 Model: Claude Opus 5.5
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved all three conflicts, and no conflict markers are left in any file. The core package typechecks and builds. These test files pass:
I didn't run the full suite. The root typecheck shows one error, a missing Why they conflicted: both branches added a feature that picks which agent message is the run summary, and both named their main function
1.
|
…-5-5-completion-comments-and-c-20261117-0458-4qk Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - packages/core/src/index.ts - src/jobs/prCompletionComment.ts - test/runSummarySelection.test.ts PR: #3644 Model: Claude Opus 5.5
…xists" when an earlier run left the PR's local branch behind. One acceptance criterion is handled differently than written (unpushed commits, below), so please check that before merging. What was going wrong. The worker already had a path for reusing an existing local branch. The four failures on #3644 came through it (the "Cannot create worktree:" prefix only comes from there), so its existence check said "no such branch" while git still saw one. The check worked by listing branches (`git show-ref --heads`), but `git worktree add -b` reads the branch ref itself. When the two disagree, the code fell through to `-b` and failed on every later run. I couldn't reproduce that disagreement in this container (git 2.39; the worker image is Alpine with a newer git), so this is the most likely cause, not a confirmed one. Changes in `packages/core/src/git/worktreeCreation.ts`: - Existence check: it now looks the ref up directly, the same way `git worktree add -b` does. If the branch exists but its tip commit is missing from the clone, the run fails with a message naming the branch and changes nothing. - Fallback: if `git worktree add -b` still says the branch already exists, the worker reuses the existing branch the same safe way. If the branch can't be read, the run fails with a message naming it. Runs that need a brand-new branch still refuse an existing one. How each stale state is handled now: - Same as remote: reused as is. - Behind remote: moved forward to the fetched remote head. - Diverged from a force-pushed remote: restarted from the remote head, with the local-only commits saved under `refs/propr/superseded/…`. This was already the behaviour. - Held by a worktree whose folder is gone: the branch is released and reused. A leftover registration for the same worktree path is cleared, but only when nothing in it would be lost. I didn't add a blanket `git worktree prune`: the worker turns pruning off on purpose so that work isn't lost. Unpushed commits. The issue asks for the run to fail when the stale branch has commits that aren't on the remote. I kept the current behaviour instead: the follow-up continues on top of those commits, and nothing is deleted. Existing tests require this, and goal continuation and replacement attempts rely on it. Changing it to fail would be a small edit in `realignDivergedLocalBranch` if you want the stricter rule. Tests. I added `test/followupStaleLocalBranch.integration.test.ts`, which uses real temporary git repos with a bare remote and runs without `SSH_ASKPASS`. It covers branch equal to remote, behind, unpushed commits kept, diverged with a backup ref, a worktree whose folder is gone (both the different-path and same-path cases), a missing tip commit, and the fallback. A missing tip commit is actually refused earlier, at fetch, with an error naming the branch. The new suite and four existing worktree suites all pass (8, 83, 3, 9 and 9 tests). Lint and typecheck for `packages/core` are clean. There's nothing visual to preview.
…already exists" when creating the worktree (#3708) What was going wrong. The worker already had a path for reusing an existing local branch. The four failures on #3644 came through it (the "Cannot create worktree:" prefix only comes from there), so its existence check said "no such branch" while git still saw one. The check worked by listing branches (`git show-ref --heads`), but `git worktree add -b` reads the branch ref itself. When the two disagree, the code fell through to `-b` and failed on every later run. I couldn't reproduce that disagreement in this container (git 2.39; the worker image is Alpine with a newer git), so this is the most likely cause, not a confirmed one. Changes in `packages/core/src/git/worktreeCreation.ts`: - Existence check: it now looks the ref up directly, the same way `git worktree add -b` does. If the branch exists but its tip commit is missing from the clone, the run fails with a message naming the branch and changes nothing. - Fallback: if `git worktree add -b` still says the branch already exists, the worker reuses the existing branch the same safe way. If the branch can't be read, the run fails with a message naming it. Runs that need a brand-new branch still refuse an existing one. How each stale state is handled now: - Same as remote: reused as is. - Behind remote: moved forward to the fetched remote head. - Diverged from a force-pushed remote: restarted from the remote head, with the local-only commits saved under `refs/propr/superseded/…`. This was already the behaviour. - Held by a worktree whose folder is gone: the branch is released and reused. A leftover registration for the same worktree path is cleared, but only when nothing in it would be lost. I didn't add a blanket `git worktree prune`: the worker turns pruning off on purpose so that work isn't lost. Unpushed commits. The issue asks for the run to fail when the stale branch has commits that aren't on the remote. I kept the current behaviour instead: the follow-up continues on top of those commits, and nothing is deleted. Existing tests require this, and goal continuation and replacement attempts rely on it. Changing it to fail would be a small edit in `realignDivergedLocalBranch` if you want the stricter rule. Tests. I added `test/followupStaleLocalBranch.integration.test.ts`, which uses real temporary git repos with a bare remote and runs without `SSH_ASKPASS`. It covers branch equal to remote, behind, unpushed commits kept, diverged with a backup ref, a worktree whose folder is gone (both the different-path and same-path cases), a missing tip commit, and the fallback. A missing tip commit is actually refused earlier, at fetch, with an error naming the branch. The new suite and four existing worktree suites all pass (8, 83, 3, 9 and 9 tests). Lint and typecheck for `packages/core` are clean. There's nothing visual to preview. Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
AI Implementation Summary
Closes #3621
Branch:
3621/claude-opus-5-5-completion-comments-and-c-20261117-0458-4qkCommits: ✅ Changes committed (2597b1e)
AI Processing Completed
Execution Details:
Summary:
I've fixed it. ProPR now takes the summary and commit subject from the agent's real final answer, not from a later reply to a background notification. The new tests pass, and so do 29 existing suites that touch result parsing, completion comments and commit messages. Typecheck and lint are clean. I did not run the full test suite.
Choosing the summary (new
packages/core/src/agents/impl/utils/runSummary.ts, called fromdockerResultProcessor.ts):Still-waiting runs (the #3479 case): if a run reports success but its last short message says it is still waiting ("Still running… Waiting for the completion notification"), it now ends with a new
unfinished_workreason. That reason is handled like the existing early-stop reasons (timeout, max turns), so a follow-up gets the "Applied partial follow-up changes" comment. The error quotes the agent's last message, and the status note is never published as the summary.Comment and commit message:
src/jobs/prCompletionComment.ts, the summary taken from the conversation now skips status notes. When nothing is left, it no longer shows the last thing the agent said. A finished run says "The agent did not provide a summary."; a partial run still lists its changed files.prCommentJobUtils.tsandissueJobPostProcessing.tsnever use a status note. They fall back to the existing default subjects: "Apply follow-up changes from PR comment" or "Resolve issue #N - <title>". The commit message format is otherwise unchanged.Tests:
test/runSummarySelection.test.tsreplays streams shaped like the issue's examples:Six existing suites replace
@propr/corewith a fixed list of exports, so I added the new exports to those lists.Limits:
There's no visual change, so I made no preview.
Review digest
Risk-tiered paths
packages/core/src/agents/impl/utils/dockerResultProcessor.ts(+29/−3)packages/core/src/agents/impl/utils/index.ts(+2/−0)packages/core/src/agents/impl/utils/runSummary.ts(added, +168/−0)packages/core/src/agents/termination.ts(+1/−0)packages/core/src/agents/types.ts(+3/−1)packages/core/src/claude/claudeHelpers.ts(+3/−0)packages/core/src/index.ts(+1/−0)packages/core/src/queue/taskQueue.types.ts(+1/−1)packages/core/src/utils/github/logFiles.ts(+1/−1)src/jobs/followupCommitSubject.ts(added, +2/−0)src/jobs/issueJobPostProcessing.ts(+5/−2)src/jobs/prCommentJobUtils.ts(+7/−6)src/jobs/prCompletionComment.ts(+24/−12)test/issueJobBlocked.test.ts(+2/−0)test/issueJobRecoveredPRAutoAssignment.test.ts(+2/−0)test/issueJobUnpublishableFailure.test.ts(+2/−0)test/prCommentBlocked.test.ts(+2/−0)test/prCompletionTriggerReleaseFailure.test.ts(+2/−0)test/runSummarySelection.test.ts(added, +181/−0)test/workflowPreviewPublication.test.ts(+2/−0)Validation evidence
Diff size: 20 files changed, +440/−26 lines
Detailed Logs:
d0602b13-5d91-41e3-b248-1c105bc543c6Log files stored at:
/usr/src/app/logs/executions/issue-3621-2026-11-17T05-17-54-418Z-conversation.json/usr/src/app/logs/executions/issue-3621-2026-11-17T05-17-54-418Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3621.
💡 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!