aeat.application.workflow._profile_health module

Active-profile health projection shared by status, auth, and repair surfaces.

assess_active_profile_health() reads the persisted UserProfileRecord from the active bucket and returns an ActiveProfileHealth verdict used by every operator status surface.

See also

ProfileBucketPointer

Manifest-backed active-bucket pointer resolved before secure profile records are loaded.

application.workflow._profile_bucket_scan

Reads plaintext bucket manifests without opening encrypted storage.

WorkflowState

Supplies the active profile record through the secure workflow-state repository when the active bucket is readable.

UserProfileRecord

Encrypted profile facts whose completeness determines the final health status.

ProjectionActiveProfile

Operator-state projection that carries this redacted health verdict to status and diagnostics surfaces.

class ActiveProfileHealth(**data)[source]

Bases: BaseModel

Redacted active-profile health snapshot returned by assess_active_profile_health().

Parameters:
  • active_profile (str | None)

  • source (Literal['none', 'env_override', 'pointer'])

  • status (Literal['none', 'dangling_pointer', 'missing_profile_record', 'profile_record_unreadable', 'manifest_unreadable', 'incomplete', 'ready'])

  • registered_bucket (bool)

  • profile_record_present (bool)

  • profile_record_error (str)

  • profile_present_keys (int)

  • profile_total_keys (int)

  • missing_required (tuple[str, ...])

  • repairable_by_clearing_pointer (bool)

  • next_action (str)

active_profile: str | None
source: ProfileSource
status: ProfileHealthStatus
registered_bucket: bool
profile_record_present: bool
profile_record_error: str
profile_present_keys: int
profile_total_keys: int
missing_required: tuple[str, ...]
repairable_by_clearing_pointer: bool
next_action: str
class ActiveProfileRepairResult(**data)[source]

Bases: BaseModel

Result of a safe active-profile pointer repair probe/action.

Parameters:
dry_run: bool
cleared_pointer: bool
before: ActiveProfileHealth
after: ActiveProfileHealth | None
assess_active_profile_health(state=None)[source]

Return a redacted, non-secret ActiveProfileHealth projection for the active profile.

Return type:

ActiveProfileHealth

Parameters:

state (WorkflowState | None)

repair_active_profile_pointer(*, clear_active, confirmed)[source]

Clear a degraded pointer-file active profile when explicitly confirmed.

Returns an ActiveProfileRepairResult.

Return type:

ActiveProfileRepairResult

Parameters: