Skip to content

Repair missing PR summaries when recovering a published review - #1403

Closed
eowca wants to merge 1 commit into
mainfrom
lean178/1326-review-summary-replacement
Closed

eowca wants to merge 1 commit into
mainfrom
lean178/1326-review-summary-replacement

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Repair missing PR summaries when recovering a published review

Context and goal

  • Goal: Recover both the GitHub verdict and the PR body summary from a saved, verified review.
  • Problem: Exact review recovery returned early even when the Review section still contained its placeholder.
  • Context: The existing Review line identifies the review kind, reviewer family, head and verdict.

Closes #1326

Acceptance

  • A lost review POST reply or an interruption before the PATCH leaves one review and one summary line after recovery.
  • A lost reply to an accepted summary PATCH leaves the line unchanged during repost.
  • Other PR sections remain intact and recovery reuses the saved reviewer result.

Notes

Base

Base: c5232bb

Validation

(no loopzero check run recorded)


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, bb56e0b, approve

Architecture-Review: unchanged; recovered and ordinary review summaries share the existing serialized PR body update.
Co-Authored-By: Codex <noreply@openai.com>

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on bb56e0bf06d972da6de5b0c623843843991846b0, 23.4s: approve (0 critical, 0 important, 1 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

if verdict == 5:
files = ["api", f"repos/{REPO}/pulls/7/files"]
assert sum(call["argv"][:2] == files for call in gh.calls) == 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: No test for an interruption after an accepted POST but before the PATCH

The acceptance criteria name two cases: a lost review POST reply, and an interruption before the PATCH. The tests cover a POST that is accepted and then interrupted or times out (interrupted=True / "timeout"), and a lost PATCH reply (summary_timeout). No test covers a POST that succeeds normally, followed by a KeyboardInterrupt or crash before _finish_review runs the PATCH, followed by --repost. The code should handle this through the same _recover_review → _finish_review path, but no test checks it. Smallest fix: add a lost_reply variant that returns the POST response and raises KeyboardInterrupt on the PATCH before recording it. Then assert that --repost produces exactly one review and one summary PATCH, using assert_review_and_summary.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing on Lean's decision from the test-line supply audit (#575 (comment)): this PR's test and source cost on a full cap outweighs its measured benefit. The approved work stays in the branch history. Reopen or replace it only with new evidence of a material, measured saving or failure.

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.

Restore a missing PR review summary when confirming a published review

1 participant