Skip to content

Fix native review responses, error details, and finding locations - #8

Merged
divyangchauhan merged 1 commit into
mainfrom
fix/native-review-response-and-locations
Oct 14, 2026
Merged

divyangchauhan merged 1 commit into
mainfrom
fix/native-review-response-and-locations

Conversation

@divyangchauhan

Copy link
Copy Markdown
Owner

Summary

Native reviews can fail or finish prematurely when intermediate commentary is parsed as the final answer. Findings on valid diff-context lines are also discarded, and subscription failures hide their cause.

 native response handling
- parse commentary alongside the final review
+ preserve commentary in history and parse final output separately
 finding validation and publication
- accept only added/deleted lines
+ also accept new-side context inside supplied diff hunks
 subscription failures
- report a generic failure
+ report the event type and a recognized reason code

Review prompt construction and PR-scope instructions match main exactly. This PR contains only the three CLI fixes and their tests; evaluation scripts and results remain on the experimental branch. Review-quality improvement is not established, and this exact prompt-preserving combination has not been benchmarked.

Evidence

  • Before: New regression tests fail against main: mixed commentary produces invalid JSON, schema-valid commentary ends the review prematurely, context-line findings are dropped, and failure reasons are absent.
    After: Those tests pass, including checks for the existing round budget, wrong-side/out-of-hunk locations, and exclusion of arbitrary server messages from errors.
  • go test -race ./..., go vet ./..., and go build -trimpath ./cmd/diffvouch pass locally.
  • Verified the review prompt builder and appended scope instructions are identical to main. Tests use stubbed provider responses; no live evaluation calls were made.

Merge Danger

Door: two-way

Code rollback requires no configuration or stored-data migration.

Blast Radius: Reviews

Changes native OpenAI response handling, subscription error text, and finding eligibility for local review results and GitHub publication. Commentary-only responses continue within the existing request budget. Findings outside the supplied diff or on an unsupported side remain excluded.

@divyangchauhan
divyangchauhan merged commit caff048 into main Oct 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant