PtcRunner.Kernel.PublicationAuthority (PtcRunner v0.14.0)

Copy Markdown View Source

Sealed, anchored artifact destinations authorized before execution.

authorize/4 is the phase-6 boundary. It captures physical parent and file identities and retains exclusive staging handles for normal artifacts. A private result additionally retains an empty, owner-only recovery file in the requested result directory. The authority is the only value passed into execution; execution outcomes retain only its attested binding.

new/1 remains an un-authorized value constructor for direct embedding validation and attestation tests. Production command paths use authorize/4 before opening a provider session.

Summary

Functions

Authorizes all requested artifact destinations during phase 6.

Types

artifact_destination()

@type artifact_destination() :: :trace | :inspection | :result

authorization_error()

@type authorization_error() ::
  atom()
  | {atom(), artifact_destination()}
  | {:conflicting_destinations, [atom()]}

lease()

@type lease() :: {pid(), reference()}

t()

@opaque t()

Functions

authorize(run_ref, opts, event_policy, provider_class)

@spec authorize(
  binary(),
  keyword(),
  :normal | :private,
  :normal | :private_inspection
) ::
  {:ok, t()} | {:error, authorization_error()}

Authorizes all requested artifact destinations during phase 6.