exlab_wizard.ui.components.validation_summary#

Validation summary block (Frontend Spec §3.6.4, §11.4.1).

Renders the per-run validation snapshot in the detail pane:

  • Header line “⚠ N hard-tier findings” in --color-warning (or the soft-only / override variants).

  • First two findings as one-line excerpts (rule + matched-token).

  • Optional “+ N more in Problems” link when more findings exist.

  • Override summary line when an override is active.

Functions

excerpt_line(finding)

Compose one-line text for a finding excerpt (Frontend §3.6.4).

header_line(summary)

Return (text, color_var) for the section header.

overflow_line(summary)

Return the "+ N more in Problems" line, or None if not needed.

override_line(summary)

Return the override summary line if an override is active.

validation_summary(summary)

Build the summary block.

Classes

FindingExcerpt(rule, matched_token)

A single finding row used in the summary.

ValidationSummary(hard_count, soft_count, ...)

Inputs to the summary block.

class exlab_wizard.ui.components.validation_summary.FindingExcerpt(rule, matched_token)[source]#

Bases: object

A single finding row used in the summary.

Parameters:
  • rule (str)

  • matched_token (str)

matched_token: str#
rule: str#
class exlab_wizard.ui.components.validation_summary.ValidationSummary(hard_count, soft_count, excerpts, override_active=False, override_reason_snippet=None, override_operator=None, override_set_at=None)[source]#

Bases: object

Inputs to the summary block.

Parameters:
excerpts: tuple[FindingExcerpt, ...]#
hard_count: int#
override_active: bool = False#
override_operator: str | None = None#
override_reason_snippet: str | None = None#
override_set_at: str | None = None#
soft_count: int#
exlab_wizard.ui.components.validation_summary.excerpt_line(finding)[source]#

Compose one-line text for a finding excerpt (Frontend §3.6.4).

Parameters:

finding (FindingExcerpt)

Return type:

str

exlab_wizard.ui.components.validation_summary.header_line(summary)[source]#

Return (text, color_var) for the section header.

Parameters:

summary (ValidationSummary)

Return type:

tuple[str, str]

exlab_wizard.ui.components.validation_summary.overflow_line(summary)[source]#

Return the “+ N more in Problems” line, or None if not needed.

Frontend §3.6.4: at most two excerpts are rendered; remaining findings collapse into a single overflow line.

Parameters:

summary (ValidationSummary)

Return type:

str | None

exlab_wizard.ui.components.validation_summary.override_line(summary)[source]#

Return the override summary line if an override is active.

Parameters:

summary (ValidationSummary)

Return type:

str | None

exlab_wizard.ui.components.validation_summary.validation_summary(summary)[source]#

Build the summary block.

Parameters:

summary (ValidationSummary)

Return type:

Any