fix(refinery): use mayor/rig fallback for correct git remote

Refinery was using rig.Path which found the town's .git with rig-named
remotes (e.g., 'gastown') instead of 'origin'. This caused refinery to
miss polecat branches when fetching.

Now falls back to mayor/rig (which has 'origin' pointing to the project
repo) when refinery/rig doesn't exist.

Fixes: hq-uvrzt
This commit is contained in:
mayor
2026-01-09 12:41:56 -08:00
committed by Steve Yegge
parent 1701474b3d
commit ff3d1b2e23
2 changed files with 13 additions and 4 deletions

View File

@@ -162,8 +162,9 @@ func (m *Manager) Start(foreground bool) error {
// Working directory is the refinery worktree (shares .git with mayor/polecats)
refineryRigDir := filepath.Join(m.rig.Path, "refinery", "rig")
if _, err := os.Stat(refineryRigDir); os.IsNotExist(err) {
// Fall back to rig path if refinery/rig doesn't exist
refineryRigDir = m.workDir
// Fall back to mayor/rig (legacy architecture) - ensures we use project git, not town git.
// Using rig.Path directly would find town's .git with rig-named remotes instead of "origin".
refineryRigDir = filepath.Join(m.rig.Path, "mayor", "rig")
}
// Ensure runtime settings exist in refinery/ (not refinery/rig/) so we don't