Run and plan resources
The Sync API owns durable run records and saved plan artifacts. CLI and Python callers do not select a cache directory or read service storage directly.
Run identity
The service allocates run_id when it accepts a plan or sync. Later get, verify, apply,
artifact, and plan operations use that returned identity. An apply extends the reviewed
run instead of creating a caller-selected local run.
Each public run resource includes:
- the service run ID and operation;
- the registered configuration identity, registry version, and package checksum;
- product phase, outcome, timings, summary, and results;
- immutable artifact references; and
- retained orchestration entries for each worker execution.
The product record is authoritative. Live worker state is diagnostic and cannot replace a durable terminal outcome.
Saved plan review
GET /runs/{run_id}/plan, exposed as SyncClient.get_plan() and infrahub-sync runs plan, returns the service-owned review document:
run_id;- full plan checksum and checksum-verification verdict;
- the destination schema fingerprint recorded when the plan was created;
- verification notes;
- counts by action and destination kind;
- whether delete operations were computed;
- how many recorded deletes will not execute; and
- the full ordered operation set.
The checksum printed by the CLI comes from this resource. Apply sends it back as
expected_checksum; the client does not reconstruct plan bytes.
Deletes in a plan
Delete operations are reviewable but are not executed. Summary output states the skipped
delete count. Detailed output marks each delete as (not executed).
When a worker cannot enumerate the full destination, the plan summary sets
delete_operations_computed to false. This is different from a complete plan with zero
deletes, and the CLI discloses it explicitly.
Artifacts
Artifact list and content routes expose service-approved references. Content responses
carry a required SHA-256 Digest; the shared client verifies that digest before returning
bytes to the caller. Storage locations and provider credentials are not part of the public
client contract.