Repository navigation
A carried approval carries the review it rests on, and that review stays in sight - #781
Merged
Merged
Conversation
…ays in sight
After a person merged the base branch into an approved pull request,
CoderHelm posted a new approval whose whole body was one line ("the new
commits only bring in the base branch; the PR's own change is the same as
the approved <sha>"). Posting it rewrote the earlier full review to
"Outdated", and the tidy between reviews cuts a review of an older commit
to one line, so the pull request's only visible approval had no review in it.
- The carried approval now carries the stored review of the approved
commit as it was posted (the posted body is now kept on every review
record), stated against the new head; a carry of a carry keeps the one
review without nesting.
- With no stored review to carry (or only an old one-line carry), the pull
request is reviewed in full instead.
- review_supersede::plan and tidy never rewrite, cut or hide the review the
latest carried approval rests on, nor its comments and threads; the old
one-line wording is read the same way.
- Incident case kr_carried_approval_keeps_its_review with its page.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
After a person merged the base branch into a pull request CoderHelm had approved, CoderHelm posted a new approval whose whole body was one line: "Approved: the new commits only bring in the base branch; the PR's own change is the same as the approved
<sha>." Posting it rewrote the earlier full review to "Outdated: see CoderHelm's latest review", and the tidy between reviews (#761) cuts any review of an older commit to one line. The pull request's only visible approval had no review in it, so nobody could see what had been checked.Now a carried approval stands on its own: it carries the earlier review's content (what was checked, criteria, verification, tests, notes and findings) stated against the new head. While it is CoderHelm's latest review, the review it rests on is never rewritten, cut or hidden. If there is no stored review to carry, the pull request is reviewed in full instead of getting a one-line approval.
Changes
worker/src/passes/review_pr.rsposted_body).carried_reviewreads the stored review of the approved commit. On an older record withoutposted_bodyit uses the summary and findings. It returnsNonewhen there is no record, or when the record is an old one-line carry.carried_approval_bodywrites the carried approval in this order: the verdict, then "the PR's own change is unchanged since<sha>; the new commits only bring in<base>", then the earlier review itself. It leaves out the earlier review's marks and footer. Its marks name the commit it rests on and the commit the review was written for, so a carry of a carry keeps the one review instead of nesting. The model is not called again.worker/src/passes/review_sweep.rs:ReviewRecord::posted_bodyis read back. The test literals in the other review modules got the new field.common/src/review_supersede.rscarried_from,live_carried_shaandkept_for_carry.carried_fromalso recognizes the old one-line wording.plan(run when a review is posted) no longer rewrites the review a carried approval rests on, and leaves its comments in sight and its threads open.tidy(run between reviews) never cuts the review that CoderHelm's latest carried approval rests on while the pull request is open. A later real review, a merge or a close cuts both reviews as before.kr_carried_approval_keeps_its_review, with its test and its page indocs/incidents/.Verification
planandtidynever rewrite, cut or hide the review of A, its comment or its thread;tidy/planon main cut the review a one-line carry rests on.cargo fmt --all -- --check,cargo clippy --all-targets -- -D warningsandcargo test --workspaceall pass locally (6,201 passed, 0 failed).