ReviewOS

also looking at this

stacks/buddy

fix(review): read what publishing reported, honour reviewSuggestions, and un-strand two flags

#1435
Merged glennmichael123 wants to merge fix/review-low-tier into main
5 files +267 -10
8 days ago

The last four findings of the sweep's low tier, all review-side and all the session's defect class: declared, implemented, documented — and read by nothing.

ReviewSubmissionResult was returned by everyone and read by no one

All three providers implement createReview(): Promise<ReviewSubmissionResult> — { posted, inlineComments } — and the one caller discarded it. Two consequences, both fixed in reviewPullRequest:

  • A review that never posted claimed success. Now: status The review could not be posted., and crucially no state is persisted — recording reviewedSha for a review nobody can see would make every later run skip it.
  • Dropped inline comments vanished silently. A comment anchored outside what the platform accepts is discarded server-side; the status now carries N of M inline comment(s) could not be placed on the diff. plus a warning.

reviewSuggestions capability, finally read

GitHub/GitLab render ```suggestion blocks with one-click apply; Bitbucket declares reviewSuggestions: false and was shown the literal fence as noise. prepareReview now takes the capability and renderFinding degrades to a plain fence under a Suggested replacement: label.

skipIfReviewed had no caller

reviewedSha was written into the marker and honoured by needsReview — and no caller ever passed skipIfReviewed. The generated workflow triggers on pull_request: [edited], so every body edit re-reviewed the same commit. --auto (what the workflow passes) now sets it; a person at a terminal re-running buddy review 42 still always gets a review.

review --light --fix silently ignored --fix

The light branch wrote output, checked --fail-on, and returned — before the if (options.fix) block. The flag worked everywhere except the one mode fast enough for a pre-commit hook. The light path now applies suggestions too.

Tests

bun test: 2194 pass / 0 fail; typecheck, pickier, check-docs green. New test/review-outcomes.test.ts (not-posted ⇒ honest status + no state write; shortfall named; capable platform gets ```suggestion, incapable gets the labelled fence). The parity stub answered createReview with { id: 1 } — a fixture encoding the defect — and now returns what the interface declares. Bonus fixture find while writing these: the engine reads response.json, not .text, the same trap test/review-engine.test.ts hit before.

This closes the sweep's low tier. Remaining from the audit: the four decisions that are yours (restrictedMode, planTouch/reviewMode, six presets declaring strategy: 'all', reviewSuggestions posture on PRs vs local) and the two questions for Chris.

🤖 Generated with Claude Code

5 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.