# `PtcRunner.Kernel.DiagnosticCatalog`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/kernel/diagnostic_catalog.ex#L1)

Authoritative closed V1 command diagnostic catalog.

Each row owns the phase, code, exit status, retryability, and bounded default
message. Renderers and schemas derive their admitted pairs from this table;
lower-level reasons never add a public code.

# `phase`

```elixir
@type phase() ::
  :arguments
  | :project
  | :host
  | :application
  | :bundle
  | :provider_declaration
  | :destination
  | :local_preflight
  | :active_preflight
  | :provider_acquisition
  | :execution
  | :result_cleanup
  | :publication
  | :internal
```

# `row`

```elixir
@type row() :: %{
  phase: phase(),
  code: atom(),
  exit_status: 2 | 3 | 4 | 5 | 6 | 7 | 70,
  retryable: boolean(),
  message: binary()
}
```

# `compound_precedence`

```elixir
@spec compound_precedence(phase(), atom()) ::
  {:ok, {1..8, non_neg_integer()}} | :error
```

Returns the closed compound-failure precedence key for a catalog pair.

Lower keys have higher precedence. `:error` identifies preparation-only
diagnostics that cannot participate in a compound outcome.

# `fetch`

```elixir
@spec fetch(phase(), atom()) :: {:ok, row()} | :error
```

# `fetch!`

```elixir
@spec fetch!(phase(), atom()) :: row()
```

# `path_policy`

```elixir
@spec path_policy(phase(), atom(), atom() | nil) :: :optional | :forbidden
```

# `provider_activity_policy`

```elixir
@spec provider_activity_policy(phase(), atom()) :: false | true | :boolean
```

# `rows`

```elixir
@spec rows() :: [row()]
```

# `source_kinds`

```elixir
@spec source_kinds(phase(), atom()) :: [atom()]
```

# `subject_occurrence_policy`

```elixir
@spec subject_occurrence_policy(phase(), atom(), atom()) ::
  :required | :optional | :forbidden
```

# `subject_operations`

```elixir
@spec subject_operations(phase(), atom()) :: [atom()]
```

# `subject_policy`

```elixir
@spec subject_policy(phase(), atom()) :: :required | :optional | :forbidden
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
