PtcRunner.Kernel.EffectiveApplication (PtcRunner v0.14.0)

Copy Markdown View Source

Exact behavior identity for one fully normalized application declaration.

The digest is SHA-256 over "ptc.effective-application.v2\0", the big-endian u64 byte length, and the TJCS projection documented by the stable command contract. Selected input values, paths, labels, event IDs, raw provider selectors, credentials, and private OAuth authority never enter this projection.

Summary

Functions

Builds the literal effective projection and its domain-separated digest.

Types

normalized_providers()

@type normalized_providers() :: %{workflow: [map()], mission: [map()]}

Functions

build(request, workflow_bundle, mission_bundles, providers, effective_event_policy)

@spec build(
  PtcRunner.Kernel.RunRequest.t(),
  PtcRunner.Kernel.FrozenBundle.t(),
  %{required(binary()) => PtcRunner.Kernel.FrozenBundle.t() | nil},
  normalized_providers(),
  :normal | :private
) ::
  {:ok, %{projection: map(), digest: binary()}}
  | {:error, :invalid_effective_application}

Builds the literal effective projection and its domain-separated digest.