Repository navigation
Bind PR publication to its repository and task history - #1619
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 9527586085d0355fa0f7bc2901c495f094df8082, 40.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.
| force_lease = not _is_ancestor(wt, pr.head_sha, head) | ||
| if force_lease: | ||
| previous_heads = _git(wt, "reflog", "show", "--format=%H", f"refs/heads/{branch}").splitlines() | ||
| if not any(_is_ancestor(wt, pr.head_sha, previous) for previous in previous_heads): |
There was a problem hiding this comment.
suggestion: Reflog ancestry check starts one git process per reflog entry
any(_is_ancestor(wt, pr.head_sha, previous) for previous in previous_heads) runs a separate git merge-base --is-ancestor for each reflog entry. A long-lived task branch can have hundreds of entries. When the PR head is missing from all of them (the rejection path), every entry is checked before the error appears, which costs one fork/exec plus one history walk per entry. The result is still correct. If this gets slow, a single git call can do the same check: pass the reflog tips to git rev-list with --stdin/--no-walk and see whether pr.head_sha is reachable, or use git merge-base --is-ancestor only on a deduplicated list, since repeated amends often produce duplicate tips. This isn't blocking.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Bind PR publication to its repository and task history
Context and goal
Closes #1535
Closes #1536
Acceptance
Base
main @ 0b74780
Base: 0b74780
Validation
Recorded for
9527586085d0uv 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 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review