Skip to content

fix(review): keep partial-coverage framing out of a summary-only-cut delta comment - #523

Merged
devops-thiago merged 2 commits into
release/v0.6.0from
fix/516-delta-disclosure
Aug 11, 2026
Merged

fix(review): keep partial-coverage framing out of a summary-only-cut delta comment#523
devops-thiago merged 2 commits into
release/v0.6.0from
fix/516-delta-disclosure

Conversation

@devops-thiago

@devops-thiago devops-thiago commented Aug 11, 2026

Copy link
Copy Markdown
Owner

What type of PR is this?

  • 🐛 Bug fix

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:

⚠️ Large PR — partial coverage. the summary was shortened … — the findings themselves are complete, so this covers only part of the diff.

Self-contradictory and false: the PR need not be large, coverage is not partial, and the delta comment's counts are complete. #513's summaryResponseCut flag made TruncationDetail.isEmpty() false, which defeated truncationDisclosure's empty-guard — the one consumer #513's dedicated SUMMARY_CUT_NOTICE banner (built precisely to avoid this framing) missed.

TruncationDetail gains hasFileGaps() (any name in the four file classes; isEmpty() is now expressed through it), and truncationDisclosure guards on that instead of isEmpty(): 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 two truncationDisclosure consumers 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?

  • Unit tests

New tests (red/green proven — see Logs): FollowUpDeltaSummaryTest.summaryOnlyCutMustNotClaimPartialDiffCoverageInTheDeltaComment (the audit's ready-made failing test) and ReviewResultTest.truncationDisclosureTreatsASummaryFlagOnlyDetailAsEmpty, plus a green companion truncationDisclosureStillRendersWhenFileGapsAccompanyTheSummaryCut pinning no over-suppression. Full suite: 2570 tests, 0 failures.

Gates: spotless:applyclean compile spotbugs:check spotless:check (BugInstance size 0) → clean test green. JaCoCo ∩ git diff -U0 against the stack parent: zero uncovered lines/branches in changed main code.

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly
  • My changes generate no new warnings or errors

Screenshots / Logs

Red runs on unfixed code:

[ERROR] FollowUpDeltaSummaryTest.summaryOnlyCutMustNotClaimPartialDiffCoverageInTheDeltaComment:177
## 🤖 ThrillhouseBot — changes since the last review

- **New findings this round:** 1
- **Previous findings resolved:** 0
- **Previous findings still open:** 0


> ⚠️ **Large PR — partial coverage.** the summary was shortened because the model's response was cut at its length cap (max-output-tokens / REVIEW_CONCISE_MAX_OUTPUT_TOKENS) — the findings themselves are complete, so this covers only part of the diff. ==> expected: <false> but was: <true>
[ERROR] ReviewResultTest.truncationDisclosureTreatsASummaryFlagOnlyDetailAsEmpty:197 expected: <> but was: <

> ⚠️ **Large PR — partial coverage.** the summary was shortened because the model's response was cut at its length cap (max-output-tokens / REVIEW_CONCISE_MAX_OUTPUT_TOKENS) — the findings themselves are complete, so this covers only part of the diff.>

Both green with the fix applied.

Additional Notes

Second PR of the #515#516#518 stack: based on fix/515-walkthrough-rows; re-target to release/v0.6.0 after #522 (#515) merges — the diff scoped to this issue is the last commit.

@thrillhousebot

Copy link
Copy Markdown

🤖 ThrillhouseBot PR Summary

What this PR does

Fixes #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

  • Files changed: 3
  • Lines added: +86
  • Lines removed: -6

Changed Files

File Change Summary
src/main/java/dev/thiagogonzaga/thrillhousebot/review/ReviewResult.java Modified Adds TruncationDetail.hasFileGaps(); isEmpty() delegates to it; truncationDisclosure guards on hasFileGaps() so a summary-flag-only detail renders no partial-coverage disclosure.
src/test/java/dev/thiagogonzaga/thrillhousebot/review/FollowUpDeltaSummaryTest.java Modified Adds test asserting the delta comment no longer claims partial diff coverage when only the summary response was cut.
src/test/java/dev/thiagogonzaga/thrillhousebot/review/ReviewResultTest.java Modified Adds tests: a summary-flag-only detail is treated as empty by truncationDisclosure, and disclosure still renders when file gaps accompany the summary cut.

Risk Assessment

Risk Count
🔴 Critical 0
🟠 High 0
🟡 Medium 0
🔵 Low 0

Everything's coming up Thrillhouse! 🎉

No issues found in this PR.


Automated review by ThrillhouseBot. Reply with /review to re-run.

@thrillhousebot thrillhousebot Bot added bug Something isn't working java Pull requests that update java code rework Defect introduced during this release cycle, not pre-existing labels Aug 11, 2026
Base automatically changed from fix/515-walkthrough-rows to release/v0.6.0 August 11, 2026 01:02
@devops-thiago
devops-thiago merged commit 2428d42 into release/v0.6.0 Aug 11, 2026
1 check passed
@devops-thiago
devops-thiago deleted the fix/516-delta-disclosure branch August 11, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working java Pull requests that update java code rework Defect introduced during this release cycle, not pre-existing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant