refactor(webhook): relocate event handlers to domain/workflow (NF-8) #444
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!444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/329"
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?
Summary
NF-8: legacy dispatch removal. Event handlers and post-CI helpers leave the HTTP layer and move into
domain/workflow/, so the flow runner is the only consumer.apps/server/src/http/webhook-handlers.ts→apps/server/src/domain/workflow/event-handlers.tsapps/server/src/http/webhook-ci.ts→apps/server/src/domain/workflow/post-ci.tsevent-handlers.test.ts,post-ci.test.ts,post-merge.test.ts,issue-unassign.test.ts)http/webhook.tskeeps only HMAC verification, payload normalisation, and the call intodispatchToFlows(). Default-graph JSON files remain the single source of truth for event → side-effect mapping.The flow-runner injections in
flow-dispatch.ts, the operator/redispatchroute inmain.ts, and thehandleIssueUnassignedimport inwebhook.tsall point at the new domain locations.docs/modules.md+docs/breakdown.mdcross-references updated; user-visible "not wired" error messages inagent-nodes.tsrefreshed.Closes #329
Test plan
bun x turbo run typecheck— 4/4 packages cleanbun x @biomejs/biome@^2 check .— clean (zero errors)bun x turbo run test— 2026 pass, 0 fail across 86 files🤖 Generated with Claude Code
ab26e2c9630ea0c5e085Clean relocation — imports, tests, and docs all land in the right places; 2026 tests pass with zero drift. The three handlers kept imperative in
webhook.ts(handleIssueUnassigned,handlePrDependencyMarkers,handleStackedRebaseCascade) are all documented with explicit rationale, not oversights.0ea0c5e085a3c96b2360a3c96b2360af1d13f81f