fix(reviewer): suggest @bot retry in the failure comment #66

Merged
rcsheets merged 1 commit from feat/retry-suggestion-on-failure into main 2026-05-30 11:51:46 +00:00
Owner

The whole point of adding the retry command was so users could
recover from transient failures without re-assigning the bot as
reviewer, but the failure comment never told them the command
existed. Add the suggestion right next to the tracking id.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

The whole point of adding the retry command was so users could recover from transient failures without re-assigning the bot as reviewer, but the failure comment never told them the command existed. Add the suggestion right next to the tracking id. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(reviewer): suggest @bot retry in the failure comment
All checks were successful
ci / check (pull_request) Successful in 44s
5ccd9b541b
The whole point of adding the retry command was so users could
recover from transient failures without re-assigning the bot as
reviewer, but the failure comment never told them the command
existed. Add the suggestion right next to the tracking id.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collaborator

Automated review by pr-reviewer v0.29.0 | Safety Check | Mistral Small | tracking id r-1a89f4-6148c6
This is an AI-generated review and may contain mistakes.

Status: Failed


Review failed. Tracking id r-1a89f4-6148c6 — see logs for details.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.29.0 | Safety Check | Mistral Small | tracking id `r-1a89f4-6148c6`* *This is an AI-generated review and may contain mistakes.* **Status:** ❌ Failed --- Review failed. Tracking id `r-1a89f4-6148c6` — see logs for details.
Collaborator

Automated review by pr-reviewer v0.29.0 | Full Review | Mistral Small | tracking id r-1aceb9-890b1a
This is an AI-generated review and may contain mistakes.

Status: Completed


Verdict: Approve — The change is minimal, correct, and aligns with project goals, addressing a clear user experience gap.

Code Review: PR #66 - fix(reviewer): suggest @bot retry in the failure comment

Overview

This PR adds a single line to the failure comment template in internal/runner/runner.go to suggest users retry a failed review using the @bot retry command. The change directly addresses the PR description's goal of making the retry command discoverable to users.

Strengths

  1. Minimal and focused change: The diff shows a single-line addition that completes the user journey for retrying failed reviews.
  2. Alignment with design: The change fits well with the project's two-tier review system and comment-in-place update pattern.
  3. No breaking changes: The modification only affects the content of the failure comment; no APIs or behaviors are altered.
  4. Consistent with existing patterns: The added line uses the same formatting and style as the rest of the comment body.

Concerns

  1. Test coverage: The PR does not include tests, and the existing code lacks tests for the updateFailedComment function. However, this is consistent with the broader codebase, where the runner package lacks comprehensive test coverage. This could be addressed in a follow-up PR.
  2. Optional documentation: If users are expected to use the @bot retry command, it might be helpful to document it in project guidance files (e.g., CLAUDE.md). However, this is not a requirement for merging this PR.

Detailed Observations

Bugs or Logic Errors

  • None. The change is a straightforward addition of user-facing text with no logic changes.

Security Vulnerabilities

  • None. The change does not introduce new user input handling or external interactions.

Breaking Changes

  • None. The modification only affects the content of the failure comment.

Error Handling and Edge Cases

  • None. The change does not interact with error handling or edge cases.

Performance Concerns

  • None. The change adds a static string with no runtime computation or I/O.

Architecture and Design

  • The change is consistent with the project's design patterns:
    • Uses in-place comment updates (existing behavior).
    • Provides a clear, actionable suggestion to users.
    • Leverages the existing @bot retry command mechanism.

Test Coverage Gaps

  • The updateFailedComment function is not tested, and the broader runner package lacks comprehensive test coverage. However, this is a pre-existing issue and not introduced by this PR.

Readability and Maintainability

  • The change is clear and follows the existing code style. The added line:
    • Uses the same formatting as the rest of the comment body.
    • References r.BotUsername, which is consistent with other user-facing strings.
    • Maintains the existing flow of the failure comment.

Recommendation

