Skip to content
Proud to collaborate with Microsoft for Startups

control.version.select_latest ​

Select the latest comparable version and compute current-version lag evidence

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-control
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
versionsjsonYes—List of candidate version strings or row objects. Examples: ["1.0.0", "1.2.0"] or [{"package": "api", "package_version": "1.2.0"}].
current_versionstringNo—Current pinned/tagged version to compare against candidates, for example 1.1.0.
version_fieldstringNo—Optional dotted path for object candidates, for example package_version or metadata.tag. When omitted, common fields such as version, package_version, tag, and name are tried.
include_prereleasesbooleanNo—Whether prerelease candidates such as 2.0.0a1 can be selected as latest.
strict_candidatesbooleanNo—Strict mode: fail when any candidate row is missing a version, invalid, or excluded as a prerelease.
strict_currentbooleanNo—Strict mode: fail when current_version is present but cannot be parsed as a comparable version.

Output Schema ​

FieldTypeRequiredDefaultDescription
versionsjsonNo—Candidate version list echoed from input.
current_versionstringNo—Current version echoed from input.
version_fieldstringNo—Candidate version path echoed from input.
include_prereleasesbooleanNo—Whether prerelease candidates were eligible.
strict_candidatesbooleanNo—Whether skipped candidates were treated as hard failures.
strict_currentbooleanNo—Whether an invalid current_version was treated as a hard failure.
latest_versionstringNo—Latest comparable candidate in original string form, or null when unknown.
latest_normalized_versionstringNo—PEP 440 normalized latest version, or null when unknown.
latest_itemjsonNo—Original candidate item that supplied the latest version.
current_normalized_versionstringNo—PEP 440 normalized current version, or null when absent or invalid.
ahead_countintegerNo—Number of comparable candidates newer than current_version, or null when unknown.
is_current_latestbooleanNo—True only when a valid current_version is at latest among comparable candidates.
behindbooleanNo—True only when comparable candidates are newer than current_version.
comparable_countintegerNo—Count of candidate versions that parsed and were eligible.
skipped_countintegerNo—Count of candidates skipped as missing, invalid, or excluded prereleases.
orderedlistNo—Comparable candidates sorted from oldest to newest.
skippedlistNo—Skipped candidate records with reason metadata.
resultjsonNo—Typed envelope using schema control.version.select_latest.v1.
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "control.version.select_latest",
  "initial_data": {
    "versions": "value"
  }
}