Skip to content

Surface recoverable saved reviews before retrying - #1127

Merged
mergify[bot] merged 4 commits into
mainfrom
lean178/1092-surface-review-recovery
Nov 26, 2026
Merged

mergify[bot] merged 4 commits into
mainfrom
lean178/1092-surface-review-recovery

Conversation

@eowca

@eowca eowca commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

A plain review retry now identifies a usable saved result for the selected round, head, PR and publisher, then points to loopzero review --repost. Explicit reviewer overrides and invalid or unrelated receipts still allow a fresh review.

The regression test interrupts immediately before publication, verifies that plain retry preserves the receipt, then replays it through --repost with one model launch and one review publication.

Closes #1092


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

Review

  • primary, claude, db11fe5, approve

Validation

Recorded for 23981113d785

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

@eowca
eowca marked this pull request as draft November 25, 2026 23:34
Architecture-Review: unchanged; existing receipt validation and explicit repost still govern publication.
Co-Authored-By: Codex <noreply@openai.com>
@eowca
eowca force-pushed the lean178/1092-surface-review-recovery branch from 0050bc4 to db11fe5 Compare November 25, 2026 23:56

@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 db11fe54778c4df18e735c6e08c82b3a6d03d8d1, 38.9s: approve (0 critical, 0 important, 2 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
result = _load_review(wt, head, kind, publication=publication)
candidates, excluded = _repost_reviewer_families(wt, config, head, result)
if result.fallback and not _published_fallback(result.fallback, candidates, excluded):
return False

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: Recoverability check copies the repost path's fallback and evidence checks

_has_recoverable_review repeats two checks from cmd_review: the _published_fallback check (line 751) and the codex_evidence repo/pr/publisher comparison (line 781). The repost path also checks the saved publication in two different ways. _load_review(..., publication=...) uses exact dict equality, while lines 737-743 re-read the file and compare it field by field. If one copy changes later, plain retry can call a receipt recoverable while --repost rejects it, or the reverse. That would bring back the dead end or the double-review this PR fixes. Smallest fix: move the fallback-form and evidence-context checks into one shared helper (for example, extend _repost_reviewer_families to also check _published_fallback) and call it from both paths.

Comment thread src/loopzero/cli.py
if args.model is None and args.effort is None and _has_recoverable_review(
wt, config, head, kind, publication_context,
):
raise CliError(f"saved {kind} review for {head[:12]}; run `loopzero review --repost`")

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: Refusal message doesn't say how to get a fresh review on purpose

When a valid receipt exists, a plain loopzero review stops and only points to --repost. The only documented ways to get a fresh review are --model or --effort, but the error doesn't mention them. Someone who wants to discard the saved result has to read the code to find out. Smallest fix: add to the message, e.g. "...; or pass --model/--effort to run a fresh review".

@eowca
eowca marked this pull request as ready for review November 26, 2026 00:57
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

❌ Left the queue · checks failed

1 min in the queue, less than a minute of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 00:58 · rule main · triggered by @eowca with the @mergifyio queue command
  • ❌ Checks failed · draft #1248
  • 🚫 Left the queue 00:59 · db11fe5

Not proven to be this pull request's failure. It failed on top of the pull requests ahead of it, and was not tested alone.

Reason

The merge conditions cannot be satisfied due to failing checks

  • checks

Failing checks:

To get back in the queue

  • If the failure comes from the pull requests it was tested with, or is a flake, comment @mergifyio queue to queue it again as it is.
  • If it is this pull request's, push a fix: the pull request is queued again once its queue conditions match.

Merge conditions not met when it left the queue

  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = checks
    • check-skipped = checks
    • check-success = checks
2 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify mergify Bot added dequeued and removed queued labels Nov 26, 2026
@mergify mergify Bot removed the dequeued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

❌ Left the queue · checks fails with this pull request

1 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 02:01 · rule main · triggered by @eowca with the @mergifyio queue command
  • ❌ Checks failed · draft #1359
  • 🚫 Left the queue 02:02 · 1d269c2

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • checks

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, comment @mergifyio queue to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = checks
    • check-skipped = checks
    • check-success = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility
    • check-success = Loop-zero Eligibility
1 merge condition met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify mergify Bot removed the dequeued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

❌ Left the queue · checks fails with this pull request

1 min in the queue, less than a minute of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 03:03 · rule main · triggered by @eowca with the @mergifyio queue command
  • ❌ Checks failed · draft #1452
  • 🚫 Left the queue 03:04 · 7ed12b8

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • checks

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, comment @mergifyio queue to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = checks
    • check-skipped = checks
    • check-success = checks
2 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify mergify Bot added dequeued and removed queued labels Nov 26, 2026
@mergify mergify Bot removed the dequeued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 9e4d846 at 09:25 UTC

5 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 09:20 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1756
  • ✅ Merged 09:25 · 9e4d846 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 9e4d846 into main Nov 26, 2026
13 checks passed
@eowca
eowca deleted the lean178/1092-surface-review-recovery branch November 26, 2026 09:25
@mergify mergify Bot removed the queued label 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.

Surface a saved review before a plain retry launches another reviewer

1 participant