Repository navigation
[3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) - #3676
Conversation
…n item 5. I left out one part of item 5: the `AI`/`llm-*` labels being applied twice when a PR is created. That should be named in the PR description. The new test file `test/botCommentText.test.ts` passes (16 tests, using the quoted examples as inputs), and so do the existing suites that touch these comments. Lint and typecheck are clean. No file under `src/jobs` gains locking, Redis keys or queue logic. 1. Failed or invalid review comments (`reviewCommentFormatter.ts`, new `reviewCompletionComment.ts`) - Invalid output: "⚠️ Review output was invalid." now gives one of three reasons: - the review output could not be parsed. - the reviewer returned no text. - the review cited files the PR doesn't change. - Invalid output, continued: these comments drop the "Next step: /fix" block and carry the `error="true"` marker. - Provider failure: "❌ Review failed." is always followed by a sentence. An empty error gives "The provider call failed without an error message." - Parent comment: "Posted N reviews" no longer counts error reviews, and failed links are marked "(failed)". It now also says "Posted 0 reviews" instead of "Posted 0 review". The hidden marker that tracks whether a run failed still follows the provider result, so nothing about scheduling changes. 2. Failure comments - PR follow-up failures now open with a plain cause, such as "Provider authentication failed." or "The agent process stopped unexpectedly.", and link to the task. - Comment IDs: "Comment ID: 0" is gone. Real comment IDs keep their `✓` receipts, because polling reads them. - Removed text: "Please check the logs for more details." is gone. - Issue failure comments get the same cause line. - Upstream HTML page titles become the status code, e.g. "403 Attention Required! | Cloudflare" → "HTTP 403". GitHub HTML error pages are reported by status only. - Completion reports no longer show the `<synthetic>` model line, or the token and cost lines when no tokens were used. 3. PR bodies (`logFiles.ts`): the "Detailed Logs" block and the "Latest Conversation Messages" block are replaced by one "View task" link. Log files are still written on the worker. Existing PR bodies are not touched. 4. CI-failure comment: "Commit:" now links to the commit, and a separate "Run:" line links to the job run. 5. Labels and ids - Task ids: the `-undefined-` came from comments with no `updated_at`. The revision id now uses the body digest alone in that case. - `AI` with `AI-done`: the current code already removes `AI` when it adds `AI-done`; a test pins this. The closed issues I checked that kept both (#3512, #3529) were labelled on Nov 13 and show a different label order from this code. My guess is that the running instance was on an older build. - Left out — double labels at PR creation: on #3632 and #3635 the bot applied `AI` and `llm-*` twice, about a second apart. The only label call has a retry delay of at least 2 seconds and isn't reached by the fallback path, so the second call probably comes from a duplicate run. Fixing that is not a text change. To fit the 400-line lint limit I removed a duplicate `sanitizeErrorMessage` from `errorHandlers.ts` (it now imports the shared one) and moved link-building into small helpers. I updated a few existing tests: some used placeholder review text that is now invalid output, and one checked for the conversation preview that was removed. No previews were made, since this only changes comment text.
|
/ultrafix goal=8 max=4 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 4) First action:
|
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves failure explanations, review counts, task links, and CI links with focused helpers and regression coverage. No merge-blocking defect was verified in the supplied diff and context. It is ready to merge within scope, conditional on the four pending test shards passing. ✅ Accurate review summaries — Invalid output receives an error marker, loses misleading ✅ Preserved request receipts — Follow-up failures remove synthetic ID zero while retaining real comment checkmarks and failure evidence consumed by polling. ✅ Cleaner navigation — Completion reports replace internal log paths and conversation excerpts with task links, while CI comments link separately to the commit and run. This was a static review of the supplied code; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Distinguish authentication failure sources
S2: 🟢 Exercise task links through callersThe new tests verify completion builders with an explicitly supplied task URL. A caller-level test covering PR creation and issue failure reporting would additionally protect the new task-ID plumbing in ScoreThe implementation is focused and preserves the relevant receipt and evidence contracts, with useful tests for the changed output. The authoritative check summary reports no failures; four test shards remain pending. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3673
Branch:
3673/claude-opus-5-5-bot-comments-and-pr-bodie-20261117-1404-xifCommits: ✅ Changes committed (ed51fc8)
AI Processing Completed
Execution Details:
Summary:
I've implemented the text changes for items 1–4 and the task-id fix in item 5. I left out one part of item 5: the
AI/llm-*labels being applied twice when a PR is created. That should be named in the PR description. The new test filetest/botCommentText.test.tspasses (16 tests, using the quoted examples as inputs), and so do the existing suites that touch these comments. Lint and typecheck are clean. No file undersrc/jobsgains locking, Redis keys or queue logic.1. Failed or invalid review comments (
reviewCommentFormatter.ts, newreviewCompletionComment.ts)error="true"marker.2. Failure comments
✓receipts, because polling reads them.<synthetic>model line, or the token and cost lines when no tokens were used.3. PR bodies (
logFiles.ts): the "Detailed Logs" block and the "Latest Conversation Messages" block are replaced by one "View task" link. Log files are still written on the worker. Existing PR bodies are not touched.4. CI-failure comment: "Commit:" now links to the commit, and a separate "Run:" line links to the job run.
5. Labels and ids
-undefined-came from comments with noupdated_at. The revision id now uses the body digest alone in that case.AIwithAI-done: the current code already removesAIwhen it addsAI-done; a test pins this. The closed issues I checked that kept both (OAuth sign-in for MCP servers: connect from Settings in the browser, tokens held and refreshed by Core #3512, Compute one PR status and show it live at the top of the PR body #3529) were labelled on Nov 13 and show a different label order from this code. My guess is that the running instance was on an older build.AIandllm-*twice, about a second apart. The only label call has a retry delay of at least 2 seconds and isn't reached by the fallback path, so the second call probably comes from a duplicate run. Fixing that is not a text change.To fit the 400-line lint limit I removed a duplicate
sanitizeErrorMessagefromerrorHandlers.ts(it now imports the shared one) and moved link-building into small helpers.I updated a few existing tests: some used placeholder review text that is now invalid output, and one checked for the conversation preview that was removed. No previews were made, since this only changes comment text.
Review digest
Risk-tiered paths
packages/core/src/utils/github/logFiles.ts(+18/−34)packages/core/src/webhook/ciFailureFollowup.ts(+3/−2)packages/core/src/webhook/commentEventHandler.ts(+7/−2)src/jobs/errorHandlers.ts(+1/−44)src/jobs/errorSanitizer.ts(+18/−13)src/jobs/failureCause.ts(added, +26/−0)src/jobs/issueJobHelpers.ts(+4/−7)src/jobs/issueJobPostProcessing.ts(+12/−4)src/jobs/prCommentFailureComment.ts(added, +45/−0)src/jobs/prCommentJobUtils.ts(+3/−3)src/jobs/prCommentReviewJob.ts(+8/−17)src/jobs/reviewCommentFormatter.ts(+33/−4)src/jobs/reviewCompletionComment.ts(added, +35/−0)src/jobs/taskPageUrl.ts(added, +8/−0)src/jobs/upstreamPageTitle.ts(added, +23/−0)test/botCommentText.test.ts(added, +244/−0)test/redactSecrets.test.ts(+4/−3)test/reviewCommentFormatter.test.ts(+7/−5)Validation evidence
Diff size: 18 files changed, +499/−138 lines
Detailed Logs:
d313234f-51ed-4e46-ac4f-e82979122544Log files stored at:
/usr/src/app/logs/executions/issue-3673-2026-11-17T14-26-19-017Z-conversation.json/usr/src/app/logs/executions/issue-3673-2026-11-17T14-26-19-017Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3673.
💡 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!