feat(#836): minimize stale inline review comments on re-review - #868
feat(#836): minimize stale inline review comments on re-review#868fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Before this change, inline review comments accumulated across re-review runs — each run posted new inline comments without cleaning up prior ones. On PRs receiving multiple reviews, this created excessive noise (e.g. 54 comments on 78 lines). Add minimizeStaleInlineComments() to the post-review flow. Before posting new inline comments, it lists all existing inline review comments on the PR, filters for those authored by the bot user, and minimizes them as OUTDATED via the GraphQL API. The sticky comment already preserves full review history, so minimizing prior inline comments loses no information. Changes: - internal/forge/forge.go: add PullRequestReviewComment struct and ListPullRequestReviewComments to the Client interface - internal/forge/github/github.go: implement the method using the GitHub "List review comments" REST API with pagination - internal/forge/gitlab/mr.go: return ErrNotSupported (GitLab notes lack a minimize/hide feature) - internal/forge/fake.go: add PRReviewComments field and fake implementation for testing - internal/cli/postreview.go: add minimizeStaleInlineComments() and call it in submitFormalReview before posting new findings - internal/cli/postreview_test.go: add tests covering own-comment filtering, no-op, error tolerance, GitLab ErrNotSupported skip, and full integration through submitFormalReview Note: pre-commit could not run in sandbox (network restrictions). The post-script runs pre-commit authoritatively on the runner. Closes #836
|
🤖 Finished Review · ✅ Success · Started 9:45 AM UTC · Completed 9:56 AM UTC |
|
Looks good to me |
|
/fs-fix |
|
🤖 Finished Fix · ✅ Success · Started 10:32 AM UTC · Completed 10:43 AM UTC |
🔧 Fix agent — iteration 1 (human-triggered)No changes made. The review bot approved the PR with no findings, and the human /fs-fix command did not include specific instructions. All PR-specific tests pass, go vet is clean, and secret scan passed. Two pre-existing test failures in run_test.go (TestPostScriptEnv_NoSchemaAppendedWhenEmpty, TestPostScriptEnv_NoSchemaAppendedWhenNoValidationLoop) are caused by the sandbox environment having FULLSEND_OUTPUT_SCHEMA set and are unrelated to this PR. Disagreed (1):
Tests: passed Decision points
Next steps:
|
|
This pull request has been automatically marked as stale because it has not had any activity in the last month. It will be closed in 2 weeks if no further activity occurs. Remove the |
Summary
Minimize stale inline review comments on re-review to prevent comment accumulation. When the review agent re-reviews a PR, all prior bot-authored inline comments are now minimized (marked as OUTDATED) before posting new findings. The sticky comment already preserves full review history, so no information is lost.
Related Issue
Fixes #836
Changes
PullRequestReviewCommentstruct toforge.Clientinterface for reading existing inline commentsListPullRequestReviewCommentsmethod to the GitHub forge client (paginated REST API)ErrNotSupported(GitLab notes lack minimize/hide)minimizeStaleInlineComments()to the post-review flow, called before posting new findingssubmitFormalReviewto separate review-listing from inline-comment cleanup, so inline comment minimization runs even if review listing failsErrNotSupportedsilent skip, and full integration throughsubmitFormalReviewTesting
go vetcleango buildcleanChecklist
!for breaking changes)Closes #836
Post-script verification
agent/836-minimize-stale-inline-comments)c887fc47c59d8b87b5282ca44044d2933d30df41..HEAD)