fix(review): keep partial-coverage framing out of a summary-only-cut delta comment - #523
Merged
Merged
Conversation
8 tasks
🤖 ThrillhouseBot PR SummaryWhat this PR doesFixes #516 by teaching the truncation disclosure that a detail carrying only the summary-response-cut flag (no per-file coverage gaps) is treated as empty in the partial-coverage-framed surface, while details with real file gaps still fold the summary cut in as a clause. TruncationDetail gains hasFileGaps(), isEmpty() is re-expressed through it, and truncationDisclosure guards on hasFileGaps() instead of isEmpty(); three unit tests pin the behavior. Changes Overview
Changed Files
Risk Assessment
Everything's coming up Thrillhouse! 🎉 No issues found in this PR. Automated review by ThrillhouseBot. Reply with |
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.
What type of PR is this?
Description
When only the summary response was cut at the model's length cap (findings complete, no file-coverage gap), the opt-in follow-up delta comment (
REVIEW_FOLLOW_UP_SUMMARY_ENABLED=true) rendered:Self-contradictory and false: the PR need not be large, coverage is not partial, and the delta comment's counts are complete. #513's
summaryResponseCutflag madeTruncationDetail.isEmpty()false, which defeatedtruncationDisclosure's empty-guard — the one consumer #513's dedicatedSUMMARY_CUT_NOTICEbanner (built precisely to avoid this framing) missed.TruncationDetailgainshasFileGaps()(any name in the four file classes;isEmpty()is now expressed through it), andtruncationDisclosureguards on that instead ofisEmpty(): a summary-flag-only detail renders nothing there, since the framing is per-file coverage. The summary-aware surfaces (banner, coverage clause, check-run suffix) are untouched, and a detail with real file gaps still folds the summary cut in as a clause. The other twotruncationDisclosureconsumers cannot carry the flag (2-arg detail with flag unset / count-only overload), so they are unaffected.Related Issues
Fixes #516
How Has This Been Tested?
New tests (red/green proven — see Logs):
FollowUpDeltaSummaryTest.summaryOnlyCutMustNotClaimPartialDiffCoverageInTheDeltaComment(the audit's ready-made failing test) andReviewResultTest.truncationDisclosureTreatsASummaryFlagOnlyDetailAsEmpty, plus a green companiontruncationDisclosureStillRendersWhenFileGapsAccompanyTheSummaryCutpinning no over-suppression. Full suite: 2570 tests, 0 failures.Gates:
spotless:apply→clean compile spotbugs:check spotless:check(BugInstance size 0) →clean testgreen. JaCoCo ∩git diff -U0against the stack parent: zero uncovered lines/branches in changed main code.Checklist
Screenshots / Logs
Red runs on unfixed code:
Both green with the fix applied.
Additional Notes
Second PR of the #515 → #516 → #518 stack: based on
fix/515-walkthrough-rows; re-target torelease/v0.6.0after #522 (#515) merges — the diff scoped to this issue is the last commit.