Repository navigation
Description
No shipped automation with a schedule trigger has run since v0.5.17. The scheduler attaches
trigger and firedAt to the run input. All eight shipped packs declare
additionalProperties: false without those fields, so every occurrence is refused before a
run row exists.
Why
beginRunInTx validates the run input against the deployed version's inputs schema
(services/platform/backend/domains/automations/store.ts:1524). A trigger-started run does not
carry bare workflow input. It carries an envelope:
| Trigger | Input passed to beginRunInTx |
Source |
|---|---|---|
| schedule | { trigger: 'schedule', firedAt } |
triggers.ts:254 |
| event | { trigger: 'event', event, payload } |
triggers.ts:343 |
| webhook | { trigger: 'webhook', payload } |
triggers.ts:482 |
The validation is correct and documented: docs/en/develop/webhooks.md:45 says a declared input
schema must describe this wrapper. The packs are what is wrong. All eight declare
additionalProperties: false, and none declares trigger or firedAt.
The validation arrived in 35ea132 (#3305, 2026-09-10), which added it to harden the public API
door. Every internal trigger passes through the same function.
Impact
Releases v0.5.17 through v0.5.28 carry this, and so does current main.
The failure is silent. The trigger records start_refused, no run row is written, and the only
evidence is one log line per scan. On a self-hosted instance this stopped inbound email reaching
the shared Inbox for five days before anyone noticed. Outbound still worked, because sending is a
user action and a manual run passes {} (routes.ts:607).
Reproduce
Deploy any shipped pack that ships a schedule, then wait one tick:
[automations] trigger scan: 1 due schedule(s) were refused by their deployed version:
<org>/imap-smtp-sync-emails (Run input does not match the automation inputs schema:
"trigger" is not a field the inputs schema takes)
SELECT name, enabled, last_skip_reason FROM app.automation_triggers;
-- imap-smtp-sync-emails | t | start_refusedWhy CI is green
Both halves are tested. Neither test crosses the seam between them.
store.begin-run.test.tsvalidates a synthetic schema against anextrafield.triggers.scan.test.ts:241tests the scanner withbeginRunInTxmocked, and hand-writes the
refusal as'…inputs schema: "trigger" must be a number'. The mock encodes the defect as the
expected outcome.- No test starts a shipped pack from its own trigger. The e2e automation fixtures are still the
pre-rewrite format and declarevariables, notinputs.
Suggested fix
Declare trigger and firedAt in the eight packs' inputs.properties. Add a guard to
packs.test.ts: a pack that ships a schedule must not reject the envelope as an unknown property.
Keep that assertion narrow, because the GitHub packs may still refuse a scheduled start for missing
required owner and repo, which is an authoring choice.
Two documentation pages need the same pass:
platform/automations/builtin.mdpresents the refusal as expected behaviour for the GitHub packs.platform/automations/triggers.mdshowsfiredAt: "…", but the code sends epoch-ms
(triggers.ts:205). An author following that table would declaretype: stringand reintroduce
the refusal as a type error.
Scope
A pack fix does not reach existing installs. seedDefaultAutomationPacks skips any automation the
organization already has (provisioning/service.ts:88), so an upgraded instance keeps its refused
version. Those need a schema edit and a newly deployed version. Fixing the packs alone does not
close this for anyone already running v0.5.17 or later.
Independent of #3376, where imap-smtp.get_message throws on every message. Fixing
this issue alone restores the scheduled runs, and those runs then fail there.
Activity