From 21a3d8579e84e5fb7254fa0166c7d7439588754c Mon Sep 17 00:00:00 2001 From: "Risk.dll" Date: Sat, 22 Aug 2026 18:33:00 -0300 Subject: [PATCH] fix(bin): let spawn skip the freshen step for remote-less local-only 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. --- bin/fm-spawn.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/fm-spawn.sh b/bin/fm-spawn.sh index 31d5bbde83b..5c24df6d62a 100755 --- a/bin/fm-spawn.sh +++ b/bin/fm-spawn.sh @@ -138,6 +138,9 @@ # origin, resolves the current remote default branch, and resets to its tip. # An unreachable origin, unresolved default branch, or non-clean worktree # refuses the spawn rather than risking a PR based on stale history. +# A project with no origin remote at all (a local-only project registered +# with none) skips this freshen step silently, mirroring the same no-origin +# tolerance bin/fm-fleet-sync.sh already applies. # Batch dispatch: pass one or more `id=repo` pairs instead of a single , e.g. # fm-spawn.sh fix-a-k3=projects/foo add-b-q7=projects/bar [--scout] # Each pair re-execs this script in single-task mode, so the single path stays the only @@ -1729,6 +1732,9 @@ validate_spawn_worktree() { # freshen_spawn_worktree_base() { # local worktree=$1 default target expected actual status + if ! git -C "$worktree" remote get-url origin >/dev/null 2>&1; then + return 0 + fi if ! git -C "$worktree" fetch --quiet origin; then echo "error: could not fetch origin for pooled worktree '$worktree'; refusing to launch from a potentially stale base" >&2 return 1