Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
This repository was archived by the owner on Oct 9, 2026. It is now read-only.

Clean up stale Codex Lab worktrees and planning artifacts after sync classification #233

Closed

Description

@shiny-code-bot

Finish Line

Codex Lab local state is clean enough for the upstream sync: stale detached auto-review diagnostics, obsolete worktrees/branches, scratch artifacts, and local handoff reliance are inventoried and either removed safely or explicitly preserved with a durable GitHub issue reference.

Current Status

July 1, 2026 cleanup pass after PRs #234, #235, and #236.

Captured state before cleanup:

  • Open PRs: none.
  • Main shared checkout: clean but behind origin/main by 7 commits; not fast-forwarded here because another write-capable Every Code session owns that checkout.
  • Worktrees before cleanup included main, three older .code/working worktrees, and three task worktrees from this sync/review workstream.

Cleaned safely in this pass:

  • Removed merged task worktrees:
    • /Users/cbusillo/.code/worktrees/codex-lab/review-primitives
    • /Users/cbusillo/.code/worktrees/codex-lab/review-scope-preflight
    • /Users/cbusillo/.code/worktrees/codex-lab/upstream-substrate-sync
  • Pruned deleted remote branches and deleted matching local branches:
    • rework/upstream-review-primitives
    • rework/review-scope-preflight
    • chore/upstream-substrate-sync

Preserved intentionally; do not delete without follow-up classification/user confidence:

  • /Users/cbusillo/.code/working/codex-lab/branches/auto-review on fix/login-auth-plumbing at af6f400905
  • /Users/cbusillo/.code/working/codex-lab/branches/auto-review-126bc649 detached at 126bc649f0
  • /Users/cbusillo/.code/working/codex-lab/branches/fix-pr96-agent-session-contract on fix/pr96-agent-session-contract at 00a136517c

Current worktrees after cleanup:

  • /Users/cbusillo/Developer/codex-lab on main at a21dfb3a3d (clean, behind origin/main)
  • three preserved older worktrees listed above.

Related durable state:

Next #233 action:

  • Classify the three preserved older worktrees/branches against their linked PRs/issues, then remove only those proven stale or already merged. Fast-forward the shared main checkout only from a session that owns that checkout or after confirming the other write-capable session is done.

Acceptance Criteria

Cleanup Policy

  • Inventory first.
  • Prefer preserving with an issue reference over deleting when ownership is unclear.
  • Do not merge or cherry-pick from stale worktrees during cleanup.
  • Do not remove active task branches until their PR/issue state is known.
  • Treat repo cleanup as a reviewable step, not as background tidying.

Relationships

Activity

  1. added
    plan:donePlan completed or superseded
    and removed
    plan:activePlan is actionable now
    on Jul 1, 2026
  2. shiny-code-bot commented on Jul 1, 2026

    @shiny-code-bot
    CollaboratorAuthor

    Completed cleanup pass after #232 classification.

    Evidence:

    • Removed stale merged/snapshot worktrees: /Users/cbusillo/.code/working/codex-lab/branches/fix-pr96-agent-session-contract, /Users/cbusillo/.code/working/codex-lab/branches/auto-review, and /Users/cbusillo/.code/working/codex-lab/branches/auto-review-126bc649.
    • Deleted stale local branches: fix/pr96-agent-session-contract and fix/login-auth-plumbing.
    • git worktree list --porcelain now shows only the shared checkout and the isolated work/main-sync recovery worktree.
    • git branch --list fix/pr96-agent-session-contract fix/login-auth-plumbing is empty.
    • The active isolated worktree is clean on work/main-sync...origin/main.

    The remaining durable work is back on #231/#230 under parent #229.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    planDurable planning issueplan:donePlan completed or superseded

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions