PtcRunner.Kernel.AnalysisProfileRegistry (PtcRunner v0.14.0)

Copy Markdown View Source

Closed registry of code-owned analysis-session authority recipes.

Profile IDs resolve only to modules compiled into PtcRunner. The registry is intentionally not configurable: callers may select an ID and supply its declared resources, but cannot install a module or widen frontend modes, sinks, components, capabilities, limits, or cleanup.

Summary

Functions

Returns the input modes and output formats reachable for one invocation.

Types

recipe()

@type recipe() :: module()

Functions

description(id)

@spec description(binary()) :: {:ok, map()} | {:error, :unsupported_analysis_profile}

fetch(id)

@spec fetch(binary()) :: {:ok, recipe()} | {:error, :unsupported_analysis_profile}

ids()

@spec ids() :: [binary()]

reachable_frontend(recipe, private_unattended \\ false)

@spec reachable_frontend(recipe(), boolean()) :: %{
  input_modes: [atom()],
  output_formats: [atom()]
}

Returns the input modes and output formats reachable for one invocation.

A profile's declared input_modes/output_formats describe its attended path only. An unattended private destination widens both, so a frontend deciding whether a combination is reachable must ask here rather than read the static declaration. Reading the static list is precisely what let #1220 through: the "jsonl requires input" guard consulted frontend.output_formats, which does not contain :jsonl for private-run-analysis-v1, so the guard skipped the very call that needed it.