Skip to content

Review conflict resolutions in the available delta round - #1731

Merged
mergify[bot] merged 2 commits into
mainfrom
lean178/1240-remerge-delta-final
Nov 26, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
lean178/1240-remerge-delta-final

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Use the available delta round to review a base conflict resolution on the same PR, with the reviewer seeing topic commits and resolution edits.

Closes #1240

Supersedes #1663.

Acceptance

  • Verify first-parent history and each merged parent against the configured base before invoking a reviewer.
  • Include topic changes, recorded merge resolutions, and submodule pointers. Exclude unrelated base changes and bind the delta to the resolved head.
  • Preserve clean-merge approval inheritance, finding checks, and pending hosted eligibility during GitHub outages.

Why this replaces #1663

The trusted installed CLI refused the delta across base merge b627b0e5, the defect this change fixes. This branch starts at current main and has the exact tree of #1663’s resolved head 08bbce39. The resolution retains #1680’s shared CLI assertion helper.

Review

Validation

Recorded for 2bc84ac36b61

  • 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 614b36e00b4568638f3ac80c6be6ee075f4358b4, 86.4s: approve (0 critical, 0 important, 3 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
if not worktree.merges_since(wt, since):
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)

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: Bound or fetch failures produce history-rewrite advice

base_merge_material returns None for two different cases. One is a proven bad history: the reviewed head is off the first-parent history, or a parent is not from the base. The other is any CandidateError: the 8 MiB _TREE_OUTPUT bound on the log --remerge-diff -p output, the shared 120 s _TREE_SECONDS deadline, a first-parent history deeper than _TREE_DEPTH=200, missing fetch auth, or a non-transient fetch error. _delta_patch treats both cases the same. It tells the user to save their work and replay fixes on the reviewed head, which is a history rewrite, even when the history is valid and only a resource bound or the fetch failed. A large but legitimate delta after a base merge would push the user into an unnecessary rewrite. Smallest fix: let CandidateError propagate (or return a separate sentinel) when the clean=False path is used, and report it as a verification or resource failure with retry advice. Keep the replay advice for the structural rejections only.

Comment thread src/loopzero/cli.py
f"before merging {config.base_branch} again"
)
patch = worktree.diff_since(wt, since)
patch = (_delta_patch(wt, config, since, head, publication[1] if publication else 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: publication[1] if publication else None adds an unreachable branch with a misleading result

The only caller of _run_review always passes publication. If a future caller omitted it, number=None would skip verification and raise the 'could not verify merge history … replay the fixes' error for a valid history. Prefer a subtractive fix: pass pr.number explicitly, or make publication required for delta reviews and drop the None handling in _delta_patch.

if clean:
return b""
patch = git("log", "--first-parent", "--reverse", "--remerge-diff", "-p", "--format=",
"--no-color", "--no-ext-diff", "--no-textconv", "--text",

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: Delta material relies on --remerge-diff overriding the diff-merges default that --first-parent sets

git log --first-parent defaults merge diffs to first-parent. Only the later explicit --remerge-diff keeps base changes out of the material. That is correct and the test asserts upstream.py is absent, but the behaviour is implicit and depends on option order and Git ≥ 2.36. Spelling it as --diff-merges=remerge makes the intent explicit and robust to option reordering.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Primary review disposition: defer granular resource-limit diagnostics and tightening the private publication argument. The Git invocation explicitly selects remerge diffs, and the regression checks the actual reviewer input to catch inclusion of unrelated base changes. None of the suggestions requires changing the approved head.

@eowca
eowca marked this pull request as ready for review November 26, 2026 09:20

@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 delta review by claude on 2bc84ac36b6119dc2caa29626a07c813a4ef834e, 10.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.

Comment thread core/CONTRACT.md
- One primary and at most one delta per PR. The delta reads only
changes since the primary; unresolved primary findings still count under
Blockers.
- One primary and at most one delta per PR. After a base merge, the delta covers first-parent topic changes and

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: Shortened wording drops what a remerge edit is measured against

The old text said the delta gets the changes from each automatic remerge to its recorded merge tree. The new text says only "edits to each automatic remerge", so it no longer says what those edits are compared with. A reader could take it to mean the whole merge diff against the first parent, which would pull in unrelated base changes. The task's acceptance criteria rule that out. If the size budget allows, a short fix is "edits from each automatic remerge to its recorded merge". The rewrapped lines are also about 115 characters wide, while the rest of this list wraps near 80. That passes the existing checks (tests/test_size_budget.py only limits core/CONTRACT.md's size), so it is only a style point.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Delta review disposition: retain the approved three-line contract wording. The architecture guide explicitly defines the comparison as each automatic remerge against its recorded tree, and the regression checks that unrelated base changes stay out of the reviewer input.

@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 588ee89 at 09:52 UTC

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

So far

  • ✅ Entered the queue Thu 26 Nov, 09:47 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1783
  • ✅ Merged 09:52 · 588ee89 · 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.

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