Skip to content

The resolver runtime

A run names the block export it invokes and how that export's dependencies were resolved, and the node must be sure those facts are the ones the control plane fingerprinted before the kernel acts on them. The resolver runtime checks a run's resolver snapshot and reduces it to one admitted set of runtime facts: which block, which export, which distribution artifacts, whether resolution happened at build time or at run time, and the fingerprint that identifies the execution. This page covers the snapshot it reads, the rules for the three resolution settings, the fingerprint, and the refusals. This control-plane desired work is a flow-execution assignment, not a Kernel Application ABI run.* syscall.

From snapshot to admitted facts

flowchart TB
  subgraph SNAP["RESOLVER SNAPSHOT, in the flow-execution assignment"]
    direction LR
    MI["manifest_id,<br/>manifest_version"]
    RCB["reusable_capability_block<br/>with its capsule"]
    EX["selected_export<br/>interface_id, export_ordinal, entrypoint"]
    DA["distribution_artifacts"]
    RP[("resolver_profile<br/>resolver_profile.v1")]
  end
  subgraph ADM["RESOLVER RUNTIME"]
    direction TB
    M{{"Mode, stage, behaviour<br/>consistent"}}
    FP{{"Fingerprint recomputed<br/>equals the profile's"}}
    OUT[("Admitted runtime facts")]
    M --> FP --> OUT
  end
  RP --> M
  MI --> FP
  RCB --> FP
  EX --> FP
  DA --> OUT

The fingerprint is recomputed on the node from the snapshot's own fields and compared with the one the control plane put in the profile, so a snapshot whose export, manifest, mode or capsule was changed after fingerprinting is refused. The distribution artifacts go on to the artifact integrity gate. See Artifact integrity gate.

The resolver profile

The profile's contract_version is resolver_profile.v1, and three of its fields must agree:

resolver_mode resolution_stage runtime_behavior
standard build_time pre_resolved_only
standard runtime runtime_resolve
airgapped build_time pre_resolved_only

These three rows are the only accepted combinations. pre_resolved_only requires build_time, runtime_resolve requires runtime, and airgapped requires both build_time and pre_resolved_only, so an air-gapped run always uses dependencies resolved when the project was built.

A profile carrying a retired runtime grouping field (domain_group, env_group, env_group_materialization, env_groups or materialization) is refused.

The fingerprint

The fingerprint is the SHA-256 of this document, serialised as JSON with sorted keys and no whitespace:

{
  "manifest_id": "<manifest_id>",
  "manifest_version": "<manifest_version>",
  "interface_id": "<selected_export.interface_id>",
  "export_ordinal": 0,
  "entrypoint": "<selected_export.entrypoint>",
  "resolver_mode": "standard",
  "capsule_digest": "<the block's capsule digest>"
}

It is taken over the capsule's digest, which changes exactly when the code that runs changes: two capsules from one package have different fingerprints, and the same capsule republished in a new archive keeps its fingerprint. A block published without a capsule has an empty capsule_digest and a fingerprint distinct from every capsule's.

The admitted facts

contract_version                 resolver_profile.v1
manifest_id, manifest_version
reusable_capability_block_id
interface_id, export_ordinal, entrypoint
resolver_mode, resolution_stage, runtime_behavior
locked_mode                      true when resolver_mode is airgapped
artifacts                        package, version, artifact_ref, artifact_digest for each
resolver_fingerprint

The kernel's lifecycle evidence reports the same resolver_mode, runtime_behavior and resolution_stage back, so a run's evidence records how its dependencies were resolved. See Kernel lifecycle bridge.

When the snapshot is refused

Every refusal carries code INVALID_ARGUMENT and fails the run before dispatch:

resolver_snapshot manifest_id and manifest_version are required
resolver_snapshot.reusable_capability_block.reusable_capability_block_id is required
resolver_snapshot.selected_export requires interface_id and non-negative export_ordinal
resolver_snapshot.distribution_artifacts[<n>] requires package/version/artifact_ref/artifact_digest
resolver_snapshot.resolver_profile is required
resolver_snapshot.resolver_profile.contract_version must be resolver_profile.v1
resolver_snapshot.resolver_profile.airgapped requires runtime_behavior=pre_resolved_only
resolver_snapshot.resolver_profile.resolver_fingerprint is required
resolver_snapshot.resolver_profile.resolver_fingerprint mismatch

A resolver_fingerprint mismatch means the snapshot the node received differs from the one the control plane fingerprinted; compare the snapshot's export, manifest and capsule with the release the run was issued from.