Wire cron engine: app/archied composition, sink adapter, Start/Stop lifecycle #780

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

Composition slice that connects the four siblings: instantiates the ticker engine in internal/app/archied/ over the job store and the router, with the configured EngineConfig from the translator; registers it with the daemon's existing Start/Stop lifecycle (Start on boot, bounded-during Stop) and wires the events-bus sink so emitted KindJobRun / KindJobError events reach the bus subjects the rest of the system already listens on.

This is the last bead before the epic's acceptance scenario — daily-status-summary cron, persists across restarts, dangerous commands refused — is end-to-end runnable by a fresh operator.

Acceptance criteria

  • engine.Start called during daemon boot, with the configured interval.
  • engine.Stop(ctx) called during daemon shutdown, bounded by the same grace deadline the rest of the daemon uses (matches taskrun/workflow engine shutdown pattern).
  • scheduling.Sink adapts to the events bus emitter so dashboard / dashboard timeline surfaces running and failed jobs with the same Kind/Detail/Data shape the rest of the system uses.
  • With all four sibling slices landed, the parent epic acceptance ('a daily-status-summary cron job can be created, persists across restarts, dangerous commands are refused') is exercisable end-to-end.

Close reason

setupScheduling wires store+router+engine with Start at boot (bootstrap.go:1708) and bounded Stop via addCleanup; cronevents bus sink; TestSetupScheduling* green. Epic-level e2e acceptance still gated on .3/.4


Imported from beads archie-core-1786637496320-249-be6d9a20.6 · GitHub #675 · type feature · priority P2 · created 2026-08-27 · closed 2026-09-18

Composition slice that connects the four siblings: instantiates the ticker engine in `internal/app/archied/` over the job store and the router, with the configured `EngineConfig` from the translator; registers it with the daemon's existing Start/Stop lifecycle (Start on boot, bounded-during Stop) and wires the events-bus sink so emitted `KindJobRun` / `KindJobError` events reach the bus subjects the rest of the system already listens on. This is the last bead before the epic's acceptance scenario — daily-status-summary cron, persists across restarts, dangerous commands refused — is end-to-end runnable by a fresh operator. ### Acceptance criteria - `engine.Start` called during daemon boot, with the configured interval. - `engine.Stop(ctx)` called during daemon shutdown, bounded by the same grace deadline the rest of the daemon uses (matches `taskrun`/workflow engine shutdown pattern). - `scheduling.Sink` adapts to the events bus emitter so dashboard / dashboard timeline surfaces running and failed jobs with the same `Kind`/`Detail`/`Data` shape the rest of the system uses. - With all four sibling slices landed, the parent epic acceptance ('a daily-status-summary cron job can be created, persists across restarts, dangerous commands are refused') is exercisable end-to-end. ### Close reason setupScheduling wires store+router+engine with Start at boot (bootstrap.go:1708) and bounded Stop via addCleanup; cronevents bus sink; TestSetupScheduling* green. Epic-level e2e acceptance still gated on .3/.4 --- _Imported from beads `archie-core-1786637496320-249-be6d9a20.6` · GitHub #675 · type feature · priority P2 · created 2026-08-27 · closed 2026-09-18_
sam added the mediumfeature labels 2026-10-27 13:37:43 +00:00
sam self-assigned this 2026-10-27 13:37:43 +00:00
sam closed this issue 2026-10-27 13:37:43 +00:00
sam added a new dependency 2026-10-27 13:42:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#780