You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the #144 decision, the foreground cold path makes exactly one narrow network call and no broad one. Depends on the updater-sweep build ticket (the sweep must exist before the foreground stops sweeping).
ensure_repo (repo_manager.py:204-236) stops fetching: remove the _should_fetch/fetch_repo branch and the auto_fetch parameter (production never passes False; tests that did get the behavior for free). It becomes the pure locked clone-if-missing primitive.
ensure_branch (workspace_clone.py:172-206): replace lazy_fetch (:190) with an unconditional targeted fetch of the requested ref into the bare repo (git fetch origin +refs/heads/<branch>:refs/heads/<branch>); on ref-missing-on-remote, one targeted fetch of the default branch before ensure_branch_exists bases on it. Model the outcome as the three-way result from Move the interval git fetch off the foreground launch path and out of the repo lock #144 (updated / ref-missing / network-failed → proceed-fresh / create-from-default / warn-and-use-cache-or-error), not a bool. Do not write last_fetched here.
Delete _prepare_workspace step 4 (workspace_clone.py:298-310) — its output is unused (plain git checkout <branch> at :338).
Failing tests first: (1) the lock-aware fetch pin from #144 — no +refs/heads/* fetch in the foreground, only the targeted refspec ever under the repo lock (flock LOCK_NB probe in the fake subprocess.run); (2) re-registration path runs zero fetch in the workspace clone; (3) staleness contract integration: remote gains a commit after the cache cloned → new workspace HEAD == remote tip; ref only on remote → succeeds; ref nowhere → existing error.
Question
Per the #144 decision, the foreground cold path makes exactly one narrow network call and no broad one. Depends on the updater-sweep build ticket (the sweep must exist before the foreground stops sweeping).
ensure_repo(repo_manager.py:204-236) stops fetching: remove the_should_fetch/fetch_repobranch and theauto_fetchparameter (production never passesFalse; tests that did get the behavior for free). It becomes the pure locked clone-if-missing primitive.ensure_branch(workspace_clone.py:172-206): replacelazy_fetch(:190) with an unconditional targeted fetch of the requested ref into the bare repo (git fetch origin +refs/heads/<branch>:refs/heads/<branch>); on ref-missing-on-remote, one targeted fetch of the default branch beforeensure_branch_existsbases on it. Model the outcome as the three-way result from Move the interval git fetch off the foreground launch path and out of the repo lock #144 (updated / ref-missing / network-failed → proceed-fresh / create-from-default / warn-and-use-cache-or-error), not a bool. Do not writelast_fetchedhere._prepare_workspacestep 4 (workspace_clone.py:298-310) — its output is unused (plaingit checkout <branch>at :338).Failing tests first: (1) the lock-aware fetch pin from #144 — no
+refs/heads/*fetch in the foreground, only the targeted refspec ever under the repo lock (flock LOCK_NB probe in the fakesubprocess.run); (2) re-registration path runs zero fetch in the workspace clone; (3) staleness contract integration: remote gains a commit after the cache cloned → new workspace HEAD == remote tip; ref only on remote → succeeds; ref nowhere → existing error.Files: devlaunch/worktree/repo_manager.py, devlaunch/worktree/workspace_clone.py, test/test_worktree_repo_manager.py (existing
auto_fetchtests), test/integration/test_repo_manager_real.py.