fix(review): disclose a summary-response cut in the posted review - #513
Merged
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 ThrillhouseBot PR SummaryWhat this PR doesAdds a live summaryResponseCut flag to BudgetPlan, records it when the summary call is truncated in FindingPipeline, carries it into ReviewResult.TruncationDetail, and renders a dedicated 'Summary shortened' banner or folds it into the partial-review clause, with matching check-run markers; also extracts retryBatch and other Sonar cleanups.
|
| File | Change | Summary |
|---|---|---|
src/main/java/dev/thiagogonzaga/thrillhousebot/review/DiffBudgetPlanner.java |
Modified | Adds live AtomicBoolean summaryResponseCut to BudgetPlan with snapshot accessor and convenience constructors. |
src/main/java/dev/thiagogonzaga/thrillhousebot/review/FindingPipeline.java |
Modified | Records plan.summaryResponseCut on both summary-truncation paths, including summarizeWithoutReview. |
src/main/java/dev/thiagogonzaga/thrillhousebot/review/ReviewResult.java |
Modified | Adds summaryResponseCut to TruncationDetail, SUMMARY_CUT_NOTICE, and coverage clause/brief entries. |
src/main/java/dev/thiagogonzaga/thrillhousebot/review/VerdictBuilder.java |
Modified | Wires summaryResponseCut into TruncationDetail and adds summary-only check-run and banner rendering. |
src/test/java/dev/thiagogonzaga/thrillhousebot/review/DiffBudgetPlannerTest.java |
Modified | Adds tests for live flag recording and defensive-snapshot accessor. |
src/test/java/dev/thiagogonzaga/thrillhousebot/review/FindingPipelineTest.java |
Modified | Asserts summary cut is recorded on plan in truncation paths and disjoint from batch cuts. |
src/test/java/dev/thiagogonzaga/thrillhousebot/review/ReviewResultTest.java |
Modified | Adds tests for coverage clause/brief summary-cut entries and isEmpty behavior. |
src/test/java/dev/thiagogonzaga/thrillhousebot/review/VerdictBuilderTest.java |
Modified | Adds tests for summary-only banner, clause folding, and findings-present check summary. |
Risk Assessment
| Risk | Count |
|---|---|
| 🔴 Critical | 0 |
| 🟠 High | 1 |
| 🟡 Medium | 0 |
| 🔵 Low | 0 |
Previous Findings Status
| Status | Count |
|---|---|
| ✅ Resolved | 0 |
| 0 | |
| 💬 Justified | 0 |
| 🗂️ Superseded (targeted code left the diff) | 1 |
Key Findings
- HIGH: Summary-only cut flag is dropped because it is only propagated when plan.truncated() is true (
src/main/java/dev/thiagogonzaga/thrillhousebot/review/VerdictBuilder.java:137)
Automated review by ThrillhouseBot. Reply with /review to re-run.
The spend-ceiling degradation of the summary lane discloses itself in the posted review, but the length-cap truncation of the same lane was log-only - two sibling degradations of one lane, one visible, one mute. Record the cut on the shared plan and thread it into the verdict's TruncationDetail: with file-coverage gaps present it folds into the partial-review clause; alone it renders a dedicated 'Summary shortened' banner that does not hold approval, since the findings themselves are complete. The check-run summary carries the matching brief marker on every return path, including reviews with findings. The check-run suffix derivation moves into truncationSuffixFor and the banner constant becomes a text block, keeping checkSummaryForResult under the complexity gate with no nested ternary. Refs #500
devops-thiago
force-pushed
the
fix/500-summary-cut-disclosure
branch
from
August 10, 2026 21:32
563d0da to
21c8022
Compare
|
Owner
Author
|
/review Generated by Claude Code |
This was referenced Aug 10, 2026
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
Follow-up to #511. The spend-ceiling degradation of the summary lane discloses itself in the posted review, but the length-cap truncation of the same lane was log-only — two sibling degradations of one lane, one visible, one mute.
BudgetPlangains a livesummaryResponseCutflag (same shared-accumulator pattern as the runtime-gap lists, with a defensive-snapshot accessor);FindingPipelinerecords it in both branches ofsalvagedOrCountsOnlySummary, including the degeneratesummarizeWithoutReviewpath.ReviewResult.TruncationDetailgains a matching fifth component (back-compat constructors keep the old shapes). With file-coverage gaps present the cut folds into the partial-review clause, naming both knobs (max-output-tokens/REVIEW_CONCISE_MAX_OUTPUT_TOKENS); with no file gap a dedicated "Summary shortened" banner renders instead and does not hold approval, since the findings themselves are complete. The check-run summary carries the matching brief marker on every return path, including reviews with findings.truncationSuffixForand the banner constant becomes a text block, keepingcheckSummaryForResultunder Sonar's complexity gate with no nested ternary.Related Issues
Refs #500 (follow-up; the issue itself was closed by #511)
How Has This Been Tested?
Red/green proven: with the wiring stashed out, all five new behavioral tests fail on exactly the new assertions (flag not recorded, banner absent, clause absent); with the wiring in place the full suite passes (2566 tests, 0 failures). Jacoco ∩ diff shows every changed line and branch covered. SpotBugs and Spotless are clean. The text-block conversion was verified character-identical to the previous concatenation.
Checklist
Screenshots / Logs
Summary-only cut, posted review banner:
Combined with file gaps, one clause of the partial-review banner:
Additional Notes
A summary-only cut deliberately does not hold approval: the findings are complete, so downgrading APPROVE would punish a prose-only degradation. File-gap classes keep holding approval exactly as before.
An earlier revision of this description claimed the #511-round Sonar cleanups (
retryBatchextraction, unnamed catch variable,assertThrowshoists) were part of this diff — they were not; they landed with #511's squash. Credit to the bot review for catching the drift.