Repository navigation
Resolve the fetched task base by ref - #1394
Conversation
Architecture-Review: unchanged; start still creates its worktree at the fetched configured base. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on e01d259a60fa953815e510be7c14fbcd38a95ff6, 22.5s: 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.
| base_ref = f"refs/remotes/origin/{base_branch}" | ||
| try: | ||
| _git(repo_root, "fetch", "--quiet", "origin", f"refs/heads/{base_branch}") | ||
| _git(repo_root, "fetch", "--quiet", "origin", f"+refs/heads/{base_branch}:{base_ref}") |
There was a problem hiding this comment.
suggestion: Fetch still overwrites the shared FETCH_HEAD
start no longer reads FETCH_HEAD, but its fetch still writes it. A user or another tool in the same checkout that runs git fetch X && git merge FETCH_HEAD can therefore have its FETCH_HEAD replaced by loopzero's base fetch, which is the same race in the other direction. candidate.py:358 already passes --no-write-fetch-head. Smallest fix: add --no-write-fetch-head to this fetch so both fetch sites behave the same way. Not blocking.
| invoke = worktree._git | ||
| def interleave(path, *args, **kwargs): | ||
| result = invoke(path, *args, **kwargs) | ||
| if args[0] == "fetch": |
There was a problem hiding this comment.
suggestion: Interleave hook catches every _git call that starts with fetch
interleave runs the competing fetch after any _git(..., "fetch", ...). Today start makes only one fetch call, so the test is correct. If a second fetch is added later, the hook will quietly fire again. Matching the exact base fetch (for example args[:1] == ("fetch",) and f"refs/heads/main" in args[-1]) or asserting the hook fired exactly once would keep the test aimed at the race it reproduces. I confirmed the test fails on the old code: in both parametrizations side points at the pre-commit_on_origin main, so a FETCH_HEAD-based base would differ from upstream.
|
The full slotted check passed at e01d259, both required hosted checks are green, and the primary review approved this head. Readiness rejects only the missing settings fingerprint from the installed CLI receipt. I am using the owner queue route so Mergify verifies the integration candidate. |
|
@Mergifyio queue |
✅ Merged into
|
Closes #1370
loopzero startnow fetches the configured base into its explicit remote-tracking ref and verifies that ref as a commit. An overlapping fetch of a different branch can changeFETCH_HEADwithout affecting the task base. The explicit destination also works from a single-branch clone that excludes the base.The offline regression interleaves a real fetch of a different branch and verifies the task HEAD and recorded base. Both variants failed before the fix. All 34 worktree tests and the full slotted
loopzero checkpassed one01d259a60fa953815e510be7c14fbcd38a95ff6.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review