Skip to content

fix(prompts): coordinate numbers across worktrees - #24

Merged
cruzanstx merged 1 commit into
mainfrom
fix/prompt-number-allocation
Sep 15, 2026
Merged

cruzanstx merged 1 commit into
mainfrom
fix/prompt-number-allocation

Conversation

@cruzanstx

Copy link
Copy Markdown
Owner

Summary

  • scan prompt numbers across the primary checkout and every linked git worktree
  • persist the highest allocated number in the shared git directory so removed worktrees cannot cause reuse
  • serialize automatic and explicit allocations with OS-backed file locking
  • preserve existing folder-scoped lookup behavior

Verification

  • python3 -m pytest -q — 668 passed, 1 skipped
  • focused prompt-manager suite — 11 passed
  • real two-process linked-worktree reproduction allocated 001 and 002 without collision
  • independent review findings for stale-lock stealing and explicit-number reuse were reproduced and fixed

Fixes #23

Scan linked worktrees and persist allocations in the shared Git directory under an OS-backed lock.\n\nFixes #23\n\nCo-Authored-By: Codex <noreply@openai.com>
@cruzanstx
cruzanstx merged commit c4b581d into main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prompt-manager next-number ignores sibling worktrees — duplicate prompt numbers after worktree sprints

1 participant