Skip to content

Review conflict resolutions in the available delta round - #1663

Closed
eowca wants to merge 3 commits into
mainfrom
lean178/1240-remerge-delta-replacement
Closed

eowca wants to merge 3 commits into
mainfrom
lean178/1240-remerge-delta-replacement

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Let a PR use its available delta round to review a conflict resolution after merging main. On #1583, loopzero rejected a tested resolution before invoking the reviewer.

Closes #1240. Supersedes #1259.

Acceptance

  • Verify first-parent history and that every merged parent comes from the live configured base.
  • Supply topic patches and changes from automatic remerges to their recorded trees, including submodule pointers. Exclude unrelated base changes and bind the review to the resolved head.
  • Preserve clean-merge approval inheritance, finding checks, and pending hosted eligibility when GitHub is unavailable.

Notes

This carries #1259’s approved patch onto a8fc35c9. The overlap with #1559 preserves its explicit propagation of transient GitHub failures in both review paths.


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

Review

  • primary, claude, 2167696, approve

Validation

Recorded for 21676967b8ce

  • 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

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 21676967b8ce1806e84127d320eee8c81a8faba2, 70.8s: 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
return worktree.diff_since(wt, since)
patch = (eligibility.base_merge_material(config.repo, number, since, head, config.base_branch, clean=False)
if number is not None else None)
if patch is None:

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: Resource-bound and runtime Git failures are reported as unverifiable merge history

base_merge_material turns every CandidateError into None. That includes a remerge-diff patch over 8 MiB (_TREE_OUTPUT), the 120 s time bound, the 256 MiB store bound and a fetch shallower than the 200-commit depth. _delta_patch then tells the author their merge history is wrong and that they should replay their fixes on the reviewed head. For a legitimate large conflict resolution, that sends them into a destructive recovery that cannot help. The local no-merge path (worktree.diff_since) has no such bound, so the two delta paths also behave differently. Smallest fix: in base_merge_material, let CandidateErrors raised from the bound checks propagate, or return a distinct sentinel for them. _delta_patch can then say the resource bound was exceeded instead of giving the history-recovery advice.

Comment thread src/loopzero/cli.py
)
if allowed != kind:
raise CliError("saved review kind differs from the remaining review budget")
_delta_patch(wt, config, reviewed, head, pr.number)

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: Repost builds and discards the full delta patch just to validate history

On --repost, _delta_patch(wt, config, reviewed, head, pr.number) runs only for its exceptions. For merged histories this means a GitHub API call, a depth-200 isolated fetch and a full log --remerge-diff, and the resulting bytes are thrown away. It also does not compare the material against what the saved review actually saw. As written, a failure on an unrelated bound blocks reposting a review that was already produced. Consider a cheaper check that only verifies the history (for example, an optional flag on base_merge_material that stops before running git log). Alternatively, save the reviewed material's byte length or hash with the review and compare that, so the check binds to the reviewed material.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Primary review disposition: defer more granular resource-limit diagnostics and skipping patch construction on repost. The current bounds fail closed, and repost intentionally revalidates the live base before publishing saved exact-head evidence. Both suggestions are follow-up improvements, so this replacement stays at the approved head.

eowca and others added 2 commits November 26, 2026 09:27
Architecture-Review: unchanged; the conflict resolution reuses the test helper while checking the same review refusal.

Co-Authored-By: Codex <noreply@openai.com>
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1731 for #1240 because the trusted CLI could not review the resolved base merge.

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.

review trust: Review conflict resolutions in the available delta

1 participant