chore(b-0506): file stale-worktree prune cadence row + 1817Z tick shard#3156
Merged
AceHack merged 2 commits intoMay 14, 2026
Merged
Conversation
…P3 friction-reducer) Otto-CLI 2026-05-14T18:13Z empirically observed 23 stale /private/tmp/zeta-* worktree entries left over from yesterday's session crash. The accumulation creates a recurring lockout pattern: 'git checkout <branch>' fails with "already used by worktree at <path>" even when <path> no longer exists on disk. Manual cleanup at 18:17Z: 'git worktree prune --expire=now -v' cleared all 23 entries. This row proposes mechanizing the prune via a small TypeScript audit tool that: 1. Enumerates worktrees + checks directory existence 2. Reports stale entries 3. With --prune flag, runs git worktree prune --expire=now Wire-up candidates: per-tick in autonomous-loop, or daily GitHub Actions cron. Filed as P3 backlog row (not implemented this tick) because the manual command works and the per-tick value of a new file + PR + CI cycle is less than the row capture. Composes with B-0400 (bus protocol), B-0444 (claim worktree field), claim-acquire-before-worktree-work rule, encoding-rules-without-mechanizing rule. Co-Authored-By: Claude <noreply@anthropic.com>
…anization row filed Pruned 23 stale /private/tmp/zeta-* worktree admin entries via 'git worktree prune --expire=now -v'. The accumulation creates a recurring "branch already used by worktree at <path>" lockout pattern that hit on prior tick (PR #3153 thread fix). Filed B-0506 (P3 friction-reducer) to mechanize the prune via a small TypeScript audit tool + per-tick or daily cadence wire-up. Side observation captured in shard: long-standing prior-session stash auto-popped during 'git stash push <untracked>' workflow, introducing conflict markers in tools/bus/claim.{ts,test.ts}. Reset both to origin/main; stash content discarded (alternative SHA-256 lock-path variant; if needed, derivable via decision archaeology). Composes with: claim-acquire-before-worktree-work rule, encoding-rules-without- mechanizing rule, B-0400, B-0444. Co-Authored-By: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds a new factory-hygiene backlog row (B-0506) and a tick shard documenting the empirical stale-worktree cleanup that motivated it, to reduce recurring “branch already used by worktree” lockouts after session crashes.
Changes:
- Added tick shard for 2026-05-14T18:17Z documenting pruning 23 stale worktree admin entries and the motivating incident.
- Added P3 backlog row B-0506 proposing mechanization (TS audit tool + cadence) for
git worktree prune --expire=now.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/hygiene-history/ticks/2026/05/14/1817Z.md | New tick shard capturing the stale-worktree cleanup and related operational observations. |
| docs/backlog/P3/B-0506-stale-worktree-prune-cadence-mechanization-2026-05-14.md | New P3 backlog row proposing a mechanized stale-worktree prune cadence/tooling. |
4 tasks
AceHack
added a commit
that referenced
this pull request
May 14, 2026
…3166) Both prior PRs auto-merged before Copilot threads could be addressed (advisory, not required_conversation_resolution). Fixing the 4 findings on main: PR #3156 (B-0506 row): - Frontmatter type: feature → type: chore (matches "chore(backlog)" commit prefix and avoids the friction-reducer-vs-feature semantic mismatch Copilot flagged) - Composes-with: bare filenames → full .claude/rules/ paths (unambiguous nav) PR #3161 (1822Z shard): - "~17/47" → "8/47 (~17%)" — internal consistency with lines 41 + 62 (8 rules audited) - "per per-tick" → "per-tick" (grammar nit) All 4 threads will be resolved via GraphQL resolveReviewThread mutation after this lands. Co-authored-by: Claude <noreply@anthropic.com>
AceHack
added a commit
that referenced
this pull request
May 14, 2026
… MD032 lint) Three CI failures + 1 review thread on PR #3165 — all addressed in one commit: 1. CI 'check docs/BACKLOG.md generated-index drift' — regenerated via BACKLOG_WRITE_FORCE=1 bun tools/backlog/generate-index.ts. Added 7 missing entries: B-0460, B-0500-B-0506, B-0514. 2. CI 'lint (markdownlint)' MD032/blanks-around-lists at 1825Z.md:49 — added blank line before the "Two MORE memory files also cite the missing file:" list. 3. Codex P2 thread: shard says "6 open PRs" but table listed 7 — removed #3156 from the table (it had merged earlier this session, not part of the refresh count) + added a parenthetical note about its lineage for #3161. Co-Authored-By: Claude <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two-commit shipment for tick 2026-05-14T18:17Z:
Why now
Prior tick (PR #3154, 1813Z shard) flagged the recurring "branch already used by worktree at " lockout pattern when investigating PR #3153's Codex thread. The pattern was empirically caused by 23 stale `/private/tmp/zeta-*` worktree admin entries from yesterday's session crash — all with non-existent on-disk directories.
`git worktree prune --expire=now -v` cleared all 23 in one shot at 18:17Z (worktree count 163 → 140). Manual command works; mechanization captured as P3 backlog row.
ID allocation discipline
Per PR #3153's newly-merged otto-channels reference card ID-allocation discipline (both on-disk + in-flight check):
```
$ find docs/backlog -name "B-*.md" -type f | grep -oE "B-[0-9]+" | sort -u -t- -k2 -n | tail -3
B-0503
B-0504
B-0505
$ gh pr list --state open --search "B-0506 OR B-0507 OR B-0508" --json number,title
(empty)
```
B-0506 safe — no on-disk collision, no in-flight contention.
Side observation: stash-pop hazard
The shard captures a substrate-honest observation: a long-standing prior-session stash (`stash@{0}: WIP on feat/b-0400-slice3-claim-coordinator`) auto-popped during a `git stash push ` workflow and introduced conflict markers in unrelated files (`tools/bus/claim.{ts,test.ts}`). Both files were reset to `origin/main` state; stash content discarded (alternative SHA-256 lock-path variant; current encodeURIComponent approach is live and tested).
Test plan
🤖 Generated with Claude Code