cadrumo.application.wizard.results module

Typed --json results for setup-wizard success emitters.

These two classes are the actual runtime payload the wizard’s success emitters build and validate (see application.wizard.commands). Each is a strict OutputSchema subclass at its true owner — the wizard, not the CLI transport — because the CLI package sits above application.wizard in the accepted hexagonal direction and the wizard cannot reach back up into an entrypoints.cli payload module for a class to construct.

Before this module existed, entrypoints.cli.config_payloads carried a same-shaped pair of classes purely to satisfy the CLI-leaf-has-a-registered- schema conformance gate; nothing ever imported or constructed them, and the wizard emitted an untyped dict instead. A field drifting between the two therefore failed silently. Constructing ConfigProfileCreateResult / ConfigProfileEditResult now IS the strict validation, enforced at every emit rather than only by a structural CLI-tree-vs-registry test.

class ProfileWizardStatus(*values)[source]

Bases: StrEnum

Closed outcome vocabulary for the profile create / edit envelopes.

status is a machine-readable contract token, not display prose. The interactive wizard resolved it through the active locale while the profile-manager close path wrote literal English, so the two commands emitted the same envelope shape with different status values for any non-English operator – an automation branch on status was correct in exactly one locale. The localized verb belongs on the envelope’s text lines and notices, which is where both surfaces already render it.

CREATED
UPDATED
UNCHANGED

every supplied value already matched the stored record. Distinct from UPDATED because an automation branching on the outcome must be able to tell a real write from a request that changed nothing – reporting both as updated claimed a revision the record never gained.

Type:

The command was accepted and published nothing

ABANDONED
class ConfigProfileCreateResult(**data)[source]

Bases: OutputSchema

JSON envelope for the profile-creation command.

The successful create payload carries the active profile label. Any forward guidance belongs to a typed envelope notice, never a bespoke next field or an executable text recommendation.

Parameters:
profile_name: str
status: ProfileWizardStatus
active_profile: str | None
class ConfigProfileEditResult(**data)[source]

Bases: OutputSchema

JSON envelope for aeat config profile edit.

The post-edit next-step hint is surfaced on the envelope notices channel, not as a bespoke next field. The payload reports only the edited profile name and mutation status; edited facts remain in secure profile storage.

Parameters:
profile_name: str
status: ProfileWizardStatus