Sonnet Review Bot sonnet-review-bot
  • Joined on 2026-04-24
sonnet-review-bot commented on pull request rodin/review-bot#42 2026-05-02 19:08:38 +00:00
feat: resolve old inline comments when superseding review

[MINOR] Resolution of old inline comments is gated on locating the old timeline comment ID (existingCommentID > 0), but proceeds regardless of whether EditComment actually succeeded. This slightly diverges from the stated behavior "Only runs when an old review was successfully superseded." Consider gating resolution explicitly on a successful supersede or documenting the intended behavior.

sonnet-review-bot commented on pull request rodin/review-bot#42 2026-05-02 19:08:38 +00:00
feat: resolve old inline comments when superseding review

[MINOR] ListReviewComments retrieves a single page of comments. If the API paginates review comments, this may miss results beyond the first page. Consider adding pagination similar to ListReviews to avoid missing comments on large reviews.

sonnet-review-bot approved rodin/review-bot#41 2026-05-02 19:06:17 +00:00
feat: self-request as reviewer before posting

Sonnet Review

sonnet-review-bot commented on pull request rodin/review-bot#41 2026-05-02 19:06:17 +00:00
feat: self-request as reviewer before posting

[MINOR] New exported methods (GetAuthenticatedUser and RequestReviewer) were added without accompanying tests. Repository conventions state to test every exported function; adding unit tests would improve coverage and guard against API regressions.

sonnet-review-bot commented on pull request rodin/review-bot#41 2026-05-02 19:06:17 +00:00
feat: self-request as reviewer before posting

[MINOR] RequestReviewer treats only 200 OK and 201 Created as success. Consider accepting 204 No Content as success as well, since some APIs return 204 for idempotent operations.

sonnet-review-bot commented on pull request rodin/review-bot#39 2026-05-02 18:45:28 +00:00
fix: post new review first, then supersede old with link

[NIT] When constructing newReviewURL via string formatting, consider using net/url.JoinPath (and adding the fragment separately) or trimming a trailing slash to avoid possible double slashes if giteaURL ends with '/'. This is minor, as browsers typically handle double slashes, but it improves robustness.

sonnet-review-bot commented on pull request rodin/review-bot#39 2026-05-02 18:45:28 +00:00
fix: post new review first, then supersede old with link

[NIT] The doc comment for buildSupersededBody mentions only collapsing and commit info; consider updating it to also note that it includes a link to the new review via newReviewURL for clarity.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:35:45 +00:00
feat: always post fresh review, supersede old with collapsed body

[MINOR] When superseding the previous review, GetTimelineReviewCommentID is used to find a timeline comment containing the sentinel, but it returns the first matching event rather than the latest. If multiple reviews with the same sentinel exist, this may patch an older review instead of the most recent non-superseded one found by findOwnReview. Consider matching the timeline event to the selected review (e.g., by comparing CommitID or body) or selecting the latest matching event by ID.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:35:45 +00:00
feat: always post fresh review, supersede old with collapsed body

[NIT] buildSupersededBody appends the sentinel to the superseded comment. This is useful for diagnostics but also increases the chance that future timeline scans pick a superseded event. Since findOwnReview already skips superseded bodies, consider adjusting GetTimelineReviewCommentID to prefer the latest or match by CommitID to avoid editing superseded entries, even if they contain the sentinel.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:32:15 +00:00
feat: always post fresh review, supersede old with collapsed body

[MAJOR] findOwnReviewStrict is called with expectedLogin set to reviewer-name (*reviewerName), but reviews[i].User.Login contains the Gitea account login. This mismatch will typically cause the strict check to filter out all candidate reviews, so older reviews are never marked as superseded. Pass the actual Gitea login (e.g., derived via the sentinel from existing reviews or via a /user API call) or disable the strict check by passing an empty expectedLogin.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:28:01 +00:00
feat: always post fresh review, supersede old with collapsed body

[NIT] If commitSHA is empty, the superseded summary renders as "Previous findings (commit )". Consider omitting the commit text when the SHA is empty to avoid awkward formatting.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:28:01 +00:00
feat: always post fresh review, supersede old with collapsed body

[MINOR] Selecting which previous review to supersede relies on findOwnReview returning the first match. If ListReviews does not guarantee reverse-chronological ordering, this may supersede an older review instead of the most recent one. Consider choosing the most recent review (e.g., by CreatedAt/ID) or filtering out already-superseded bodies.

sonnet-review-bot commented on pull request rodin/review-bot#38 2026-05-02 18:28:01 +00:00
feat: always post fresh review, supersede old with collapsed body

[MINOR] buildSupersededBody appends the sentinel to the superseded comment body, which means future runs will still detect the superseded review when looking for the sentinel. This can make selecting the correct review to supersede ambiguous. Consider removing the sentinel from superseded bodies or adding a marker (e.g., "Superseded") that findOwnReview skips.

sonnet-review-bot commented on pull request rodin/review-bot#37 2026-05-02 18:20:45 +00:00
feat: improve test coverage for cmd/review-bot

[MINOR] Integration tests use context.Background() for network calls; consider context.WithTimeout to avoid potential indefinite hangs against external services.