anima-server: external_pr is bookkeeping, not a human decision #275
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
toasterson/Anima!275
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/external-pr-not-a-decision"
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?
Problem
The ProjectDetail right rail ("Needs Your Decision") and the dashboard "Pending Decisions" count were flooded — prod held 3,916 pending decision cards, ~100% noise:
external_pragent_diff_appliedexternal_prforgejo_prexternal_prsolstice_dispatchexternal_prsolstice_resultagent_diffOne WI ("OTel logs") alone had 195 identical cards — same branch, same PR, same SHA — inserted every ~15 min by the triage cron.
Root cause
ChangeKind::requires_review()listedExternalPr, so everyexternal_prrow (a triage-cron telemetry marker re-emitted once per tick per open PR) was bornpendingand surfaced as a perpetual decision card. Unlikeagent_diff, it got nosupersede_prior_pending, so the cards never drained — exactly the 2026-06-09 merge-loop trap therequires_reviewdoc comment warns about.Fix (three aligned spots — one definition of "what is a decision")
ChangeKind::requires_review()dropsExternalPr→ bornsupersede, never a card. + regression test locking the review set.'external_pr'from its hardcoded mirror.list_pending_for_projectswitches the loosekind <> 'wip_snapshot'to an explicit allowlist so a future bookkeeping kind can't leak the same way.Genuine human merge decisions remain
agent_diff/human_patch/companion_proposal. The PR marker is still recorded —find_pr_refreads it bykindregardless of decision — just no longer as a pending card.The 3,916 existing rows are drained separately by a one-off prod
UPDATE ... SET integration_decision='supersede'.🤖 Generated with Claude Code