Skip to content

[3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) - #3676

Merged
integry merged 1 commit into
3616-epic-0-9-d8bfrom
3673/claude-opus-5-5-bot-comments-and-pr-bodie-20261117-1404-xif
Nov 17, 2026
Merged

integry merged 1 commit into
3616-epic-0-9-d8bfrom
3673/claude-opus-5-5-bot-comments-and-pr-bodie-20261117-1404-xif

Conversation

@propr-dev

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

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3673

Branch: 3673/claude-opus-5-5-bot-comments-and-pr-bodie-20261117-1404-xif
Commits: ✅ 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 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

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.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (15 files)
    • 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)
  • Low risk (3 files)
    • test/botCommentText.test.ts (added, +244/−0)
    • test/redactSecrets.test.ts (+4/−3)
    • test/reviewCommentFormatter.test.ts (+7/−5)

Validation evidence

  • No repository validation commands ran.

Diff size: 18 files changed, +499/−138 lines

Detailed Logs:

  • Conversation: 333 messages
  • Session: d313234f-51ed-4e46-ac4f-e82979122544

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3673-2026-11-17T14-26-19-017Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3673-2026-11-17T14-26-19-017Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: 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 ...


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!

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

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

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

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

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

First action: /review

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

@propr-dev

propr-dev Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on ed51fc8 are holding the loop back:

  • Validate Changes — not finished
  • Full Test Suite Shard 4/4 — not finished
  • Classify changed surfaces — not finished
  • Full Test Suite Shard 1/4 — not finished
  • Full Test Suite Shard 2/4 — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished

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.

@propr-dev

propr-dev Bot commented Nov 17, 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 17, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

The 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 /fix instructions, and is excluded from the parent comment’s posted-review count.

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

No merge blockers.

Suggestions

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

S1: 🟢 Distinguish authentication failure sources

src/jobs/failureCause.ts maps every 401, “unauthorized,” and authentication failure to “Provider authentication failed.” The shared follow-up error handler also handles GitHub failures, so a sanitized GitHub API authentication failed (401) receives an inaccurate provider heading. Consider using a neutral authentication sentence or distinguishing known GitHub errors. This is an optional diagnostic refinement: the underlying error remains visible and processing behavior is unaffected.

S2: 🟢 Exercise task links through callers

The 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 src/jobs/issueJobHelpers.ts and src/jobs/issueJobPostProcessing.ts. The supplied call sites pass the URL correctly, so this is additional regression protection rather than a merge requirement.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 36s
  • Tokens: 57,571 (56,906 in / 665 out)
  • Cost: $0.48

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

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 17, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) ✅⑧ [3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) Nov 17, 2026
@integry
integry merged commit 2d702ae into 3616-epic-0-9-d8b Nov 17, 2026
64 checks passed
@propr-dev propr-dev Bot changed the title ✅⑧ [3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) [3673 by Claude Opus 5.5] Bot comments and PR bodies: say what failed, drop internal paths and debug blocks (text only) Nov 17, 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