You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pm-git-sync stalled 2026-11-08→10: queue lanes worked directly in the primary clone and a stale worktree squatted the main branch #8170
pm-git-sync.service (user unit, 30s timer) failed every run from 2026-11-08 until fixed 2026-11-10 ~09:00 CST. The service itself was healthy and behaving exactly as designed — it refuses to pull unless ~/git/code is on a clean main. The clone was neither:
A queue lane worked directly in the primary clone. ~/git/code sat on branch queue/13790-5954-deploy-smoke-fixture (checked out 2026-11-08 16:43 CST, one commit 9d7f54f, also pushed to origin under the same branch name) with uncommitted WIP edits across 9 tracked files (claimant, fleet-paperwork, mcpx; all stamped 2026-11-09 21:31:21) plus untracked files (incl. a whole nested checkout base-agg/). Because the sync was stalled, merged config had to be written into the live OpenCode config by hand during the 2026-11-10 deploy (PRs routes: workhorse-weighted Luna #xhigh seat switches to Terra #low #8162/routes: workhorse-weighted Gemini 3.8 Flash seat drops #high to #medium #8164).
A stale lane worktree squatted main. ~/git/fleet/12652-main held the main branch checked out (same commit as ~/git/fleet/12652 and 12652-3939-quota-uninstrumented), so even after cleaning, git checkout main in the primary clone was refused. Its apparent dirt was stale-base drift (Nov 8 base), not unique work.
Fix applied (2026-11-10)
All dirt preserved first: ~/git/code-dirt-rescue-2026-11-10/ on the laptop (tracked patch, two copies of every untracked file, 12652-main full diff + status, README). The opencode.jsonc edit was already byte-identical to origin/main; the remaining edits are stale-base versions of files that moved substantially on main since — recoverable from the rescue dir if any lane still needs them.
Clone restored to clean main; stale worktree removed; sync restarted. Proof: one full cycle pulled 436 commits (1e46b89 → 68dda49), restarted pm-projector + pm-dispatch, exit 0; follow-up timer run: ok clean main, up to date. HEAD == origin/main == 68dda49; live config byte-identical to main.
Prevention gap (the ask)
Lane/worker setup must never check out a branch or edit files in the primary clone (~/git/code), and must not create worktrees that hold main. Options: lane launcher refuses to start when its working dir resolves to the primary clone; a periodic check that no registered worktree holds main; pm-git-sync could also page louder than a journal FAIL when stalled >1h. Acceptance: a lane attempting to work in ~/git/code is stopped or redirected to a worktree, and a main-holding worktree raises a visible alert within one sync cycle.
Task: Fresh evidence for the pm-git-sync stall, 2026-11-14T04:57Z: pm-git-sync.service is failing (timer-triggered, exit 1) and the primary clone ~/git/code cannot fast-forward. Current uncommitted inventory in the primary: lib/default.nix (MM), nixos/home/laptop-backups.nix (MM), nixos/home/laptop-state-backup.sh (AD), nixos/home/laptop-state-backup.test.sh (AD), pm-stack/aggregator/bun.lock (M). The dirt was left untouched (not this lane's work). Consequence this shift: the pm-aggregator unit still serves the pre-merge tree for PR feat(pm-aggregator): repo-file roadmap source alongside Grist (#1738) #9727 (pm dashboard /roadmap: integrate the repos' own roadmap files (ROADMAP.md, planning/roadmaps/*.md) alongside the Grist table #1738); the merged tree was verified live-source from its worktree instead, and the unit redeploys once the primary is clean and current.
Expectation: Whoever owns the laptop-backups work commits or clears it, then pm-git-sync resumes and the PM services redeploy.
Dirt cleared under Drew's order — full accounting (2026-11-14)
Drew's ruling (2026-11-14 02:52 CT, main chat): "commit or something" — the fleet was authorized to preserve the primary clone's foreign dirt and restore a clean main. This is the second occurrence of the #8170 pattern (first: 2026-11-08→10).
Preservation (before anything was touched)
Full patch (git status + staged diff + unstaged diff): ~/git/primary-dirt-2026-11-14.patch on the laptop — 175,224 bytes, sha256 1eb64b0e55295a65b051779dffb4c2a6b0a73160c2dc670930a5376015147746.
Untracked files copied to ~/git/primary-dirt-2026-11-14-untracked/ (4 files: pm-stack/aggregator/playwright.config.ts, test/browser/mobile-work-view.spec.ts, test/latest-comments-9781.test.ts, test/program-prime-5082.test.ts). Nothing was discarded silently; the whole pre-reset state is recoverable from the patch + copies.
What the dirt was (primary sat at 7535eba, 174 commits behind origin/main)
Nix wiring — staged only (lib/default.nix, nixos/home/laptop-backups.nix, + laptop-state-backup.sh/.test.sh added). The staged state contained unresolved merge-conflict markers from refs/tmp/pr7188 — a conflicted merge state staged into the primary's index. The two staged scripts are byte-identical to the copies that landed cleanly on origin/main; the conflicted wiring was superseded by that clean landing. The worktree had already reverted these files to HEAD content, so the net worktree state equalled HEAD — index noise only.
Committed separately: nothing. No coherent unlanded work existed in the dirt — every hunk was already on main, superseded by main, or conflict-marker garbage of work that landed cleanly. "Commit or something" resolved to the "or something": full preservation, then reset.
Restore + verification
Primary hard-reset to origin/main: HEAD == origin/main == 28955acdf867df227cc36df0af63897fc417f711; git status = 0 lines, working tree clean.
pm-git-sync verified healthy and self-running: the 02:54:21 CST cycle raced the reset and failed on the last untracked files; the 02:54:55 and 02:55:24 cycles both report pm-git-sync: ok clean main, up to date at 28955acd..., Result=success, timer firing on its ~30s cadence. The aggregator deploy path (clean main → subtree-change redeploy) is unblocked.
Closing note
Closing on the deploy-path criterion: the clone is clean, current, and syncing. Recorded for honesty: the prevention acceptance in this issue's body (a lane attempting to work in ~/git/code is stopped or redirected; a main-holding worktree raises a visible alert) is not implemented — this recurrence happened under the same conditions as the first. If that guard is still wanted, it deserves its own tracked issue rather than dying inside this close.
Activity
developing-today commentedon Nov 10, 2026
CODE-2413
dezren39 commentedon Nov 14, 2026
🤖 Agent note · state
dezren39 commentedon Nov 14, 2026
Dirt cleared under Drew's order — full accounting (2026-11-14)
Drew's ruling (2026-11-14 02:52 CT, main chat): "commit or something" — the fleet was authorized to preserve the primary clone's foreign dirt and restore a clean main. This is the second occurrence of the #8170 pattern (first: 2026-11-08→10).
Preservation (before anything was touched)
~/git/primary-dirt-2026-11-14.patchon the laptop — 175,224 bytes, sha2561eb64b0e55295a65b051779dffb4c2a6b0a73160c2dc670930a5376015147746.~/git/primary-dirt-2026-11-14-untracked/(4 files: pm-stack/aggregator/playwright.config.ts, test/browser/mobile-work-view.spec.ts, test/latest-comments-9781.test.ts, test/program-prime-5082.test.ts). Nothing was discarded silently; the whole pre-reset state is recoverable from the patch + copies.What the dirt was (primary sat at 7535eba, 174 commits behind origin/main)
Restore + verification
28955acdf867df227cc36df0af63897fc417f711;git status= 0 lines, working tree clean.pm-git-sync: ok clean main, up to date at 28955acd..., Result=success, timer firing on its ~30s cadence. The aggregator deploy path (clean main → subtree-change redeploy) is unblocked.Closing note
Closing on the deploy-path criterion: the clone is clean, current, and syncing. Recorded for honesty: the prevention acceptance in this issue's body (a lane attempting to work in ~/git/code is stopped or redirected; a main-holding worktree raises a visible alert) is not implemented — this recurrence happened under the same conditions as the first. If that guard is still wanted, it deserves its own tracked issue rather than dying inside this close.