Flows YAML — internal triggers (task.*, flow.*, pr.merged) #1065
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#1065
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?
User story
As a flow author, I want to react to
task.completed,task.failed,task.timed_out,pr.merged,flow.completed, andflow.failed, so that post-dispatch behaviour (dependency cascade, follow-up reviews, retries) lives in flows instead of hardcoded callbacks.Resolves audit finding §1.1.6 (no async hooks;
handleIssueClosedhardcoded; flow runner not the sole dispatcher).Acceptance criteria
Trigger emission
apps/server/src/background/worker.ts) firestask.completed/task.failed/task.timed_outafter each task lifecycle terminal state.flow.completed/flow.failedafter each run terminal state.pr.mergedafter Forgejo confirms merge (post-merge verification, distinct frompull_request.closed).TriggerEventshape matching the spec (parent ids, repo, issue/pr context).Trigger consumption
on: { task: [completed], pr: [merged], flow: [failed] }matches the new kinds.Fan-out limit
Migration of legacy callbacks
handleIssueClosed(currently invoked by injection bundle) is replaced by anissue.closedflow that calls apropagate_dependenciesop.apps/server/src/domain/flows/flow-dispatch.ts:184is removed.Tests
on: task.completedflow runs after a task finishes.Out of scope
propagate_dependenciesop itself (covered by #flows-7).References
docs/specs/flows-yaml.md§5.2, §12 Q5.