Schedules: schedule-fired event and Schedule trigger #489

Closed
opened 2026-10-27 13:36:31 +00:00 by sam · 0 comments
Owner

A run publishes a schedule-fired capture (schedule id, name, scheduled_for, fired_at) that bindings match like any other event source. Workflow trigger vocabulary gains a schedule trigger naming a schedule by id. Record the run's task reference when a binding starts a task.

Acceptance criteria

A binding on a schedule starts a workflow on each fire; the run row links to the task.

Notes

See archie-core-8fnip notes for the Runner seam (scheduleRunner.Fire) and SetScheduleRunTask.
Landed d1d6301f. Schedule firing = capture on reserved source 'schedule' (intake 404s it, sources cannot take it), identified by seeded event type 'schedule-fired', mapped by seeded mapping 'schedule-fired' (schedule_id, name, scheduled_for, fired_at). A schedule trigger is a binding on source 'schedule' with mapping 'schedule-fired' and filter schedule_id == "". Engine (8fnip) must call schedulecapture.Firer{Captures: stateStore client, Retention/MaxEvents: cfg.Capture}.Fire(ctx, source.ScheduleFired{ScheduleID, Name, ScheduledFor, FiredAt}) (captureID string, err error) once per run; delivery is schedule_id@scheduled_for so a retried slot starts no second task. PENDING: runs store records capture_id; the run's task links are binding dispatches for that capture (ListDispatches CaptureID filter), no extra store. UI kind 'schedule' in workflow-triggers.ts belongs to ielfm.

Close reason

Built-in jobs seed as locked schedules and run through the scheduler; schedule runs fire captures and record capture_id.


Imported from beads archie-core-w34dp · GitHub #1866 · type feature · priority P1 · created 2026-10-25 · closed 2026-10-25

A run publishes a schedule-fired capture (schedule id, name, scheduled_for, fired_at) that bindings match like any other event source. Workflow trigger vocabulary gains a schedule trigger naming a schedule by id. Record the run's task reference when a binding starts a task. ### Acceptance criteria A binding on a schedule starts a workflow on each fire; the run row links to the task. ### Notes See archie-core-8fnip notes for the Runner seam (scheduleRunner.Fire) and SetScheduleRunTask. Landed d1d6301f. Schedule firing = capture on reserved source 'schedule' (intake 404s it, sources cannot take it), identified by seeded event type 'schedule-fired', mapped by seeded mapping 'schedule-fired' (schedule_id, name, scheduled_for, fired_at). A schedule trigger is a binding on source 'schedule' with mapping 'schedule-fired' and filter schedule_id == "<id>". Engine (8fnip) must call schedulecapture.Firer{Captures: stateStore client, Retention/MaxEvents: cfg.Capture}.Fire(ctx, source.ScheduleFired{ScheduleID, Name, ScheduledFor, FiredAt}) (captureID string, err error) once per run; delivery is schedule_id@scheduled_for so a retried slot starts no second task. PENDING: runs store records capture_id; the run's task links are binding dispatches for that capture (ListDispatches CaptureID filter), no extra store. UI kind 'schedule' in workflow-triggers.ts belongs to ielfm. ### Close reason Built-in jobs seed as locked schedules and run through the scheduler; schedule runs fire captures and record capture_id. --- _Imported from beads `archie-core-w34dp` · GitHub #1866 · type feature · priority P1 · created 2026-10-25 · closed 2026-10-25_
sam added the highfeature labels 2026-10-27 13:36:31 +00:00
sam self-assigned this 2026-10-27 13:36:32 +00:00
sam closed this issue 2026-10-27 13:36:32 +00:00
sam added a new dependency 2026-10-27 13:41:52 +00:00
sam added a new dependency 2026-10-27 13:41:59 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#489