Skip to content

fix: eliminate silent data loss in review pipeline and align docs - #1

Merged
LingMi1 merged 1 commit into
mainfrom
fix/silent-data-loss
Aug 14, 2026
Merged

fix: eliminate silent data loss in review pipeline and align docs#1
LingMi1 merged 1 commit into
mainfrom
fix/silent-data-loss

Conversation

@LingMi1

@LingMi1 LingMi1 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes three correctness bugs that silently dropped data or misreported failures, plus aligns stale docs.

Changes

  • Remove 6000-byte hunk truncation (internal/prompt/builder.go): hunkTrim silently cut each file's diff at 6000 bytes (~150-200 lines), contradicting the 800-line chunking and dropping the tail of large files. Diffs are now bounded only by ~800-line chunking and the 32 KB prompt cap.
  • Check HTTP status in PRDiff (internal/github/client.go): non-200 responses (e.g. 404/500) were read as diff text and misreported as "success, 0 issues". Now returns an error.
  • Fail loudly on chunk parse errors (internal/reviewer/reviewer.go): a chunk whose LLM output failed to parse was silently skipped, producing a review with missing coverage. Now the whole review fails instead.
  • Docs (README.md, README.zh-CN.md): remove the now-inaccurate "oversized hunks trimmed before construction" claim.

Testing

  • go test ./... not run locally (no Go toolchain on this machine). Changes are small and localized; CI / local go test ./... recommended.

@LingMi1
LingMi1 merged commit b49fed9 into main Aug 14, 2026
5 of 6 checks passed
@LingMi1
LingMi1 deleted the fix/silent-data-loss branch August 14, 2026 16:17
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