Skip to content

feat(cleanup): delete dangling branches + auto-close PRs on requirement completion#79

Merged
tzone85 merged 1 commit into
mainfrom
feat/dangling-branch-cleanup
Jun 23, 2026
Merged

feat(cleanup): delete dangling branches + auto-close PRs on requirement completion#79
tzone85 merged 1 commit into
mainfrom
feat/dangling-branch-cleanup

Conversation

@tzone85

@tzone85 tzone85 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Ports vortex-dispatch #85. On requirement completion, delete the local + remote branches of non-merged stories (deleting the remote branch auto-closes its open PR), leaving no dangling branches/PRs. Pure selector + best-effort executor; config cleanup.delete_dangling_branches (default true). Git-based — safe for NXD's offline-first core. 3 unit tests, full suite green.

🤖 Generated with Claude Code

…uirement completion

Ports the VXD cleanup step (vortex-dispatch #85). NXD cleaned merged branches
but left non-merged story branches — and their open PRs — dangling.

New cleanupDanglingBranches (monitor_cleanup.go) runs in the requirement-
completion path (dispatchNextWave, before REQ_COMPLETED): for every story that
did NOT merge, it deletes the local + remote branch. Deleting the remote branch
auto-closes its PR, so a completed requirement leaves no dangling branches/PRs.

- Pure selector danglingBranchesToClean(stories, baseBranch): skips merged +
  split, never deletes the base branch, dedups. Best-effort executor.
- Config cleanup.delete_dangling_branches (default true; opt-out per project).
- 3 unit tests; example YAML updated. Full suite green.

Git-based cleanup — applies cleanly to NXD's offline-first core (no cloud deps).
@tzone85 tzone85 merged commit a36da26 into main Jun 23, 2026
@tzone85 tzone85 deleted the feat/dangling-branch-cleanup branch June 23, 2026 12:12
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.

1 participant