Skip to content

Git hygiene reconciliation: push finished work, PR orphaned branches, classify dirty trees — and make it a standing sweep #1371

Closed

Description

@dezren39

Problem (audit 2026-10-27, 188 working trees / 26 repos)

The fleet's publish step evaporates the same way its claims used to: work finishes in a worktree and the push/PR step never happens.

  • 62 commits on no origin branch, across 37 trees — almost all finished queue/sweep work (worst: wt-1058, 10 commits). Includes task 1149's completed lab-ops-hub: judge container crawl hosts on the full UTS-46 mapped form (#516, #526) #530 branch commit.
  • 13 trees with uncommitted work (139 entries) — worst: the home repo (~): 98 dirty files and the fleet's own Supabase migration commits 0009–0012 unpushed.
  • 143 GitHub branches ahead of main with no open PR (code 66, opencode 44, openchamber 19, nix 14) — a mix of Jules debris, bot branches, and real feature work (opencode session-messaging +44, github-tools +33).
  • 289 fully-merged branches still on the remotes as cleanup candidates.
  • Hazard: task 1157's cursor-quota work sits dirty in TWO worktrees with divergent heads (~/git/devtoday-openchamber-wt-1157, ~/work/oc-wt-1157).
  • Primary clones are healthy (code/openchamber/nix clean+pushed; opencode 2 behind). One fleet submodule fetch timed out during the audit — one tree's status unverified.

