aeat.application.wizard._verifier module

Post-persistence verification for wizard flows.

After persist_answers writes a flow’s answers into ProfileRecord, the verifier runs a closed set of WizardCheck records against the typed projection and emits one WizardCheckFinding per check. Findings carry a severity and a translation key so renderers can localise the outcome.

Each check is a pure function (BaseModel) -> WizardCheckFinding; the verifier accumulates the per-check findings into a WizardCheckReport and returns it as a frozen record.

class WizardCheckSeverity(*values)[source]

Bases: StrEnum

Severity classification for one WizardCheckFinding.

OK
WARNING
ERROR
class WizardCheckFinding(**data)[source]

Bases: BaseModel

One verdict produced by a single WizardCheck.

Parameters:
name: str
severity: WizardCheckSeverity
message_key: str
class WizardCheckReport(**data)[source]

Bases: BaseModel

The closed verifier outcome for one flow.

Parameters:

findings (tuple[WizardCheckFinding, ...])

findings: tuple[WizardCheckFinding, ...]
property has_errors: bool

True when any finding is an ERROR.

class WizardCheck(**data)[source]

Bases: BaseModel

One declarative check the verifier runs against the typed projection.

Parameters:
  • name (str)

  • message_key (str)

name: str
message_key: str
verify_setup_answers(answers)[source]

Run the closed setup-flow check set against answers.

Returns a WizardCheckReport with the per-check finding verdicts for all registered setup checks.

Return type:

WizardCheckReport

Parameters:

answers (SetupAnswers)