Repository navigation
feat(#9957): fold superseded agent result comments as outdated #10089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68129a5
feat(#9957): fold superseded agent result comments as outdated
fullsend-ai-coder[bot] c031f4f
fix(#9957): read minimized comment states per thread
waynesun09 202f5a5
fix(#9957): order superseded comments by ID, not identity
waynesun09 56d9fb6
docs(#9957): tighten the minimized-results wording
waynesun09 585fd7e
fix(#9957): fail on a next page without a cursor
waynesun09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
e2e/behaviour/features/review/review-re-run-minimize.feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Every agent run appends its result as a new comment (#9334). On a re-run, | ||
| # the bot's earlier results are minimized as outdated (#9957): post-review | ||
| # minimizes the earlier review comments, and post-comment the earlier | ||
| # risk-assessment comments. This scenario reviews the same pull request | ||
| # twice and asserts that the review and the risk assessment each have one | ||
| # visible comment, and that the first run's comments are minimized. | ||
| # | ||
| # An on-demand review trigger (as in review-cel-route.feature) keeps the | ||
| # pull-request-opened event from starting a review before the dummy agent | ||
| # is set: its result names the pull request's head SHA (<pr_head_sha>), | ||
| # so it can only be written once the pull request exists, and a result | ||
| # naming any other commit is discarded as stale-head. | ||
| # @skip:gitlab because GitLab cannot minimize a comment: there, earlier | ||
| # results stay visible. | ||
| @skip:gitlab | ||
| Feature: Re-running review folds the earlier results as outdated | ||
|
|
||
| Scenario: A second review run minimizes the first review and risk-assessment comments | ||
| Given the enrolled test repository | ||
| And the repository agents are configured with: | ||
| """ | ||
| review: | ||
| trigger: > | ||
| event.transition.kind == "comment_added" | ||
| && has(event.entity.linked_change_proposal) | ||
| && has(event.transition.comment.command) | ||
| && event.transition.comment.command == "/fs-review" | ||
| && event.actor.kind == "human" | ||
| """ | ||
| When the write actor opens a pull request | ||
| And a dummy agent that would: | ||
| | description | op | args | | ||
| | Emit review JSON | write_fixture | output/agent-result.json, fixtures/review/comment-with-risk.json | | ||
| And the write actor posts "/fs-review" on the pull request | ||
| Then the harness "review" workflow completes successfully | ||
| And the pull request has 1 visible comment containing "<!-- fullsend:review-agent -->" | ||
| And the pull request has 1 visible comment containing "<!-- fullsend:risk-assessment -->" | ||
| When the write actor posts "/fs-review" on the pull request | ||
| Then the harness "review" workflow completes successfully | ||
| And every comment on the pull request containing "<!-- fullsend:review-agent -->" other than the last is minimized | ||
| And every comment on the pull request containing "<!-- fullsend:risk-assessment -->" other than the last is minimized | ||
| And the pull request has 1 visible comment containing "<!-- fullsend:review-agent -->" | ||
| And the pull request has 1 visible comment containing "<!-- fullsend:risk-assessment -->" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "action": "comment", | ||
| "pr_number": 1, | ||
| "repo": "owner/repo", | ||
| "head_sha": "<pr_head_sha>", | ||
| "body": "Behaviour smoke: the review result for this run.", | ||
| "risk_assessment": { | ||
| "score": 1, | ||
| "level": "low", | ||
| "rationale": "Behaviour smoke: a one-line text change." | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.