fix(bin): let spawn skip the freshen step for remote-less local-only projects - #2813
Open
rizkrisk wants to merge 1 commit into
Open
fix(bin): let spawn skip the freshen step for remote-less local-only projects#2813rizkrisk wants to merge 1 commit into
rizkrisk wants to merge 1 commit into
Conversation
…projects A local-only project may have no origin remote at all, but freshen_spawn_worktree_base() unconditionally fetched origin before launching a worker, so every ship/scout spawn against such a project failed outright with "'origin' does not appear to be a git repository". fm-fleet-sync.sh already tolerates this exact case (skips silently when a project has no origin remote); mirror that same check here so the worktree-freshen step skips instead of erroring when there is no origin to freshen against.
Confidence Score: 4/5The malformed-origin case should be fixed before merging because it can silently launch work from a stale pooled base. The new guard returns success for any origin URL lookup failure, while the caller proceeds with launch and no preceding validation excludes a broken configured origin. Files Needing Attention: bin/fm-spawn.sh Reviews (1): Last reviewed commit: "fix(bin): let spawn skip the freshen ste..." | Re-trigger Greptile |
Comment on lines
1733
to
1734
| freshen_spawn_worktree_base() { # <worktree> | ||
| local worktree=$1 default target expected actual status |
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A
local-onlyproject can be registered with nooriginremote at all. Butfreshen_spawn_worktree_base()inbin/fm-spawn.shunconditionally runsgit fetch originbefore launching a worker, so every ship/scout spawn against such a project fails outright with:Fix
bin/fm-fleet-sync.shalready tolerates this exact case — it skips silently when a project has nooriginremote. This change mirrors that same guard in the spawn path: if the worktree has noorigin, the freshen step returns early instead of erroring.6 lines, behavior-preserving for every project that does have an origin.
Testing
Verified against a
local-onlypilot project (no remote): ship and scout spawns that previously failed at the freshen step now proceed. Projects with an origin are unaffected — the fetch/reset path runs exactly as before.