Skip to content

fix(bin): let spawn skip the freshen step for remote-less local-only projects - #2813

Open
rizkrisk wants to merge 1 commit into
kunchenguid:mainfrom
rizkrisk:fix/spawn-local-only-no-origin
Open

fix(bin): let spawn skip the freshen step for remote-less local-only projects#2813
rizkrisk wants to merge 1 commit into
kunchenguid:mainfrom
rizkrisk:fix/spawn-local-only-no-origin

Conversation

@rizkrisk

Copy link
Copy Markdown

Problem

A local-only project can be registered with no origin remote at all. But freshen_spawn_worktree_base() in bin/fm-spawn.sh unconditionally runs git fetch origin before launching a worker, so every ship/scout spawn against such a project fails outright with:

'origin' does not appear to be a git repository

Fix

bin/fm-fleet-sync.sh already tolerates this exact case — it skips silently when a project has no origin remote. This change mirrors that same guard in the spawn path: if the worktree has no origin, 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-only pilot 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.

…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.
@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown

Confidence Score: 4/5

The 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 thread bin/fm-spawn.sh
Comment on lines 1733 to 1734
freshen_spawn_worktree_base() { # <worktree>
local worktree=$1 default target expected actual status

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Broken origin bypasses freshening

When a pooled worktree has an existing origin entry whose URL is missing or invalid, remote get-url fails and this guard treats it as a remote-less project, causing the worker to launch from a potentially stale base without fetching or resetting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant