PtcRunner.Kernel.PreparedRun (PtcRunner v0.14.0)

Copy Markdown View Source

Sealed provider-inert output of phases 4 and 5.

It contains no filesystem path, credential, endpoint, provider callback result, artifact destination, or arbitrary lower-level failure. Its creating process owns the linked active-lifecycle marker until single-use consumption atomically transfers lifecycle ownership to the consumer.

Summary

Functions

Idempotently releases the prepared run's activity owner.

Checks the preparation's seal without asking anything about its lifecycle.

Types

t()

@type t() :: %PtcRunner.Kernel.PreparedRun{
  attestation: binary() | nil,
  catalog_attestation: binary(),
  effective_application_digest: binary(),
  effective_application_projection: map(),
  effective_data_class: :normal | :private_inspection,
  effective_event_policy: :normal | :private,
  effective_flow: :normal | :private,
  entry_source: binary(),
  installation_config_digests: %{required(binary()) => binary()},
  mission_bundles: %{
    required(binary()) => PtcRunner.Kernel.FrozenBundle.t() | nil
  },
  post_selection_context: map(),
  provider_activity: PtcRunner.Kernel.ProviderActivity.t(),
  provider_declarations: [map()],
  request: PtcRunner.Kernel.RunRequest.t(),
  workflow_bundle: PtcRunner.Kernel.FrozenBundle.t()
}

Functions

close(arg1)

@spec close(t()) :: :ok | {:error, :not_owner | :provider_activity_unavailable}

Idempotently releases the prepared run's activity owner.

After consume/1 transfers ownership, only the consuming process can release a live owner; the former owner receives {:error, :not_owner}. A bounded-call failure returns {:error, :provider_activity_unavailable}.

new(request, workflow_bundle, mission_bundles, entry_source, provider_activity, catalog, metadata)

sealed?(prepared)

@spec sealed?(term()) :: boolean()

Checks the preparation's seal without asking anything about its lifecycle.

Every other predicate here pairs the seal with one lifecycle state, which is the right question while a command owns the run. A value that only has to be the preparation it claims to be — a result binding itself to one, for instance — asks this instead, because the run may be claimed, consumed, or already closed by the time the binding is checked.

valid?(prepared)

@spec valid?(term()) :: boolean()