This effort

  1. Push every already-committed local-only branch (no force-push; rejections recorded, not fought).
  2. Open PRs for finished queue-task branches whose work is complete and whose issue is still open (body notes the reconciliation origin); skip branches whose issue is closed or whose PR already merged.
  3. Classify — do not commit — every dirty tree: in-flight lane work vs abandoned vs the divergent 1157 pair (flagged for a decision, untouched).
  4. Classify the 143 stray GitHub branches (fleet work / Drew's features / bot debris) on this issue; no mass PRs, no deletions in this pass.
  5. Design the standing version: a git-hygiene sweep job (daily) that reconciles dirty/unpushed trees, pushes finished queue branches, opens their PRs, and flags divergent duplicates — so this does not decay again. File its build as a sub-issue when designed.

Acceptance

  • Zero local-only commits remain outside an explicit, recorded exception list.
  • Every finished queue branch has a PR or a recorded reason it should not.
  • The home repo's migration commits are pushed.
  • Dirty-tree + stray-branch classifications recorded here; the 1157 pair has a named resolution path.
  • Standing hygiene sweep designed (sub-issue filed).

Filed by Muse (operator) 2026-10-27 at Drew's direction. Parent: fleet reliability epic #1233. Related: #1130, #1131.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    priority/highImportant and time-sensitive
    queue/queuedHas a queued task in the Supabase agent queue
    area/infraInfrastructure, deployment, and operations
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Standing job built (Drew, 2026-10-27): git-hygiene-sweep, every 4h — instruction at hidden_files/git-hygiene-sweep-instruction.md in the fleet goal workspace. Two duties: (A) publish reconciliation — push committed fleet branches (queue//sweep//creator/ + home-repo mains), PR finished queue branches whose issue is open (≤10/run), classify dirty trees without ever committing them, flag divergent duplicates; (B) idle build-artifact cleanup — target/build dirs in worktrees idle ≥4h (no mtimes, no lane lock, no live build process), realpath-verified inside their tree, moved to recoverable trash (never rm -rf, never wildcards, symlink escapes skipped+reported), ≤20 dirs/run, primary clones report-only. The one-time reconciliation of the audit backlog is running now as the first pass under this issue.

  4. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Reconciliation — Phase 1 complete: pushes (resumed pass, 2026-10-27)

    A previous worker died mid-job; this pass resumed from verified state. Method note: the audit's "local-only" metric compared against stale remote-tracking refs — verified against live ls-remote/GitHub API, most branches were already on origin, and many "missing" branches turned out to be post-merge leftovers (branch deleted upstream when its PR merged). Pushing those would resurrect deleted branches, so they were verified and left alone. The standing git-hygiene-sweep job's first run overlapped this pass; its pushes are included below.

    Pushed / verified on origin:

    • Standing sweep run: 21 branches pushed, 5 found already-on-origin (its log; includes code queue/1121, 1131, 1132, 1143, 1144, 1148, 1150, 1151, 1175, 1180, sweep/760, 816, 817, creator/756 and opencode queue/1149's branch-mates).
    • This pass pushed: openchamber debug/fod-ci-capture (5 commits, no PR existed), openchamber fix/fod-node-modules-determinism (PR wave-2 workflow: PR #486 templates and PR #490 tool disagree on the generated-view contract — a template-built design.md can never pass check (run-table vs run-status) #491 was closed unmerged).
    • Verified already-on-origin at local head: all code queue/* branches, nix creator/584-trailing-dot-host, nix mcpx-buildvcs-off, nix-cache main, fleet code-writers feat/usage-snapshot-writers, opencode queue/1149-530-governance-expansion, queue/1334-561-identifier-prefix, sweep/546-env-file-chain, and the bulk of opencode sweep/creator branches (64 opencode local branches match origin exactly).

    Post-merge leftovers — deliberately NOT pushed (remote branch deleted at merge; local head equals the merged PR head or is patch-equivalent in main):

    • code (14): creator/184 (PR 424), creator/745 (746), creator/749 (750), creator/815 (820), creator/846 (848), dedup/361 (362), fix-world-surface-validation-164362022185443212 (PR 759, head-identical), fixup/759-world-width (759), mcpx-portable-desktop-commander (863), sweep/368 (369), sweep/818 (860), sweep/877 (891), sweep/880-881-882 (888), sweep/908 (919).
    • openchamber (4): creator/433 (PR 434), creator/446 (447), sweep/471 (472), sweep/481 (520).
    • opencode (38): the creator/-roadmap-done series and sweep/ branches whose PRs are MERGED (incl. queue/1177-541-redact-body — PR 572 merged, head identical; creator/138's extra commits are patch-equivalent in main via PR 139).

    Exceptions (recorded, not fought):

    • opencode pre-push hook blocks all remaining opencode pushes. The repo's husky pre-push runs check/typecheck over the pushing worktree and it fails in every worktree tried (main clone, wt-1128, wt-535/538/540 via the sweep). Verbatim: error: script "typecheck" exited with code 1 · error: script "check" exited with code 1 · husky - pre-push script failed (code 1). Blocked by this: queue/1128-526-quota-reset-decimal-compound (genuinely unpublished finished work for OPEN issue opencode#526, no PR — highest-value exception), creator/235-roadmap-done-229-232 (docs commit, no PR), ci-baseline-check (PR 469 closed unmerged).
    • Diverged, no force-push attempted: code bolt-cache-prosemirror-coords-at-pos-5260428214093938082 (Jules branch; origin moved on), opencode creator/120-wrangler-state, creator/141-service-turbo-tests, creator/153-lint-rule-tests.

    Home repo migrations (0009–0012) and hatch-personal were already pushed before this pass (verified by parent) — not redone.

  5. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Reconciliation — Phase 2 complete: PRs for finished queue branches

    Opened (1):

    Skipped — PR already exists (the common case; the work was never as orphaned as stale refs suggested):

    • code queue/1121, 1131, 1132, 1143, 1144, 1148, 1150, 1151, 1175, 1180 — PRs MERGED, issues CLOSED.
    • code sweep/368, 760, 814, 816, 817, 819, 821, 831, 847, 872-873, 877, 880-881-882, 908 — PRs MERGED, issues CLOSED. sweep/818: issue still OPEN but PR 860 MERGED — no second PR.
    • code creator/745, 756, 815, 846 — PRs MERGED. creator/749: issue OPEN, PR 750 MERGED — no second PR.
    • opencode queue/1149 (PR 569 OPEN), queue/1334 (PR 571 OPEN), queue/1177 (PR 572 MERGED while this pass ran), sweep/546 (PR 552 OPEN), and 22 further opencode sweep branches — all have MERGED PRs (sweep/193, sweep/239: issues OPEN, PRs MERGED — no second PR).
    • openchamber sweep/471, sweep/481, creator/433, creator/446; nix creator/584 — issues CLOSED, PRs MERGED.

    Could not PR (1): opencode queue/1128-526-quota-reset-decimal-compound — finished work for OPEN opencode#526, but the branch cannot be pushed (pre-push hook failure, Phase 1 exceptions), so no PR can be opened from it yet.

    Cap of 25 PRs not approached (1 opened). No overflow.

  6. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Reconciliation — Phase 3 complete: classifications (nothing touched)

    Dirty trees (fresh enumeration; audit found 13 trees / 139 entries)

    • /home/hatch [main] — 98 dirty — stale/operator: accumulated tooling + docs edits in the home repo working tree. Not lane work; needs an operator commit pass. Untouched.
    • ~/git/wt-quota-visibility [feat/quota-current-visibility] — 6 dirty — finished-uncommitted: the quota-visibility feature (aggregator config/model/render/sources + test), complete-looking but never committed.
    • ~/git/fleet [main] — 9 dirty — stale: submodule pointer drift + untracked submodule dirs in the superproject.
    • ~/git/fleet/wt-1160-500 [queue/1160-500-ipv6-host-parsing] — 2 dirty — finished-uncommitted queue work (request-security.js + test).
    • ~/git/wt-1368 [creator-b/1368-collab-reconnect-cap] — 2 dirty — in-flight (today's task; collab.ts + new collab.test.ts).
    • ~/git/devtoday-code [main] — 1 dirty — in-flight: collab.ts edit on the primary clone, pairs with wt-1368's work.
    • ~/git/wt-cold-store-step-isolation — 1 dirty — in-flight (export-turso.sh).
    • ~/git/wt-1116 [queue/1116-968-nested-marks-triage] — 1 dirty — finished-uncommitted (markdown.rs from a completed triage task).
    • ~/git/wt-aa-explorer [pm/aa-explorer] — 1 dirty — generated churn (fleet-feed.json).
    • ~/git/pm-feed [main] — 1 dirty — generated churn (fleet-feed.json).
    • ~/git/nix-cache [main] — 2 dirty — stale (bench flake.locks).
    • ~/hatch-personal [main] — 0 dirty — clean (was already pushed; verified).
    • State moved since the audit: devtoday-code-wt-1305 (10 dirty) and devtoday-code-wt-1308 (4 dirty) are now clean — their work was committed in the interim.

    ⚠ Task 1157 pair — divergent copies, decision needed, contents untouched

    • ~/git/devtoday-openchamber-wt-1157 [queue/1157-495-cursor-windowseconds] — head 93f7a18e6 (2026-10-27 03:46, "fix(quota): Cursor windowSeconds is the billing-cycle duration, not time until reset (fix(bin): validate ANTIGRAVITY_LS_ADDRESS port strictly (#494) #495)"), tree clean. This is the live copy — it backs open PR openchamber#537.
    • ~/work/oc-wt-1157 [same branch name] — head 501f171 (2026-10-27 01:02, an older main merge), with uncommitted modifications to the same two files (packages/web/server/lib/quota/providers/cursor.js, cursor.test.js).
    • Resolution path: the ~/git copy is ahead, clean, and PR-backed; the ~/work copy's uncommitted edits need a human/lane decision (diff against PR docs(repo): rewrite design-orchestrate, feature-plan and implementation-orchestrate skills #537's versions, keep or discard) — the reconciliation did not touch either copy.

    GitHub branches ahead of main with no open PR (fresh count: 168)

    Branch totals grew today (code 129, opencode 102, openchamber 159, nix 112) partly because Phases 1 pushed ~25 branches. Caveat: GitHub's ahead-by counts commits unreachable from main, so squash/rebase-merged fleet branches register as "ahead" even though their content is in main — the fleet bucket below is mostly that residue, not lost work.

    • code: 90 — bot debris 39 (bolt-/palette- Jules branches), fleet residue 27, Drew/other 24. Notable real: full-platform +12, feat/openclaw-summarize +4.
    • opencode: 44 — fleet residue 35, Drew/other 8, bot 1. Notable real: session-messaging +8 (audit said +44; main has since absorbed most of it), tui-nested-asks +13, github-tools now +0 (fully landed), fix/plugin-host-bun-resolve-message now +1 (was +37).
    • openchamber: 22 — Drew/other 15, fleet residue 7. Notable: nested-asks +7, feat/session-messaging +6, debug/fod-ci-capture +5 (pushed in Phase 1; no PR — fod investigation branch). One compare error: pr-evidence/session-messaging shares no ancestor with main (orphan evidence branch).
    • nix: 12 — bot debris 7 (bolt-/jules-), Drew/other 3, fleet residue 2.

    No mass PRs opened and no branches deleted, per the effort's scope.

  7. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Reconciliation — final totals (2026-10-27)

    Phase 1 (pushes): 23 branches pushed across the two passes (21 by the standing sweep's first run, 2 by this pass: openchamber debug/fod-ci-capture, fix/fod-node-modules-determinism); dozens more verified already-on-origin against live refs. All remaining local-only commits fall in three explicitly recorded categories (Phase 1 comment): post-merge leftovers whose content is in main (59 branches, named), diverged branches left unforced (4, named), and opencode branches blocked by the repo's failing husky pre-push check (3, named, verbatim error recorded) — of those, only queue/1128-526… carries genuinely unpublished feature work (opencode#526).
    Phase 2 (PRs): 1 opened — code#1387 for queue/1308-539 (Refs #539). Every other finished queue branch already had a PR (mostly MERGED) or a recorded skip reason; queue/1128 could not be PR'd because its push is hook-blocked.
    Phase 3 (classification): 12 dirty trees classified line-by-line; the task-1157 divergent pair flagged with a resolution path (the clean, PR-#537-backed ~/git copy is live; the ~/work copy's uncommitted cursor edits need a keep/discard decision). 168 GitHub branches ahead-with-no-open-PR classified by repo and kind, with the squash-merge measurement caveat recorded.
    Acceptance: boxes 1–4 checked. Box 5 (standing sweep sub-issue) left unchecked: the git-hygiene-sweep job itself is built and running (see the earlier comment on this issue; its runs overlapped and assisted this pass), but I found no sub-issue filed for it — filing/confirming that is the one remaining clerical step.

  8. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: done
    task: 1352 (repo-health-code-pilot, repo-worker-code, lane code-d)
    state: triaged — routing decided, closing #1371 on its merits
    verified (fresh, 2026-11-02): the one-time reconciliation this issue asked for was completed 2026-10-27 — Phase 1 pushes, Phase 2 PRs (PR #1387 MERGED 2026-10-27T19:49Z), Phase 3 classifications, final totals; acceptance boxes 1–4 checked on this issue. The standing mechanism exists and is live: cron git-hygiene-sweep enabled, every 4h, last run today 15:27 CST succeeded, next 19:05 CST; instruction at hidden_files/git-hygiene-sweep-instruction.md (fleet goal workspace).
    routing: the ONLY open acceptance item was box 5 (standing-sweep sub-issue) — now filed as #4604, the standing tracking issue for the sweep. Remaining classified items from Phase 3 (operator commit pass for /home/hatch dirt, the task-1157 divergent-pair decision, the husky-blocked opencode queue/1128 push for opencode#526) carry their resolution paths in the Phase 1/3 comments and belong to the standing sweep classification duty / their owners — no new queue packet is needed from this triage.
    next: ongoing hygiene = git-hygiene-sweep (tracking #4604). Closing #1371: work complete, standing owner named.

  9. added
    status/triagedTriaged and routed (see agent note)
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/infraInfrastructure, deployment, and operationseffort/lLarge: multi-day or open-ended; expect staged check-inskind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivestatus/triagedTriaged and routed (see agent note)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions