feat(flows): NF-6 Phase 4F — issue-closed-deps baked-in flow #385
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!385
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/flows-issue-closed-deps"
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
Ports
webhook-handlers.ts::handleIssueClosed(lines 601-630) into a baked-in node-flow graph. Shipsissue-closed-depsas the seventh seeded flow on theissue.closedtrigger.One monolithic node
forge.handle_issue_closed_cleanupwraps the legacy fire-and-forget which launches:cleanupIssue(repo, issueNumber, agents)— releases worktrees + drops sessions across every agent.propagateDependencyClosure({ repo, closedIssueNumber, … })— re-dispatches blocked issues whose blocker just closed (#196 / #200), auto-assigning unassigned issues with an audit comment.Monolithic because the legacy code is also monolithic — both side effects fire unconditionally on every
issue.closedwith no flow-author-meaningful boundary between them. Errors INSIDE the wrapped helpers are caught + logged by them; the wrapper does NOT try/catch around the synchronous launch step so an upstream wiring bug surfaces as a flowerrorrather than soft-failing.Cutover
node_flows.suppress_legacy: ["issue.closed"]skips the legacy switch arm atwebhook.ts:256-258once the flow soaks clean.Test plan
mode: "live"against realissue.closed, confirm parity viaGET /flows/divergence/summarysuppress_legacy: ["issue.closed"]after clean soakStacking note
This branch is off
main(currently at PR #383's merge commit). PR #384 (Phase 4E) is also open against main. Both touchagent-nodes.tsandflow-dispatch.ts— expect merge-order conflicts onAGENT_NODE_COUNT+ the registration list. The conflicts are mechanical (additive lines, no shared logic).🤖 Generated with Claude Code
Ports `webhook-handlers.ts::handleIssueClosed` (lines 601-630) into a baked-in node-flow graph. Ships `issue-closed-deps` as the sixth seeded flow on the `issue.closed` trigger: src → forge.handle_issue_closed_cleanup One monolithic node `forge.handle_issue_closed_cleanup` wraps the legacy fire-and-forget which launches two side effects: 1. `cleanupIssue(repo, issueNumber, agents)` — releases worktrees + drops sessions across every agent. 2. `propagateDependencyClosure({ repo, closedIssueNumber, … })` — re-dispatches blocked issues whose blocker just closed (#196 / #200), auto-assigning unassigned issues with an audit comment. Monolithic because the legacy code is also monolithic — both side effects fire unconditionally on every `issue.closed` with no flow-author-meaningful boundary between them. Errors INSIDE the wrapped helpers are caught + logged by them; the wrapper does NOT try/catch around the synchronous launch step so an upstream wiring bug surfaces as a flow `error` rather than soft-failing. Cutover gate: `node_flows.suppress_legacy: ["issue.closed"]` skips the legacy switch arm at `webhook.ts:256-258` once the flow soaks clean on `GET /flows/divergence/summary`. Tests: 10 e2e tests covering happy path, throw → error surface, not-wired error. AGENT_NODE_COUNT bumped from 11 to 12. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>