feat(review): incremental re-review — review only new commits on synchronize, with a dedicated finding-resolution check [v0.9]
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
Research direction
Start with review/ReviewContextLoader.java (the stale-head guard near lines 498-515) and review/FollowUpAnalyzer.java, then review/ai/FindingVerificationService as the model for the new resolution check. The work spans the dashboard/ReviewSession migration, the webhook synchronize routing and prompt changes, so it needs design agreement first. Done means an incremental compare path with full-diff fallbacks, behind a REVIEW_INCREMENTAL_ENABLED gate, matching existing follow-up tests.
Written by the indexing model from the issue text.
Description
Problem Statement
Every synchronize event re-reviews the full PR diff, no matter how small the push. Prompt size therefore grows with PR size, not push size, and the same already-reviewed hunks are re-sent (and re-billed) every round. Previous findings are condensed to fit (DiffBudgetPlanner.boundPreviousFindings, capped at 25% of the per-call budget — added after this repo's own release PR hit ~437K tokens in that block), but the diff itself has no such incremental treatment.
Proposed Solution
Bound follow-up rounds by push size:
- Persist the last-reviewed head SHA on
ReviewSession. Onsynchronize, fetchGET /compare/{lastReviewedHead}...{newHead}instead of the full/pulls/{n}/files. Fall back to a full review whenever the compare fails or is misleading (force-push/rebase, base branch changed, no completed prior round) — the existing stale-head guard (ReviewContextLoader.java:498-515) already detects head movement mid-review. - Dedicated resolution-check call, modeled on
FindingVerificationService(blockingconcisecall, JSON verdicts keyed by id, fail-open, ledger-gated, salvage-on-truncation): input = condensed open findings (theentryLinesOnlyshape fromDiffBudgetPlanner.java:441: id, risk,file:line, title, plussuggestion_old) + only the new hunks touching those findings' files; output =resolved/unresolved/supersededper id. This takes over theprevious_findings_statusduty from the main review call, so the reviewer prompt no longer needs the reconciliation rule block (PrReviewPrompts.java:550-586) or the full previous-findings context — a second large prompt section shrinks. - The review call runs over the incremental diff only → prompt size is bounded by the push, giving the predictable prompt sizes this roadmap is after.
FollowUpAnalyzerthread matching, supersede logic, and the batch-scoping rules for statuses (FindingPipeline.scopeStatusesToBatch) are reused: the resolution-check call may only resolve findings whose touching hunks it actually saw. - Escape hatches: manual
/reviewkeeps forcing a full-diff pass; a periodic full pass (e.g. every Nth round, or whenready_for_reviewfires) catches cross-commit interactions that incremental rounds can miss. Document the tradeoff.
Why a dedicated call beats the current reconciliation
Today reconciliation quality depends on the full re-review happening to look at the right places, and statuses must be carefully scoped per batch. A dedicated call sees exactly the pairs that matter (finding ↔ new hunks in its file) and nothing else — cheaper, more reliable, and it removes the largest conditional sections from the reviewer prompt.
Touchpoints
dashboard/ReviewSession (+ head SHA column/migration), review/ReviewContextLoader.java (compare-based incremental load + fallbacks), new review/ai/ResolutionChecker service + prompts (+ content test), review/FollowUpAnalyzer.java, review/FindingPipeline.java, review/DiffBudgetPlanner.java (call reservation), webhook/WebhookController.java (synchronize routing).
Acceptance criteria
- Push of K lines to an N-thousand-line PR produces prompts sized by K, not N (token metrics).
- Force-push/rebase and missing-history cases demonstrably fall back to full review.
- Resolution statuses match current behavior on the existing
FollowUpAnalyzertest scenarios; a finding is never marked resolved by a call that didn't see its file's new hunks. - Feature gate (
REVIEW_INCREMENTAL_ENABLED), default off for one release.
Alternatives Considered
- Keep full-diff rounds and rely on tighter condensation — bounds the findings block but never the diff; cost still scales with PR size.
- Dominant language
- Java
- Stars
- 35
- Forks
- 7
- Avg merge
- 9h 32m
- Merged PRs (30d)
- 144
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devops-thiago/ThrillhouseBot
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
devops-thiago/ThrillhouseBot#1093 ·
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devops-thiago/ThrillhouseBot#321 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
devops-thiago/ThrillhouseBot#46 ·
Maintainers usually reply within 1 day
-
fix(review): preserve tilde-fenced code during path screeningPossibly taken @devops-thiago claimed this today. Openbug java
Difficulty 4/5 1-2 days Newbie friendliness 35/100
devops-thiago/ThrillhouseBot#1111 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(review): exclude TAP TODO and SKIP results from CI failuresPossibly taken @devops-thiago claimed this today. Openbug java
Difficulty 3/5 1-2 days Newbie friendliness 35/100
devops-thiago/ThrillhouseBot#1110 · 1 comment ·
Maintainers usually reply within 1 day
All issues in devops-thiago/ThrillhouseBot
Similar issues
-
Flight SQL JDBC parses boolean properties case-sensitively, silently disabling TLS for useEncryption=TRUEPossibly taken @Arawoof06 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
apache/arrow-java#1357 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
apache/rocketmq-dashboard#6610 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MetricsHub/metricshub-community#1396 ·
Maintainers usually reply within 1 day
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
dependabot/dependabot-core#16547 ·
Maintainers usually reply within 1 day
-
Citationcount column sorts alphabetically instead of numericallyPossibly taken @kpunia306 claimed this today. Openstatus: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JabRef/jabref#17459 · 4 comments ·
Maintainers usually reply within 1 day