cadrumo.application.user_profile.commands module

Pydantic command and result contracts for the user-profile boundary.

Import these contracts directly from this defining module. Keeping the Pydantic records together makes their validation dependency explicit without making the user_profile package namespace a second public API.

class ProfileValidationIssue(**data)[source]

Bases: BaseModel

One validation finding raised against a profile snapshot.

Parameters:

data (Any)

severity: _BaseSeverity
code: str
path: str | None
message: _IssueMessage
class ProfileValidationReport(**data)[source]

Bases: BaseModel

Aggregate validation report for a profile or a registration command.

Parameters:

data (Any)

profile_id: ProfileId
schema_version: int
issues: tuple[ProfileValidationIssue, ...]
class ProfilePreflightRequirement(**data)[source]

Bases: BaseModel

One required-but-missing profile selector for a modelo / revision.

Parameters:

data (Any)

selector: str
section_key: str
field_key: str
label: str
legal_refs: tuple[str, ...]
modelos: tuple[str, ...]
class ProfilePreflightReport(**data)[source]

Bases: BaseModel

Per-(modelo, revision, filing_year, period) profile readiness report.

Parameters:

data (Any)

profile_id: ProfileId
modelo: str
revision_id: RevisionId
filing_year: FilingYear
period: Period
missing: tuple[ProfilePreflightRequirement, ...]
ready: bool
per_operation_requirements_assessed: bool

Whether the per-operation axis actually assessed anything for this modelo — that is, whether any schema field declaring required also declared a modelo_<code> selector matching it. When false, no schema-required field was examined, so ready reports only the export-identity and conditional checks and MUST NOT be read as a clean bill of health. Deliberately carries no default: the single producer states it, and a default would silently assert an assessment that never ran.