Skip to content

Preflight evaluation

Preflight checks a workflow's bindings against the manifests of the blocks it calls, before anything is published or run. It answers whether what the workflow wires together is actually wireable.

What it checks

The plan below is an example with three bindings, one of which names an export the block does not have.

flowchart LR
  subgraph WF["WORKFLOW BINDINGS"]
    direction TB
    W1["binding 1"]
    W2["binding 2"]
    W3["binding 3"]
  end
  subgraph MF["BLOCK MANIFEST, indexed exports"]
    direction TB
    E1["export a"]
    E2["export b"]
  end
  W1 -->|"names a"| E1
  W2 -->|"names b"| E2
  W3 -.->|"names c, not found"| MF

Each binding is one edge into the manifest box. A solid edge that lands on an export counts as checked; the dashed edge that lands on nothing becomes an entry in the error list.

The manifest is indexed into its authored exports, and each binding is validated against the export it names. A selection can narrow the check to one block rather than the whole manifest.

The answer

{ "ok": true, "checked": 3, "errors": [] }

checked is how many were examined and errors is what failed. ok is simply whether the error list is empty, so a caller can branch on one field and report on another.

Two refusals before any checking

Bindings supplied in the wrong shape are refused with bindings.capability_bindings must be an object, and a selection that matches nothing with no capabilities matched preflight selection.

The second is the one worth recognising. An empty result is refused rather than returned as a pass, because "nothing matched" and "everything passed" are different answers and only one of them means the workflow is sound.

A manifest that does not index is refused with the indexing error itself, so a malformed manifest reports its own problem rather than producing zero checks.

It is authorised like any other action

Preflight requires the preflight.run action in the workspace it is being run for. It reads a manifest and bindings the caller supplies rather than mutating anything, and it is still authorised, because what it reveals about a workspace is scoped information.

Where it fits

Preflight is a pre-publication check. The same relationships are checked again at admission, by the flow gate for block references and bindings and by the execution gate for execution semantics. See Admission gates.

Running preflight first moves the discovery of a wiring error from publication time to authoring time, without weakening the gate that runs later.

What it does not cover

Preflight is about bindings against manifests. Whether the resulting plan is safe to execute, given side effect classes, idempotency requirements and retry budgets, is the execution admission gate's question, and that gate has its own error and warning codes.