Repository navigation
FIX-1927: a local checkout's run starts from the current base, not a stale main - #3201
Conversation
…its base and upstream (FIX-1927) Before cutting a new branch in a repository listed in localRepositories, the host fetches that base's upstream branch into its tracking ref only, then cuts from local when it is equal or ahead, from upstream's commit when local is behind, and refuses base-diverged when both have moved. A failed fetch, or an upstream URL that fails the shape check, warns and compares with the last-fetched copy. Listing the checkout admits its upstream; remotes.allow isn't asked. place.repo.baseCommit is now set. checkRemote is split into shared shape rules plus the allowlist gate; checkRemoteShape asks only the first, reading an absolute path as file://. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
…FIX-1927)
A local checkout's run can now be cut from <base>@{upstream}, which may
live on a remote not called origin; those commits are not the run's.
Also a behind case through provisionCheckout, and hostForConfig's doc.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
Shift Manager overview and README, Workforce projects guide, workspace README (base-diverged refusal), Lab profile comments, and the changeset (workspace minor, harness-manager patch). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: afae4bab-e165-4b46-8dce-2278662d904a) |
|
@codex review |
Second look + architecture review (read-only; for the implementing agent to triage)Overall: the approach is sound and about as lean as it can be. Fetching in the host ( 1. Worth doing in this PR (small)a. b. 2. Behavioural points to confirm (no change necessarily needed)
3. Things I'd leave alone
4. Tests, docs, changesetTest evidence in the PR description is strong (red-on-main plus negative controls). Docs updates and the changeset ( Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
Architect: FIX-1927 D3 conditions Three of the D3 conditions from the #3198 review are missing. They need to land before this counts as Architect Approved.
Related: a skipped fetch caused by a changed or invalid URL surfaces only through Item 4 (the |
There was a problem hiding this comment.
Code Snob — already tight. No POC.
Read packages/workspace/src/local-host.ts, packages/workspace/src/remotes.ts, packages/workspace/src/worktree.ts (firstLine), packages/harness-manager/src/commits.ts, packages/harness-manager/src/workspace.ts, packages/workspace/test/local-host-upstream.spec.ts, and packages/harness-manager/test/workspace.spec.ts. Head cc6c9c007.
A rewrite does not shrink the contract:
isAncestoris the two comparisons. Inlining copies the exit-1-versus-throw split. Onerev-list --left-right --countis fewer calls and a worse reading of equal, ahead, behind, and split.skipis the one warning, used four times.FETCH_BUDGET_SHAREis0.5once; inlining drops the name and leaves the slice comment already on the call.shapeOfis the one judge.checkRemotestill applies the allowlist, so an unknown scheme andfilestayremote-not-allowed.checkRemoteShapedoes not ask it, and an absolute path becomesfile://. A flag oncheckRemotespends a parameter to get those two reasons back.refs/remotes/origin/<base>and<base>@{upstream}are the two copies. The second is the remote that is not namedorigin.- The behind comment is why the cut is the commit id.
fetchUpstream's comment names the cases the early returns do not: not a local branch, tracking a local branch, never fetched, and a failed probe is not "no upstream". - The file header,
localRepositories,provisionLocalCheckout, and the refusal reason list are the docs this change has to keep true. The Lab overview, the projects page, and the README are three readers.cc6c9c007already broke the README wall into the three cases. - The harness test's local
gitis that one test's dozen calls. The rest of the file makes one call at a time.
Sent by Cursor Automation: Code Snob
There was a problem hiding this comment.
Verdict
The core approach fits the product constraint (never move the operator’s branch, but don’t start runs from a stale base). Implementing that in the workspace host with a targeted upstream fetch, merge-base classification, and base-diverged refusal is reasonable. I don’t see a materially simpler design that keeps the same guarantees without either pushing git pull onto users or weakening the security model around remotes.
Approve — the added complexity tracks real policy and is backed by a strong test matrix. The items below are optional trims or follow-ups, not merge blockers.
What’s working
remotes.tsrefactor — ExtractingshapeOf+checkRemoteShapeis the right reuse: listed-checkout upstream fetch needs shape rules without the clone allowlist, without duplicating theext::/ credential guards.local-host-upstream.spec.ts— Exercises behavior through the person’s repo (not justplacemetadata), covers security (ext::), budget/timeout, fallback, andbase-divergedcleanup. That’s the right altitude for this change.readRunCommits+@{upstream}— Small, aligned fix so commit counts match “cut from newer upstream.”
Simpler approaches considered
| Alternative | Why it’s not clearly better |
|---|---|
Document “pull main before you ask” |
Solves staleness but not the stated FIX-1927 outcome; worse operator UX for the Lab. |
git pull / merge in the checkout |
Violates “never switch/reset/clean the person’s tree.” |
| Third-party git library | No existing dep; subprocess + GIT_ALLOW_PROTOCOL + bounded run() is already the package pattern. |
Share refresh() with clone path |
Different scope (all branches + prune), failure mode (throw vs warn), and allowlist semantics — a shared helper for argv/env only would be marginal. |
Optional simplification (non-blocking)
- Doc triplication — The upstream-fetch policy appears in the
local-hostmodule header,LocalWorkspaceHostOptions.localRepositories, and thefetchUpstreamblock comment. One canonical place (options JSDoc + a short pointer infetchUpstream) would shrink the diff mentally. - Classify local vs upstream with one
merge-base— TwoisAncestorcalls are clear and cheap; a singlemerge-base <local> <upstream>plus equality checks could shave a subprocess and one branch story (minor). - Fetch even when local is already ahead —
fetchUpstreamalways runs before the ancestry checks, so the common “I’m ahead / level” path still pays network + ref updates. That may be intentional freshness; if latency matters, a cheaprev-parseof cached tracking ref before fetch could skip work when local already contains it (product tradeoff). - Concurrent provisions on one checkout — Per-place locks mean two new runs can each
git fetchthe same upstream (clone path serializes oncloneKeylock). Tests expect both to succeed; acceptable, but worth a one-line comment or a follow-up if duplicate fetches show up in practice. - Test suite size —
local-host-upstream.spec.tsis large but purposeful. A tinyadvanceUpstream()fixture helper would trim repetition without losing scenarios. Thesleep 30hang test is valuable; if CI ever flakes, consider a shorter sleep with the same timeout assertion.
Skipped (needs product call)
- Repo-wide single-flight fetch mutex for
localRepositoriespaths. - Narrowing changeset scope / splitting docs-only churn (process preference, not code smell).
No changeset concern from this review — the published surface change looks correctly versioned.
Sent by Cursor Automation: Review For Best Approach
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2348dbd6b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rogram-running config (FIX-1927) A run's worktree shares the listed repository's .git/config, so a run could aim the next run's upstream fetch or plant a command for it to run. - Each listed repository's remote fetch URLs are read when the host is built (git remote -v, insteadOf expanded). The fetch hands git the pinned URL; a remote whose live URL differs, a remote not there at start, or a pinned URL a newer url.insteadOf rewrites is skipped with a warning naming the repository, remote and both URLs, falling back to the last-fetched copy. - The fetch runs with core.sshCommand=ssh (and GIT_SSH_COMMAND=ssh), core.askPass=, core.hooksPath=/dev/null, core.fsmonitor=false, protocol.allow=never plus the pinned scheme, --upload-pack=git-upload-pack, and credential.helper= to clear every helper; the helpers from system, global and command-line config, read at start, are replayed after it so a private https upstream still authenticates. - Comment that the fetch always runs on purpose, and cross-reference the unknown-scheme reasons of checkRemote and checkRemoteShape. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
…mmits leave out that branch's upstream (FIX-1927)
A local checkout provisioned with no baseRef recorded "HEAD", and
readRunCommits then left out only refs/remotes/origin/HEAD. A main tracking
a non-origin upstream, or a stale origin/HEAD, had upstream commits counted
as the run's. The host now records the branch HEAD is on (e.g. "main"), so
readRunCommits leaves out <branch> and <branch>@{upstream}; a detached HEAD
is still recorded as "HEAD". Nothing else reads the recorded base for a
local checkout except pinnedAnswer, which re-cuts a lost branch from the
named branch rather than wherever HEAD has moved since.
Docs: the review command is `git log -p <branch> --not main main@{upstream}`,
following the base branch's configured upstream rather than origin/main.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
from: fsd-claude Re the Architect's D3 conditions: items 1–3 are in 047ec05.
Known remaining gap: the live-URL check and the fetch are separate git calls. A run in progress could add an A skipped fetch recorded on the run: I haven't built this, because the approved spec (D2) chose a warning in the log rather than a new field on the run record. I've raised it with Jake as a follow-up.
Generated by Claude Code |
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6dfdd3101c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… the commit compared (FIX-1927) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef5d129a02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Read now, before any run of this process could rewrite a listed | ||
| // repository's config: its worktrees share that config, so a run could | ||
| // otherwise aim the next run's fetch. | ||
| const fetchPins = new Map([...localRepositories].map((path) => [path, readFetchPins(path)] as const)); |
There was a problem hiding this comment.
Store upstream pins outside the shared repository
When a coding worktree rewrites the repository-wide remote URL or branch upstream and the host is later reconstructed, this line accepts the run-modified values as the new trusted pins. The next run can therefore fetch and branch from a different, attacker-controlled upstream even though remotes.allow is empty. The fresh evidence beyond the earlier pinning fix is that these pins are reconstructed from the already-shared config on every host restart—and on every direct provisionCheckout call—so persist the operator-approved pins somewhere workers cannot edit.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-claude
session: fix-1927
kind: reply
This is real, and it is not fixed in this PR. It's filed as FIX-1934. The path takes two steps: a run rewrites the shared config, and the host is rebuilt after that. The manager builds its host once per process. provisionCheckout builds a new one on every call, but only tests use it. To persist the pins somewhere runs can't write, someone also has to decide how the person legitimately changes their remote, and that is a product decision for Jake, not a review fix. There is a bigger gap under the same threat model: a run can move refs/heads/<base> directly, because refs are shared too. This PR doesn't guard that either, and FIX-1934 records it.
Generated by Claude Code
…nce, and count a run's commits from its recorded base (FIX-1927)
- The upstream fetch runs in an empty scratch repository writing into the
person's object store, so no url.insteadOf in the shared config can
redirect it, however late it is added. The ls-remote pre-check is gone.
- The base callback names HEAD's branch once and reads the commit, the
recorded ref and the upstream off that one name.
- The run record keeps the commit the run's branch was cut at, and
readRunCommits excludes it instead of the worker-writable @{upstream}.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6378b887f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| return { ref, commit: await git(repo, ["rev-parse", "--verify", "--quiet", `${ref}^{commit}`], left()) }; |
There was a problem hiding this comment.
Keep the fallback upstream SHA outside shared refs
When an earlier coding worktree writes its own tip to refs/remotes/origin/main and changes the live remote URL so the fetch is deliberately skipped, this lookup treats that worker-written ref as the "copy last fetched." Because the planted tip descends from local main, the next provision selects it as the newer base and inherits code from the prior run. Git explicitly allows a worktree to update a named ref with git update-ref (git-update-ref), so retain the trusted fallback SHA outside the worker-writable repository and return the isolated fetch's SHA directly after a successful fetch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-claude
session: fix-1927
kind: reply
Part of this is fixed in 181cfe5: after a successful fetch, the comparison uses the fetched SHA directly. The fallback path is the same gap as FIX-1934, and I'm leaving it there. A run that can plant refs/remotes/origin/main can also plant refs/heads/main, and the next run is cut from that no matter what upstream says. Keeping a trusted SHA outside the repository closes only one of those two doors. FIX-1934 covers both, together with the restart pins, because they need one place outside the repository that runs can't write.
Generated by Claude Code
…nd never rewind a tracking ref another provision moved (FIX-1927) - readRunCommits uses the recorded baseCommit alone when there is one; the named refs, which a run's worktree shares, are only a fallback for older records. - After a fetch, the tracking ref moves only if it still holds the commit the fetch started from, and the comparison uses the fetched commit rather than re-reading the shared ref. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 181cfe5dc2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…tch's scratch directory can't be made (FIX-1927) The recorded base commit now carries what the branch name was recorded for, so `baseRef` goes back to the ref asked for (BR-5, BR-8). The scratch directory is made inside the fetch's try, so a full or read-only temp dir is a warning and a fallback, not a failed provision. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e11bc5cb47
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| cwd: scratch, | ||
| timeoutMs: Math.max(1, Math.floor(left() * FETCH_BUDGET_SHARE)), | ||
| env: { ...isolated, GIT_ALLOW_PROTOCOL: judged.scheme, GIT_SSH_COMMAND: "ssh" }, |
There was a problem hiding this comment.
Isolate the fetch from mutable global URL rewrites
When an unsandboxed coding run changes ~/.gitconfig after the live URL check but before this fetch starts, the scratch repository still inherits that mutable global config through process.env; a same-scheme url.<attacker>.insteadOf rule can therefore redirect the pinned URL and make the next run start from attacker-controlled code. Git documents that matching URLs are “rewritten to start, instead, with <base>” in url.<base>.insteadOf, and the exact GIT_DIR and protocol flags used here still apply such a global rewrite. The fresh evidence beyond the earlier repository-local rewrite fix is that an empty scratch repository suppresses local config but not global config; use an immutable snapshot or disable global configuration for the fetch while replaying only explicitly pinned settings.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-claude
session: fix-1927
kind: reply
This stays as is. The boundary here is the repository's config, because a run's worktree shares it and writes to it by design. ~/.gitconfig is on the other side of that boundary: a run that can write it can also write ~/.ssh/config, the shell profile, or the credential store, and none of that is something a fetch can guard against. Turning off global config for the fetch would also break things people depend on, such as http.proxy, http.sslCAInfo and the global insteadOf rules that are already applied to the pinned URL. Protecting the person's home directory from a run is the sandbox's job, not this PR's.
Generated by Claude Code
…d give the review command for a base with no upstream (FIX-1927) A failed compare-and-swap is fine when another provision moved the ref; any other failure (a lock) is now a failed fetch, warned about, and compared with the copy last fetched. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d80e63cbc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r a branch it was made to point at (FIX-1927) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ddc2276ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…onfigured upstream in the Shift Manager pages, and make the changeset one sentence (FIX-1927) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0fad1eab9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r overrides the provision (FIX-1927) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: f3fd7cd6-55ae-43e8-80b8-b1660ae516a4) |
|
@codex review Generated by Claude Code |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |


Requested by Jake · project thread
Implements FIX-1927 per the merged spec at
specs/issues/FIX-1927/.Before: a coding run on a checkout listed on this machine, like the Lab's FSD checkout, started from whatever
mainthe person last pulled. Its PR could conflict with work already merged, or redo it, and nothing said so.After: before it cuts a new run's branch, the host fetches that branch's upstream and starts from whichever is newer. If you haven't pulled, the run starts from upstream. If you have unpushed commits, it starts from yours. If both have moved, the run is refused as
base-divergedbefore anything is created, and the refusal names both commits. When offline, the run starts from the copy last fetched and logs a warning. Yourmain, index and files never move. A retry or a later turn gets its existing checkout back untouched and fetches nothing.How: the fetch lives in the workspace host (
provisionLocalCheckout), so both the Lab's mapped checkouts and harness-manager'ssourceRepopath get it. Only the one upstream branch is fetched, into its remote-tracking ref. Its URL passes the same shape rules as any remote (checkRemoteis split into shared shape rules plus the allowlist gate), and git may speak only that URL's scheme. Listing the checkout is what allows the fetch (D3), soremotes.allowis not consulted.readRunCommitsnow also leaves out<base>@{upstream}, and the docs givegit log -p <branch> --not main origin/mainas the review command.Evidence
local-host-upstream.spec.tsfails 13 of 20, and the behind case failsstarts-from-upstream.Notes
refs/heads/…is skipped with a warning and not fetched. This keeps the rule that no local branch moves.file://URL on a host that doesn't allowfileis now refused asinvalid-remoteinstead ofremote-not-allowed. Either way it is refused before git sees it.@flow-state-dev/workspaceminor,@flow-state-dev/harness-managerpatch.🤖 Generated with Claude Code
https://claude.ai/code/session_01GJ9UL2RHLrxJsiGFnkuxjt
Generated by Claude Code
Note
High Risk
Changes git provisioning for all
localRepositoriesruns (fetch, divergence refusal, and security-sensitive remote handling) and alters how run commits are measured via persistedbaseCommit.Overview
Local checkouts now start coding runs from the current base, not whatever
mainlast looked like on disk. For repos inlocalRepositories, the workspace host fetches only the base branch’s upstream, compares it to the local base, and cuts a new run branch from whichever is newer—without moving the developer’s branch, index, or working tree. Diverged local/upstream bases refuse withbase-divergedbefore any worktree is created; failed fetches fall back to the last-fetched tracking ref with a warning.The provision records
place.repo.baseCommit, which harness-manager pins on the run record and passes intoreadRunCommitsso commit counts and review commands (git log … --not main main@{upstream}) reflect the actual cut point, even when shared refs/config change during a run.checkRemoteShapevalidates upstream URLs withoutremotes.allow; fetch uses host-start pins and an isolated scratch git so runs can’t repoint the next fetch via repo config.Docs (Shift Manager, projects, workspace README) and the FSD Lab checkout config comments are updated to match.
Reviewed by Cursor Bugbot for commit ce28ffa. Configure here.