Skip to content

Versioned release routes and bindings

Every version of a project and every version of a model is immutable, and many of them can run at once. Two records decide which one is used: a release route per project and per model, naming the version a stable name points at, and a binding per project alias, naming the model that alias calls. This page is both records, how each changes, and the fence a node's report must carry so that it is judged against the route it acted under.

The routing mesh

flowchart TB
  subgraph CP["CONTROL PLANE"]
    direction LR
    PR[("Project release route<br/>per workspace and project name")]
    BD[("Bindings<br/>per project version and alias")]
    MR[("Model release route<br/>per workspace and model name")]
    BD -->|"version from the route<br/>when none is named"| MR
  end
  subgraph RT["RUNNING VERSIONS"]
    direction LR
    subgraph PV["PROJECT VERSIONS"]
      direction TB
      P1["v1"]
      P2["v2, route target"]
    end
    subgraph MV["MODEL VERSIONS"]
      direction TB
      M1["v1"]
      M2["v2, route target"]
    end
  end
  PR -->|"target_version"| P2
  MR -->|"target_version"| M2
  P2 -->|"alias, stable endpoint"| M2
  P1 -.->|"alias pinned to v1"| M1

The two route records choose one version per name, and the bindings connect a project version's aliases to models. A binding that pins a model version bypasses the model's route, which is how an older project version can keep calling the model version it was tested against while newer versions move on.

The route record

A project route is project.release_route.v1 and a model route is model.release_route.v1. Both carry the same fence fields:

Field Holds
workspace_uuid The workspace
project_name or model_name The stable name the route belongs to
target_version The version the name points at
stable_endpoint The endpoint that stays the same across versions
route_generation A counter that advances when the route changes
route_hash sha256 over the fields above and the selection reason
selection_reason Why this version is the target

A write that produces the same hash as the stored route keeps its generation; any change advances it by one. Two routes with the same generation and hash point at the same version for the same reason.

Project routes are set by an operator

xratu project release-route orders 1.4.0 "promote after soak" staged_cleanup

The command names the project, the target version, a reason, and a transition mode. It is authorised as flow.update in the workspace, and both the version and the reason are required. The target version must exist and must have a runtime endpoint contract; otherwise the change is refused with 404 or 409.

The transition mode is immediate or staged_cleanup, or policy, which takes the mode from the workspace's governance under project_release_routing.transition_policy.mode. With no policy set, the mode is immediate.

A change does three things in order:

  1. It writes the route with its new generation and hash, recording the previous target version, the actor, the reason and the time.
  2. It ensures the target version is deploying or deployed, so the name points at something that is converging.
  3. With staged_cleanup, it moves the previous target version to serve_stop, stopping it through the ordinary desired-state path.

Each change is audited as project.release_route.set with the previous and next routes, appended to the project's history, and emitted as a promoted event on the project deployment operation stream.

Model routes are selected by the control plane

The model deployment controller keeps each model's route pointing at the most suitable version it holds, recording the rule it used as the selection reason:

latest_deployed                  the newest version that is deployed
latest_warming, latest_deploying, latest_materializing,
latest_pending, latest_degraded, latest_failed
                                 with none deployed, the newest in the first of these states
latest_revision_fallback         otherwise, the newest revision

A model's stable endpoint is its Service name in the cluster, http://<model>.<namespace>.svc.cluster.local, so a project bound to a model by name keeps calling one endpoint while the controller moves the route between versions.

Bindings attach aliases to models

A project declares the model aliases it calls in its deploy.xratu, under project_binding. A binding points one of those aliases at a model, and is set with:

xratu model bind orders summariser llm-small 2.1.0 1.4.0

That binds the summariser alias of orders version 1.4.0 to version 2.1.0 of llm-small. The model version and the project version are both optional. A binding without a project version is the project's default for that alias. A binding without a model version records the newest deployment of the model at the time it is made.

For each alias, the effective binding is the first of these that exists:

Source Scope
override.project_version A binding set for this project version
override.project_default A binding set for the project with no version
deploy_spec The alias as declared in deploy.xratu

The model version is the one the effective binding names. An alias declared in deploy.xratu with no version takes the model's route target, or the newest deployment when the model has no route. xratu model unbind removes an override, and the alias falls back to the next source.

Binding runs the locality planner at the moment it is made. A binding the planner cannot place is refused with 409 and the planner's reason, and an accepted binding emits the route assignments its plan needs. Every bind is audited as model_binding.bind. See Binding routing and locality.

A run resolves one alias per model call

When a run node calls a model, the alias is the node's own model_binding, or the workflow's, or the project's only binding when it has exactly one. The effective binding for that alias supplies the model, its version and its route, and the model route contract is stamped into the assignment:

contract_version    model.release_route.v1
model_name, target_version, selected_version, selected_endpoint
stable_endpoint, route_generation, route_hash, selection_reason
selected            whether the version used is the route's target
Reason Condition
model_binding_not_found The project has no effective bindings, or none with the alias
model_route_contract_invalid The route selected the version but carries no generation or hash
model_routing_policy_invalid The binding's traffic priority is outside high, normal and low

Reports carry the route they acted under

A node serving a project or model reports against the route contract stamped on its assignment. Its execution report echoes release_route_generation and release_route_hash, and a report whose values differ from the stamped ones is refused:

PROJECT_RELEASE_ROUTE_GENERATION_MISMATCH
PROJECT_RELEASE_ROUTE_HASH_MISMATCH
MODEL_RELEASE_ROUTE_GENERATION_MISMATCH
MODEL_RELEASE_ROUTE_HASH_MISMATCH

The refusal records the expected and observed generation and hash together. A node still reporting under a route that has since moved is identified by the older generation in its report, and its report changes nothing.