You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cron, webhook, and email triggers declared in a workflow's YAML were
parsed and validated but never written to workflow_triggers, because the
only function that populated that table (server.SyncTriggers) had no
callers. The cron scheduler, webhook handler, and email poller all read
from that table, so declared triggers never fired.
- workflow.Save now reconciles workflow_triggers in the same transaction
as the definition insert, so both `mantle apply` and GitOps sync
register a workflow's triggers atomically with its new version.
- workflow.Disable/Reenable toggle the triggers' enabled flag so a
pruned/disabled workflow stops firing (schedulers key off
workflow_triggers.enabled, not the definition's disabled_at) and a
re-enabled unchanged workflow gets its triggers back.
- The email poller periodically reconciles against the DB so email
triggers registered by a later apply (a separate process) or a GitOps
sync activate without a server restart. Cron and webhook triggers are
already read live per tick/request.
- Removed the dead server.SyncTriggers/TriggerInput; trigger-write logic
now lives in the workflow package (avoids an import cycle).
Adds integration tests covering registration, version replacement, the
no-trigger case, and the disable/reenable toggle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WnKgCRfMvFcZAkoVbr8k79
Register workflow triggers on apply. Cron, webhook, and email triggers declared in a workflow's YAML were parsed and validated but never written to `workflow_triggers`, so they never fired. `workflow.Save` now reconciles the table in the same transaction as the definition insert (covering both `mantle apply` and GitOps sync), pruned/disabled workflows have their triggers disabled so they stop firing, and the email poller periodically reloads so new email triggers activate without a server restart.
0 commit comments