phenotypic.gui.builder._validation.Issue#

class phenotypic.gui.builder._validation.Issue(kind: ~typing.Literal['fork', 'stub', 'required_aux', 'cycle', 'container_mode', 'missing_input', 'duplicate_input', 'stage_order_hint', 'unknown_class', 'unsupported_linear'], block_id: str | None, detail: str, scope_path: ~typing.List[str] = <factory>, severity: ~typing.Literal['error', 'advisory'] = 'error')[source]#

Bases: object

A single validation finding for a block or scope.

Parameters:
  • kind (Literal['fork', 'stub', 'required_aux', 'cycle', 'container_mode', 'missing_input', 'duplicate_input', 'stage_order_hint', 'unknown_class', 'unsupported_linear'])

  • block_id (str | None)

  • detail (str)

  • scope_path (List[str])

  • severity (Literal['error', 'advisory'])

kind#

One of the nine taxonomy entries (see IssueKind). The first seven are blocking errors that disable preview/save; stage_order_hint is advisory and decorates with a yellow border instead of red. unknown_class and unsupported_linear are blocking because the runtime cannot safely materialize a pipeline from them.

Type:

Literal[‘fork’, ‘stub’, ‘required_aux’, ‘cycle’, ‘container_mode’, ‘missing_input’, ‘duplicate_input’, ‘stage_order_hint’, ‘unknown_class’, ‘unsupported_linear’]

block_id#

None for scope-level findings (the only one that actually uses None is missing_input); otherwise the offender’s block id.

Type:

str | None

detail#

Free-form human-readable explanation. Used by tooltips and toasts; not part of the test-normalisation key.

Type:

str

scope_path#

List of container block_id values walked from the root scope to the offender’s scope. Empty when the issue lives in the root scope. The UI consumes this to pan/zoom across container boundaries when a badge is clicked.

Type:

List[str]

severity#

"error" for the seven blocking rules, "advisory" for stage_order_hint. Populated by the rule that emits the issue; callers gate Run/Save by filtering on this field.

Type:

Literal[‘error’, ‘advisory’]

Methods

__init__

Attributes

kind: Literal['fork', 'stub', 'required_aux', 'cycle', 'container_mode', 'missing_input', 'duplicate_input', 'stage_order_hint', 'unknown_class', 'unsupported_linear']#
block_id: str | None#
detail: str#
scope_path: List[str]#
severity: Literal['error', 'advisory'] = 'error'#