B9 — Tail-PR rebase trigger (close F3 — last-PR cascade dead end) #425
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#425
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an orchestrator,
I want the last open PR to auto-rebase when its
merge_basefalls behindmain,so that the "approved + CI-green + waiting for rebase" terminal state self-clears without an operator nudge.
Today the cascade rebase is gated on
post-mergeevents. With one PR left open, no other merge happens → infinite wait. Hit twice on PR #420 last night (06:00 + 08:08).Acceptance criteria
Watchdog logic
mergeable === falseANDmerge_base !== main_tipAND CI aggregate issuccessAND there is no in-flight rebase task for that PR: fire the existing rebase-dispatch path.do-not-auto-rebaselabel (escape hatch).Logging + config
[tail-pr-watchdog] dispatching rebase for #N (merge base behind main). (Commit-count variantbehind by M commitsdeferred — requires an extra compare-refs API call; see PR #436.)config/agents.json→watchdogs.tail_pr_rebase: false(defaulttrue).Tests
Out of scope
[webhook] CI red on ... — dispatching fix-cipath.References
docs/specs/automation-hardening.md§4 B9.apps/server/src/http/webhook.ts(post-mergehandler).apps/server/src/domain/views/pipeline.tsfor the existing 60s interval.