Persistence, controls and recovery
Persist accepted work, project lifecycle records atomically and reconcile before admitting new requests.
Persist run and timeline together
RunProjector owns durable lifecycle projection. Standalone durable hosts need one atomic RunTimelineCommitStore satisfying both store contracts and an explicit onProjectionError diagnostic sink. Separate stores are not an atomic history guarantee.
import { RunProjector } from "@smoothie-framework/runtime/worker/adapter";
import type {
RunTimelineCommitStore,
RunProjectionDiagnostic,
} from "@smoothie-framework/runtime/worker/adapter";Before accepting new work, bind queues and recover stored admissions. Use stable request keys and application idempotency; queue command deduplication is not durable exactly-once execution.
Recover under one host owner
Typed Worker handles support cancellation, not resume. Dynamic handlers may implement raw suspension/resume controls explicitly. Control acceptance is not proof that execution has applied it.
Recovery can replay work at least once. Hold exclusive recovery ownership, reconcile retained controls and external effects, then open admission. Do not race a second active host over the same processing identity.
The runtime does not add backup, a distributed scheduler or external rollback. Interrupted application publication and uncertain effects need their own reconciliation policy.