Approve — This is a well-executed, minimal change that addresses a clear user experience gap. No blocking issues were found. The PR is ready to merge as-is.

Optional Follow-ups

  • Add tests for updateFailedComment in a future PR.
  • Document the @bot retry command in project guidance files (e.g., CLAUDE.md).
📚 Context used in this review

Project guidance files:

  • CLAUDE.md

Repository fragments:

  • internal/runner/format.go (extract failed; whole-file fallback) — extracted in answer to: "the definitions of HeaderFailed, HeaderPending, HeaderSkipped, and TrackingIDMD, including how they construct their messages and when they include DashboardBaseURL links"
*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.29.0 | Full Review | Mistral Small | tracking id `r-1aceb9-890b1a`* *This is an AI-generated review and may contain mistakes.* **Status:** ✅ Completed --- **✅ Verdict: Approve** — The change is minimal, correct, and aligns with project goals, addressing a clear user experience gap. # Code Review: PR #66 - fix(reviewer): suggest @bot retry in the failure comment ## Overview This PR adds a single line to the failure comment template in `internal/runner/runner.go` to suggest users retry a failed review using the `@bot retry` command. The change directly addresses the PR description's goal of making the retry command discoverable to users. ## Strengths 1. **Minimal and focused change**: The diff shows a single-line addition that completes the user journey for retrying failed reviews. 2. **Alignment with design**: The change fits well with the project's two-tier review system and comment-in-place update pattern. 3. **No breaking changes**: The modification only affects the content of the failure comment; no APIs or behaviors are altered. 4. **Consistent with existing patterns**: The added line uses the same formatting and style as the rest of the comment body. ## Concerns 1. **Test coverage**: The PR does not include tests, and the existing code lacks tests for the `updateFailedComment` function. However, this is consistent with the broader codebase, where the `runner` package lacks comprehensive test coverage. This could be addressed in a follow-up PR. 2. **Optional documentation**: If users are expected to use the `@bot retry` command, it might be helpful to document it in project guidance files (e.g., `CLAUDE.md`). However, this is not a requirement for merging this PR. ## Detailed Observations ### Bugs or Logic Errors - None. The change is a straightforward addition of user-facing text with no logic changes. ### Security Vulnerabilities - None. The change does not introduce new user input handling or external interactions. ### Breaking Changes - None. The modification only affects the content of the failure comment. ### Error Handling and Edge Cases - None. The change does not interact with error handling or edge cases. ### Performance Concerns - None. The change adds a static string with no runtime computation or I/O. ### Architecture and Design - The change is consistent with the project's design patterns: - Uses in-place comment updates (existing behavior). - Provides a clear, actionable suggestion to users. - Leverages the existing `@bot retry` command mechanism. ### Test Coverage Gaps - The `updateFailedComment` function is not tested, and the broader `runner` package lacks comprehensive test coverage. However, this is a pre-existing issue and not introduced by this PR. ### Readability and Maintainability - The change is clear and follows the existing code style. The added line: - Uses the same formatting as the rest of the comment body. - References `r.BotUsername`, which is consistent with other user-facing strings. - Maintains the existing flow of the failure comment. ## Recommendation **Approve** — This is a well-executed, minimal change that addresses a clear user experience gap. No blocking issues were found. The PR is ready to merge as-is. ## Optional Follow-ups - Add tests for `updateFailedComment` in a future PR. - Document the `@bot retry` command in project guidance files (e.g., `CLAUDE.md`). <details> <summary>📚 Context used in this review</summary> **Project guidance files:** - `CLAUDE.md` **Repository fragments:** - `internal/runner/format.go` (extract failed; whole-file fallback) — extracted in answer to: "the definitions of HeaderFailed, HeaderPending, HeaderSkipped, and TrackingIDMD, including how they construct their messages and when they include DashboardBaseURL links" </details>
rcsheets deleted branch feat/retry-suggestion-on-failure 2026-05-30 11:51:47 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brooktrails/pr-reviewer!66
No description provided.