Repository navigation
Review conflict resolutions in the available delta round - #1731
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
|
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. |
There was a problem hiding this comment.
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.
| - 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 |
There was a problem hiding this comment.
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.
|
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. |
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
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
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 head08bbce39. The resolution retains #1680’s shared CLI assertion helper.Review
Validation
Recorded for
2bc84ac36b61uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0