feat(flows): NF-6 multi-assignee fan-out for issue.assigned #378
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!378
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/flows-multi-assignee-fanout"
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?
Phase 1B — closes one of the two remaining cutover blockers for
suppress_legacy: ["issue.assigned"]. The other (address-review pivot) is the next PR.Why
Legacy
webhook.ts:184iteratespayload.issue.assigneesand dispatches once per assignee. The trigger normaliser (webhook-normalize.ts:194) surfaces only the trailing assignee (assigneeLogin: assignees[length-1]) — so the flow path silently lost every dispatch except the trailing login on multi-assign tickets. Cutover would have regressed multi-assignee behaviour.What this PR does
New exported helper in
flow-dispatch.ts:issue.assignedwithissue.assignees.length > 1→ one trigger per assignee, each withtrigger.assigneeswapped (issue snapshot shared, since it carries the full assignees list verbatim).issue.assignedwith single or empty assignees → original trigger passes through unchanged.dispatchToFlowsouter loop now iteratesexpandTriggers(trigger)so each fan-out trigger gets the full per-flow matching + execute + persist cycle. Each fan-out target writes its ownflow_runsrow with the correct per-assigneeevent_payloadfor the divergence join.Symmetrical pattern lives behind the same helper for the next multi-target trigger we model (
pull_request.review_requestedcarries N reviewers; extend the switch when its flow lands).Tests
expandTriggers: non-assignment passthrough, single-assignee passthrough, N-fan-out (3 assignees → 3 triggers, correct per-triggerassignee), empty-array defensive.dispatchToFlows: 3-assignee event writes 3flow_runsrows with sorted assignees[boss, designer, dev]in serialized payloads; single-assignee still writes exactly 1.Cutover progress
changes_requested→address-reviewpivotAfter Phase 1C,
suppress_legacy: ["issue.assigned"]is finally safe to set after a soak window of zero divergence onGET /flows/divergence/summary.🤖 Generated with Claude Code