Repository navigation
Resolve the task base in one Git fetch - #1963
Conversation
Architecture-Review: unchanged; start still verifies the remote base and checks out the exact fetched commit without using shared FETCH_HEAD. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; base resolution still validates origin and materializes the exact commit before checkout. Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; worktrees with initialized submodules keep the previous exact-SHA fetch and its recursion. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on ba6d73495e1fce2170e793e30d01f1469bfe6692, 60.6s: 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.
|
|
||
|
|
||
| @pytest.mark.parametrize("branch", [None, "feature/ci+release", "symbolic"]) | ||
| @pytest.mark.parametrize("branch", [None, "feature/ci+release", "symbolic", "legacy"]) |
There was a problem hiding this comment.
suggestion: No tests for the initialized-submodule and invalid-ref-name fallbacks
The acceptance criteria say three cases must keep using the existing ls-remote + exact-SHA fetch path: initialized submodules, invalid base ref names and symbolic tracking refs. The parametrized test covers symbolic tracking refs and the legacy-Git 129 fallback, but nothing exercises modules.exists() (the point of commit 3684a7d) or a check-ref-format failure. A later refactor could drop either guard without any test failing. Smallest fix: add a submodule case that creates $(git rev-parse --git-path modules) before start, and assert through the existing run monkeypatch that no git fetch --porcelain call was made and that ls-remote ran. Optionally, add a case that passes a base name check-ref-format rejects and assert the command reported in the GitError is ls-remote.
| with pytest.raises(worktree.GitError) as info: | ||
| worktree.start(repo, "nobase", "does-not-exist") | ||
| assert info.value.command[:2] == ("git", "ls-remote") | ||
| assert info.value.command[0] == "git" |
There was a problem hiding this comment.
suggestion: Failure-command assertion was loosened to accept either path
test_start_reports_git_failure_with_command now accepts either fetch or ls-remote. On the test's Git version the outcome is deterministic, so this no longer checks which path produced the error. A regression that sends a valid missing branch down the fallback path would still pass. Smallest fix: assert command[:3] == ("git", "fetch", "--porcelain") when the installed Git supports --porcelain, and ls-remote otherwise. Alternatively, parametrize the test with the existing legacy monkeypatch so both paths are pinned.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Resolve the task base in one Git fetch
Context and goal
loopzero start.Acceptance
Notes
The architecture guide still applies. Start verifies the remote base and makes its objects available before checkout. The fast path reads the current Git invocation's output and only updates the existing direct tracking ref. The existing exact-SHA path covers symbolic tracking refs, initialized submodules and older Git.
Base
main @ f06e494
Base: f06e494
Validation
Recorded for
ba6d73495e1fuv 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 0Review
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.