Skip to content

Preserve blocked PR lanes during doctor cleanup - #746

Merged
NagyVikt merged 2 commits into
mainfrom
agent/codex/preserve-pr-and-worktree-on-dirty-merge-2026-08-31-12-22
Aug 31, 2026
Merged

Preserve blocked PR lanes during doctor cleanup#746
NagyVikt merged 2 commits into
mainfrom
agent/codex/preserve-pr-and-worktree-on-dirty-merge-2026-08-31-12-22

Conversation

@NagyVikt

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve blocked PR lanes during doctor cleanup

Test plan

  • verified locally

@NagyVikt NagyVikt left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ GitGuardex code-assist

2 finding(s) — 🟠 1 high · 🟡 1 medium

Merge gate: blocked — 1 blocking finding(s) (blocks on high/critical).

Severity Location Finding
🟠 high templates/scripts/agent-worktree-prune.sh:590 Open PR protection excludes work/* lanes. The script processes and deletes both agent/* and work/* branches, but both new
🟡 medium templates/scripts/agent-worktree-prune.sh:230 The implementation makes a separate GitHub API request for every candidate and can query the same branch again during branch deletion.

Provider codex · commit 74a1ec7

Comment thread templates/scripts/agent-worktree-prune.sh Outdated
Comment thread templates/scripts/agent-worktree-prune.sh

@NagyVikt NagyVikt left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ GitGuardex code-assist

1 finding(s) — 🟡 1 medium

Merge gate: pass — no blocking findings (blocks on high/critical).

Severity Location Finding
🟡 medium templates/scripts/agent-worktree-prune.sh:587 The open-PR check performs a GitHub API request for every agent/work worktree before determining whether it is eligible for pruning.

Provider codex · commit c4c4760

Comment thread templates/scripts/agent-worktree-prune.sh
@NagyVikt
NagyVikt marked this pull request as ready for review August 31, 2026 10:46
@NagyVikt
NagyVikt marked this pull request as draft August 31, 2026 10:50

@NagyVikt NagyVikt left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ GitGuardex code-assist

No findings. Nothing worth an inline comment in this diff.


Provider codex · commit c4c4760

@NagyVikt
NagyVikt marked this pull request as ready for review August 31, 2026 10:51
NagyVikt added 2 commits August 31, 2026 12:57
Constraint: unattended doctor cleanup must not delete clean unmerged lanes or branches with open PRs.

Tested: doctor/worktree 44 tests; lint; package check; full suite 1047 pass, 1 unrelated flaky failure reran green.
- HIGH templates/scripts/agent-worktree-prune.sh:590 Open PR protection excludes `work/*` lanes. The script processes and deletes both `agent/*` and `work/*` branches, but both new preservation checks only cover `agent/*`, so an eligible `work/*` branch with an open PR can still have its worktree and branch deleted; update both checks and add coverage for a `work/*` PR lane.
@NagyVikt
NagyVikt force-pushed the agent/codex/preserve-pr-and-worktree-on-dirty-merge-2026-08-31-12-22 branch from c4c4760 to 4b2ddec Compare August 31, 2026 11:02
@NagyVikt
NagyVikt merged commit 3da7b8e into main Aug 31, 2026
2 checks passed
@NagyVikt
NagyVikt deleted the agent/codex/preserve-pr-and-worktree-on-dirty-merge-2026-08-31-12-22 branch August 31, 2026 11:08
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