PtcRunner.Kernel.ViewerAdapter (PtcRunner v0.14.0)

Copy Markdown View Source

Internal read-only viewer adapter over the shared TraceLog query layer.

The sibling viewer delegates here so it does not create a competing trace parser, query model, or source authorization boundary. Inspection artifacts are loaded and validated once at Viewer startup; requests receive an opaque immutable grant and never reopen the configured path.

Summary

Functions

Builds a semantic conversation from the pinned, already validated records.

Returns the pinned run's authorized workflow execution-error records.

Returns the pinned run's dedicated explicit-failure-value records.

Pins one artifact only after validating it against an immutable path source.

Returns the pinned run's exact effective prelude sources.

Constructs a bounded TraceLog for the source and executes one query.

Types

inspection_grant()

@opaque inspection_grant()

inspection_trace_source()

@type inspection_trace_source() ::
  {:file | :directory | :private_file | :private_directory, binary()}

Functions

conversation(grant, run_id)

@spec conversation(inspection_grant(), binary()) :: {:ok, map()} | {:error, atom()}

Builds a semantic conversation from the pinned, already validated records.

execution_errors(grant, run_id)

@spec execution_errors(inspection_grant(), binary()) ::
  {:ok, map()} | {:error, atom()}

Returns the pinned run's authorized workflow execution-error records.

explicit_failure_values(grant, run_id)

@spec explicit_failure_values(inspection_grant(), binary()) ::
  {:ok, map()} | {:error, atom()}

Returns the pinned run's dedicated explicit-failure-value records.

pin_inspection(path, trace_source)

Pins one artifact only after validating it against an immutable path source.

preludes(grant, run_id)

@spec preludes(inspection_grant(), binary()) :: {:ok, map()} | {:error, atom()}

Returns the pinned run's exact effective prelude sources.

query(source, operation, arguments)

@spec query(PtcRunner.Kernel.TraceLog.source(), atom(), map()) ::
  {:ok, map()} | {:error, atom()}

Constructs a bounded TraceLog for the source and executes one query.