PtcRunner.Kernel.InspectionArtifact (PtcRunner v0.15.0)

Copy Markdown View Source

Sealed V1 private inspection artifact publication and path contract.

A .ptcins artifact contains one fixed header, deterministic length-framed JSON evidence, and one fixed footer. Production writes evidence directly to a missing-destination reservation as records are emitted; no complete record list or complete artifact binary is retained. Publication hard-links only a synchronized, sealed staging file and never replaces an existing path.

Readers pin one opened file, independently admit every frame against its paired canonical trace, and keep only bounded derived ETS metadata. Queries read and digest-check the payload ranges required for returned content.

Summary

Types

seal()

@type seal() :: %{
  artifact_digest: binary(),
  file_digest: binary(),
  evidence_bytes: non_neg_integer(),
  record_count: non_neg_integer(),
  total_bytes: pos_integer()
}

Functions

max_artifact_bytes()

@spec max_artifact_bytes() :: pos_integer()

preflight_destination(path)

@spec preflight_destination(term()) :: :ok | {:error, atom()}

suffix()

@spec suffix() :: binary()