Skip to main content

Crate autumn_harvest

Crate autumn_harvest 

Source
Expand description

Durable workflow orchestration engine core.

Re-exports§

pub use admission_gate::AdmissionGate;
pub use admission_gate::AdmissionGateCache;
pub use admission_gate::AdmissionGateId;
pub use admission_gate::AdmissionGateView;
pub use admission_gate::GateScope;
pub use admission_gate::MAX_ACTIVE_GATES;
pub use admission_gate::check_admission;
pub use analyzer::AnalyzerRule;
pub use analyzer::AnalyzerWarning;
pub use analyzer::ExcessiveRetriesRule;
pub use analyzer::HistoryAnalyzer;
pub use analyzer::LargePayloadRule;
pub use analyzer::SuspiciousTimerRule;
pub use builder::BuiltHarvest;
pub use builder::HarvestBuilder;
pub use builder::HarvestBuilderError;
pub use builder::StickyRoutingConfig;
pub use builder::WorkerConfig;
pub use cache::CachedWorkflowState;
pub use cache::WorkflowCache;
pub use calendar::BackfillSlot;
pub use calendar::create_calendar;
pub use calendar::delete_calendar;
pub use calendar::get_calendar;
pub use calendar::list_calendars;
pub use calendar::load_exclusions_for_calendar;
pub use calendar::plan_backfill_with_calendar;
pub use calendar::preview_schedule_firings;
pub use calendar::replace_calendar_exclusions;
pub use calendar::Calendar;
pub use calendar::ScheduleFirePreview;
pub use calendar::apply_skip_policy;
pub use calendar::calendar_excludes_weekends;
pub use calendar::is_excluded_date;
pub use completion_trigger::CompletionTrigger;
pub use completion_trigger::InputMapping;
pub use completion_trigger::TerminalState;
pub use context::ActivityContext;
pub use context::DEFAULT_HISTORY_CONTINUE_AS_NEW_THRESHOLD;
pub use context::WorkflowCommand;
pub use context::WorkflowContext;
pub use context::WorkflowHistoryPolicy;
pub use critical_path::CriticalPathAnalyzer;
pub use critical_path::CriticalPathResult;
pub use dag::DagBuildError;
pub use dag::DagBuilder;
pub use dag::DagCondition;
pub use dag::DagDefinition;
pub use dag::DagDispatchDecision;
pub use dag::DagMapTaskRef;
pub use dag::DagTask;
pub use dag::DagTaskRef;
pub use dag_export::export_dot;
pub use dag_export::export_mermaid;
pub use dag_linter::DagLinter;
pub use dag_linter::DagRule;
pub use dag_linter::DagWarning;
pub use dag_linter::ExcessiveParallelismRule;
pub use dag_linter::MissingRetryPolicyRule;
pub use dag_linter::MissingTimeoutRule;
pub use det_check::DetCheckReport;
pub use det_check::DetFinding;
pub use det_check::DetLocation;
pub use det_check::DetSeverity;
pub use det_check::DetSuppression;
pub use det_check::check_dir;
pub use det_check::check_file;
pub use det_check::check_source;
pub use diagnostic::DiagnosticReport;
pub use diagnostic::SimulatorResultExt;
pub use error::HarvestError;
pub use error::HarvestResult;
pub use error::TimeoutType;
pub use event::SideEffectKind;
pub use event::WorkflowEvent;
pub use executor::WorkflowOutcome;
pub use executor::run_workflow;
pub use guardrail::GuardrailFinding;
pub use guardrail::GuardrailSuppression;
pub use guardrail::GuardrailSuppressionError;
pub use guardrail::RuleCategory;
pub use guardrail::RuleEntry;
pub use guardrail::Severity;
pub use guardrail::catalog as guardrail_catalog;
pub use guardrail::rule_by_id as guardrail_rule_by_id;
pub use handle::StartedWorkflowHandle;
pub use handle::WorkflowHandle;
pub use handle::WorkflowHandleClient;
pub use handle::WorkflowResult;
pub use handle::WorkflowResultState;
pub use handle::start_or_load_workflow_execution_with_handle;
pub use handle_typed::TypedSignalWithStartOptions;
pub use handle_typed::TypedStartOptions;
pub use handle_typed::TypedUpdateWithStartOptions;
pub use handle_typed::TypedWorkflowHandle;
pub use handle_typed::TypedWorkflowResult;
pub use history_export::DEFAULT_HISTORY_EXPORT_MAX_BYTES;
pub use history_export::HISTORY_EXPORT_SCHEMA;
pub use history_export::HISTORY_EXPORT_VERSION;
pub use history_export::HistoryExportDocument;
pub use history_export::HistoryExportError;
pub use history_export::HistoryExportRequest;
pub use history_export::HistoryExportSizeLimit;
pub use history_export::HistoryExportStatus;
pub use history_export::HistoryPayloadPolicy;
pub use history_export::export_history;
pub use history_export::export_mermaid_sequence;
pub use info::ActivityHandlerFn;
pub use info::ActivityInfo;
pub use info::DagInfo;
pub use info::QueryHandlerFn;
pub use info::QueryHandlerInfo;
pub use info::UpdateHandlerFn;
pub use info::UpdateHandlerInfo;
pub use info::UpdateValidatorFn;
pub use info::WorkflowHandlerFn;
pub use info::WorkflowInfo;
pub use payload_codec::CodecError;
pub use payload_codec::IdentityCodec;
pub use payload_codec::PayloadCodec;
pub use payload_codec::PayloadCodecs;
pub use policy::validate_schedule;
pub use policy::CatchupPolicy;
pub use policy::MapFailurePolicy;
pub use policy::OverlapPolicy;
pub use policy::RetryPolicy;
pub use policy::Schedule;
pub use policy::SkipPolicy;
pub use policy::TaskStatus;
pub use policy::TriggerRule;
pub use policy::WorkflowSchedule;
pub use pool::HarvestPoolConfig;
pub use pool::compute_pool_sizes;
pub use query::QueryRegistry;
pub use replay::HistoryMatch;
pub use replay::HistoryMatcher;
pub use replay::SignalOrTimerMatch;
pub use reset::ResetInvalidPoint;
pub use reset::ResetPlan;
pub use reset::ResetResult;
pub use reset::ResetSignalReapplyPolicy;
pub use reset::ResetUnresolvedSideEffect;
pub use reset::WorkflowResetError;
pub use reset::WorkflowResetRequest;
pub use reset::preview_workflow_reset;
pub use reset::reset_workflow_execution;
pub use reset::validate_reset_point;
pub use retention::ArchiverFuture;
pub use retention::HistoryArchiver;
pub use retention::RetentionConfig;
pub use retention::RetentionMonitor;
pub use retention::RetentionRuntime;
pub use retention::RetentionStatus;
pub use retention::RetentionTickResult;
pub use saga::Saga;
pub use schedule_decision::record_decision_graceful;
pub use scheduler::DagCatalog;
pub use scheduler::RegisteredDag;
pub use scheduler::SchedulerMonitor;
pub use scheduler::SchedulerRuntime;
pub use scheduler::compile_dag_catalog;
pub use scheduler::register_schedules;
pub use scheduler::register_workflow_schedules;
pub use scheduler::tick_once;
pub use scheduler::trigger_unified_dag;
pub use shard::ShardRouter;
pub use shard::ShardedDbPool;
pub use simulator::SimulatorResult;
pub use simulator::WorkflowSimulator;
pub use telemetry::ActivityStatus;
pub use telemetry::MetricsRecorder;
pub use telemetry::NoOpMetrics;
pub use telemetry::NoOpPropagator;
pub use telemetry::TelemetryConfig;
pub use telemetry::TelemetryConfigBuilder;
pub use telemetry::TraceContextCarrier;
pub use telemetry::TraceContextPropagator;
pub use telemetry::WorkflowStatus;
pub use types::ActivityExecId;
pub use types::BuildId;
pub use types::DeploymentName;
pub use types::ExecutionId;
pub use types::ExternalActivityToken;
pub use types::ExternalCancelId;
pub use types::ExternalSignalId;
pub use types::ParentClosePolicy;
pub use types::Priority;
pub use types::ShardId;
pub use types::TimerId;
pub use types::UpdateId;
pub use types::WorkerId;
pub use types::WorkflowId;
pub use types::WorkflowIdReusePolicy;
pub use update::UpdateRegistry;
pub use version_usage::VersionExecutionStateGroup;
pub use version_usage::VersionUsageFilters;
pub use version_usage::VersionUsageShardRow;
pub use version_usage::load_version_usage;
pub use diesel;
pub use diesel_async;
pub use serde_json;
pub use serde;
pub use chrono;
pub use uuid;

