Skip to content

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

Closed
eowca wants to merge 3 commits into
mainfrom
lean178/1326-recover-review-summary
Closed

eowca wants to merge 3 commits into
mainfrom
lean178/1326-recover-review-summary

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

  • The GitHub fake records accepted reviews and accepted summary PATCHes before losing the response.

Base

Base: b69efec

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, c5de192, approve

eowca and others added 2 commits November 26, 2026 02:51
Architecture-Review: unchanged; review recovery still requires exact live publication evidence and only restores the existing human summary.
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 c5de192dfe4c00dbd4fbf954b85b2e9541690082, 24.7s: 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.

Comment thread src/loopzero/cli.py
match = pattern.search(body)
if not match:
return f"{body.rstrip()}\n\n## Review\n{line}\n"
if line in match.group(2).splitlines():

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: Idempotence check also changes non-recovery reposts; consider a direct unit test

The new early return in _append_review applies to every caller, not just confirmed recovery. Today _finish_review is the only caller, so an explicit --repost that posts a new review with the same kind, family, head and verdict no longer adds a second identical Review line. That looks intended, but the only test for it goes through the full recovery flow (test_repost_after_lost_summary_reply_does_not_patch_again). A short table test of _append_review would pin this contract down cheaply. It should cover: a placeholder-only section, a section that already has the line, a different line next to the same head, and a section followed by another ## heading.

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

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1403. Loop Zero declined a delta review after the conflict resolution that integrated #1230’s PR-body lock. The replacement carries the locked recovery diff on current main.

@eowca eowca closed this Nov 26, 2026
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