Every job and workflow in Strait is versioned. When you update a job’s configuration, the previous version is snapshotted so that in-flight runs continue to execute with the config they were enqueued under.Documentation Index
Fetch the complete documentation index at: https://docs.strait.dev/llms.txt
Use this file to discover all available pages before exploring further.
Dual Versioning
Each job and workflow has two version identifiers:| Field | Type | Purpose |
|---|---|---|
version | Integer | Auto-incrementing counter (1, 2, 3, …). Used for ordering and internal references. |
version_id | String | Globally unique nanoid (ver_k8f2m9x1p3). Used as the public-facing identifier. |
version is predictable and easy to reason about. The version_id is a 16-character string (4-char prefix + 12-char nanoid using 0-9a-z alphabet) that’s safe to expose in URLs and APIs without leaking ordering information.
Version Lifecycle
UpdateJob, the current configuration is snapshotted to the job_versions table before the update is applied. This means:
job_versionscontains the full config for versions 1, 2, … (N-1)- The live
jobstable always has the current (latest) version
Atomic Versioning
When a run is enqueued, it captures the job’s currentversion and version_id:
Fallback Behavior
If no snapshot exists for the requested version (e.g., version 1 before snapshotting was implemented), the executor falls back to reading the livejobs table. This ensures backwards compatibility.
Version Policy
Each job and workflow has aversion_policy that controls how queued runs interact with version updates:
| Policy | Behavior | Use Case |
|---|---|---|
pin (default) | Runs execute with the version they were enqueued under | Safety-first deployments |
latest | Queued runs upgrade to the latest version at dequeue time | Fast rollouts, non-breaking changes |
minor | Upgrade only if the new version is marked backwards_compatible | Controlled rollouts |
pin (Default)
The safest option. Runs always execute with the exact configuration they were enqueued under. A job update never affects already-queued runs.
latest
Queued runs automatically upgrade to the current version when dequeued. Useful when you want all runs to use the latest config regardless of when they were enqueued.
minor
A middle ground. Queued runs upgrade only if the new version has backwards_compatible = true. This lets you control which updates are safe for in-flight runs.
Setting Version Policy
Version policy is enforced at dequeue time by the worker dispatch path.
pin is still the safest default and is applied automatically when no policy is provided.Version Snapshots
Thejob_versions table stores a full snapshot of the job configuration at each version:
endpoint_url,fallback_endpoint_urlmax_attempts,timeout_secstags,payload_schemamax_concurrency,execution_window_cronrate_limit_max,rate_limit_window_secsretry_strategy,retry_delays_secsenvironment_id,group_idenabledversion_id,backwards_compatible
UpdateJob. The first version (at creation time) is captured when the first update occurs.
Browsing Versions
List all versions of a job:Workflow Versioning
Workflows use the same dual version model (version + version_id) and snapshot workflow definitions, including step graphs. Every time you update a workflow via PATCH /v1/workflows/{workflowID}, the version increments and the previous step graph is preserved.
Inspecting versions
GET /v1/workflows/{workflowID}/versions— list all version snapshotsGET /v1/workflows/{workflowID}/versions/{versionID}— get a specific versionGET /v1/workflows/{workflowID}/versions/{versionID}/steps— get the step graph for a versionGET /v1/workflows/{workflowID}/active-versions— list versions that have active (pending, running, or paused) runs, with status breakdowns
Breaking change detection
When you update a workflow, the response includes information about in-flight runs on the previous version:active_runs_on_previous_version field appears whenever there are non-terminal runs still executing on the version that was just replaced. This gives you immediate visibility into whether your update might affect running workflows.
To explicitly acknowledge a breaking update, set breaking_change to true in the request body:
breaking_change is true and active runs exist on the previous version, Strait records a workflow.updated_breaking audit event with the previous version ID, active run count, and new version number. This makes breaking deployments visible in your audit log.