Repository navigation
feat(automation): add subtask, comment, notify and link nodes; list ops, dynamic values, new triggers - #713
Conversation
…ps, dynamic values, new triggers
There was a problem hiding this comment.
Important
create_task skips the assignment side effects of the normal task-create path, so assignees of an automation-created subtask are not notified and agent assignees are never started.
Reviewed changes
- New triggers —
field_changed(validated against the recorded task fields),comment_added,link_added,attachment_added, andchild_changed(fires on the parent for a created or status-changed subtask). - New actions —
create_task(templated, idempotent per parent + exact title, dynamic fields, optional link),link_task,add_comment, andnotifywith the newautomationnotification type,messagecolumn/migration, and bell rendering. update_taskextensions — listset/add/removemodes,clear, and run-timedynamicvalues, all materialized per run without mutating stored config.- Conditions and targets —
child_count, thesiblingstarget, relative date values (now,now+3d), and numeric-string comparisons. - Frontend — config-panel editors for every new node, operation dropdown per field, grouped palettes, and i18n keys across all locales.
- Tests — Go unit/e2e coverage for the engine, plus Playwright and vitest coverage for the builder.
Verification in this run: affected Go packages pass go test; apps/web passes tsc -b and the targeted vitest suites.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
…d user-set field tracking
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The follow-up commit 5167ecd2 closes out the four findings from the previous review; I re-checked each fix against the surrounding code and found no new issues.
create_taskassignment and autofill parity —applyCreateTasknow records the action-set fields viaRecordUserSetFieldsand publishes onePublishAssignmentChangedper resolved assignee withSystemActorUserID, matchingupdate_taskand the HTTP create path.add_commentfan-out — the comment is now stored and published through the newAddSystemCommentpath, so it lands ontask.comment.addedwith the automation origin preserved; realtime and plugins see it and the self-trigger guard still skips it.- Config panel
description— added toFIELD_UPDATE_ORDERso anupdate_tasknode round-trips its stored description, with a regression test. paca-automation.mdrecipe — the "close the parent when all subtasks are done" guidance now recommendschild_changed+childrenand spells out whystatus_changed+siblingsfails for single-child parents.
Verification in this run: affected Go packages pass go build/go test; gofmt and biome check are clean on the changed files.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Important
The new event-text notice is bypassable in two ways: padded placeholders like {{ event.title }} skip the check, and a long event value can push the trailing notice past sanitizeAgentMessage's 4000-char cap.
Reviewed changes
The third commit 396d03b follows the approved 5167ecd review. It reverts the accidental MCP formatter edits, tightens notify error handling, and adds a prompt-injection notice to trigger_ai_agent messages.
- MCP formatter revert — the accidental formatter changes in
apps/mcp/src/api/views-client.tsandapps/mcp/src/__tests__/tools/view-tools.test.tsare reverted, so the PR no longer carries unrelated MCP edits. - Notify error handling —
applyNotifynow collects per-recipient errors, continues notifying the remaining recipients, and returnserrors.Join;NotifyAutomationnow propagates a real member lookup error instead of swallowing it. - Agent message safety —
renderAgentMessageappends an untrusted-event notice totrigger_ai_agentmessages whose template uses{{event.*}}, but the check and placement leave gaps covered in the inline comment.
Verification in this run: go test ./internal/worker/... ./internal/service/notification/... ./internal/service/automation/... passes; gofmt -l is clean on the changed Go files. The MCP changes are formatter-only reverts, and the Playwright spec remains unrun.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
…r untrusted data in agent messages
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Commit ab96e739 closes out the remaining finding from the prior incremental review: the untrusted-event notice was bypassable through padded placeholders and truncatable by the prompt sanitizer, and both gaps are fixed.
- Placeholder-aware detection — added
vartemplate.HasEventVars, whose regex mirrors the renderer's optional padding, replacing the literal{{event.substring check. - Notice placement — the notice is now prepended, so
sanitizeAgentMessage's head-keeping 4000-rune cap cannot drop it on either the direct or task-bound agent path. - Regression test —
TestRenderAgentMessage_EventNoticecovers both{{event.title}}and{{ event.title }}, asserts the notice survives sanitizing a 5000-char event value, and checks non-event templates are untouched.
Verification in this run: go test ./internal/worker/... ./internal/pkg/vartemplate/... passes; gofmt -l is clean on the changed files.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Summary
Extends the automation engine so common "keep the hierarchy in sync" rules can be built without custom code: close a parent when all its subtasks are done, create subtasks named after the parent when it is created, comment/notify/link on events, and react to more kinds of change.
What's new
Actions
create_task: creates a subtask of the target with any task field, templated title/description/custom fields, dynamic values and an optional link to the parent. Idempotent per parent + title; the created task carriesorigin=automation, so it never re-firestask_created.update_task: tags and assignees can be replaced, added to or removed from (tags_mode/assignees_mode), fields can be cleared (clear), and values can be computed at run time (dynamic: copy from the triggering task, its parent, or today +/- N days).add_comment: posts an automation-authored comment.notify: in-app notification to assignees / reporter / the parent's assignees / named members. Adds anautomationnotification type and amessagecolumn (migration000081), shown in the notification bell.link_task: links the target to another task (blocks, is_blocked_by, relates_to, duplicates, is_duplicated_by). Existing links are a no-op.Triggers
field_changed(sprint, dates, title, points, reporter, type, parent, description, custom fields),comment_added,link_added,attachment_added, andchild_changed(runs on the parent when a subtask is created or enters a status).Conditions and targets
siblingstarget ("all other subtasks of my parent"), so "all siblings done, then close the parent" is one rule.child_countcondition field.now,now+3d,now-1d), so a rule can mean "overdue".story_pointscondition could never match).UI
MCP tool docs and the bundled
paca-automationskill are updated to match.Safety / behavior notes
add_comment+comment_addedandcreate_task+task_createddo not loop (covered by e2e).notifyis deduplicated per recipient.Serviceinterface), so existing mocks are unaffected.Test plan
automation_engine_new_nodes_test.go; the fullTestE2EAutomation*suite passesapps/e2e/tests/projects/automation-nodes.spec.tsis added but has not been run against the e2e stack yetNotes for reviewers
apps/mcp/src/api/views-client.tsandapps/mcp/src/__tests__/tools/view-tools.test.tscontain formatter-only changes unrelated to this feature (accidentalbiome --write). They can be reverted before merge.000081adds a column and a notification type; no data migration.