Modules§

admission_gate
Admission gate primitive for incident-response operators (issue #377). Admission gate primitive for incident-response operators (issue #377).
analyzer
History analyzer and linter. Workflow history analyzer and linter.
audit
Audit trail for management API mutations (issue #158). Management API audit trail (issue #158).
batch
Batch operations for fleet-wide workflow cancel/terminate/signal (issue #102). Batch operations for fleet-wide workflow management (issue #102).
batch_start
Batch workflow start types: caps and per-item request/result structs (issue #357). Batch workflow start types (issue #357).
build_routing
Worker build-id routing for safe rolling deploys (issue #171). Worker build-id routing for safe rolling deploys (issue #171).
builder
Fluent API for registering workflows, activities, and configuring the worker.
cache
LRU cache for suspended workflow states.
calendar
Calendar-aware schedule filtering: named exclusion sets, skip policies, and schedule preview generation (issue #337). Calendar-aware schedule filtering for business-day and holiday-skip jobs.
circuit_breaker
Per-activity circuit breaker that fast-fails dispatch during downstream outages (issue #369). Per-activity circuit breaker that fast-fails dispatch during downstream outages (issue #369).
completion_trigger
concurrency
Per-key concurrency limits for tenant fair-share scheduling (issue #247). Per-key concurrency limits for tenant fair-share scheduling (issue #247).
context
Execution contexts passed to workflow and activity functions.
critical_path
Critical Path Analyzer for DAG Definitions.
dag
DAG definition primitives for Harvest.
dag_export
Export format types for Directed Acyclic Graphs (DAGs) representing workflows. Visualization exporters for DAG definitions.
dag_linter
DAG configuration analyzer and linter.
det_check
Deterministic workflow guardrails: static source-level check for replay-breaking patterns. Deterministic workflow guardrails.
diagnostic
Diagnostic reporting for simulated workflow executions.
eligibility
error
Error types for the harvest engine.
event
Event types for the workflow event-sourcing engine.
executor
Workflow executor – runs a single workflow function through replay + live execution.
external_task
External activity task management — token-based async completion.
failure
Typed activity failure surface for structured error classification.
guardrail
Deterministic workflow guardrail rule catalog (issue #173). Deterministic workflow guardrail rule catalog (issue #173).
handle
In-process workflow result handles for request/response embedders.
handle_typed
Type-safe client handle wrappers and start options for compile-time-safe workflows.
history_export
Export workflow event histories to replay fixtures and Mermaid diagrams.
info
Registration types returned by macro-generated companion functions.
payload_codec
Interfaces for transforming event payloads before they are persisted.
poison_pill
Poison-pill task quarantine (Phase 4, issue #367).
policy
Retry policies, trigger rules, and scheduling types.
pool
Database pool configuration with separate pools and shared ceiling.
prelude
Convenient glob import for autumn-harvest users.
query
Types and definitions for querying workflow state and metadata. Query registry and dispatch for read-only workflow state inspection (issue #234).
replay
Replay engine for deterministic workflow re-execution.
reset
Workflow reset and fork recovery primitives.
retention
Time-based retention janitor for completed workflow history.
saga
Saga compensation helper for workflow code.
schedule_decision
scheduler
DAG scheduler and runtime execution.
shard
Shard routing and per-shard database pools.
simulator
Workflow simulator for local, determinism-safe testing.
telemetry
OpenTelemetry integration: trace-context propagation and metrics. OpenTelemetry integration surface for autumn-harvest.
types
Core identity types for the workflow engine.
update
Update handler registry for the workflow Update primitive (issue #140).
version_gate_retirement
Read-only retirement-check query for recorded workflow version-gate markers.
version_usage
Read-only inventory for recorded workflow version-gate markers.
workers
Worker fleet registry — liveness tracking, heartbeat, and fleet queries.

Macros§

cfg_db
Embedded migrations for the harvest engine schema.

Structs§

AuditRecord
A single management API audit record (issue #158).
CancelledWorkflowExecution
Result of a workflow cancellation request.
ConcurrencyKeyStats
Live stats for a single (concurrency_key, task_type) pair.
EventHistory
Loaded event history for a single workflow execution.
NewAuditRecord
Insert struct for recording a new audit event.
PausedWorkflowExecution
Result of a workflow pause request.
QueueScalingSignal
Live scaling signals for a task queue.
QueueTaskCounts
Helper struct for queue task counts.
ResumedWorkflowExecution
Result of a workflow resume request.
SignalWithStartOutcome
Result of a signal_with_start_workflow_execution call.
SignalWithStartParams
Parameters for the atomic signal_with_start primitive.
StartWorkflowParams
Parameters for starting a workflow execution.
StartedWorkflowExecution
Result of an idempotent workflow start attempt.
UpdateWithStartOutcome
Result of an update_with_start_workflow_execution call.
UpdateWithStartParams
Parameters for the atomic update_with_start primitive.

Enums§

AwaitMode
Whether a child workflow was spawned in await or detached mode.

Constants§

MIGRATIONS

Functions§

auto_resume_expired_pauses
Auto-resume executions that have been paused longer than max_pause_duration (issue #383, bounded pause).
cancel_workflow_execution
Cancel a running workflow execution.
parse_byte_size
Parse a human-readable byte-size string like "2MiB", "256KiB", "4MB".
pause_workflow_execution
Pause a running workflow execution (issue #383).
queue_task_counts
Return backlog, in-flight, and scheduled task counts per queue on this shard.
resume_workflow_execution
Resume a paused workflow execution (issue #383).
signal_with_start_workflow_execution
Errors
start_or_load_workflow_execution
Start a workflow execution or load the existing one, applying the caller’s WorkflowIdReusePolicy when a duplicate (workflow_name, workflow_id) collision occurs.
terminate_workflow_execution
Hard-finalize a workflow execution to CANCELLED regardless of its current state.
update_with_start_workflow_execution
Atomically start or attach to a workflow and admit one update.