aeat.application.workflow package¶
Public facade for workflow runs and profile-bucket discovery.
The workflow engine surface composes auth, filing, draft-building, and
submission collaborators into resumable modelo runs. A
WorkflowEngine advances
WorkflowStage values and persists
WorkflowResult records through
WorkflowRunRepository. The companion
WorkflowState envelope carries progress
pointers, auth readiness, review annotations, and bucket events; it does not
store profile facts or profile-value maps.
The profile-discovery surface is manifest-backed and intentionally cheap.
list_profile_buckets(),
read_profile_bucket(),
read_profile_bucket_by_id(), and
resolve_profile_bucket() scan plaintext
bucket manifests and return
ProfileBucketPointer records without
opening an encrypted database. The scanners resolve immutable bucket UUIDs
and operator labels, filter tombstoned buckets from live surfaces by default,
and leave tombstoned-by-id inspection to diagnostics and repair callers.
Active-profile status and repair use the redacted
ActiveProfileHealth projection;
sensitive profile records are loaded only through the active bucket and the
user-profile orchestration layer.
Workflow persistence is likewise bucket-scoped.
workflow_state_repository() binds the
state envelope to the currently resolved active bucket via the storage
runtime’s secure-object repository. A cold root with no active pointer is the
only bootstrap exception, so recovery and status probes can observe an absent
state without manufacturing a profile bucket. Reset helpers
fingerprint_workflow_state() and
reset_workflow_state() operate on the
workflow-state row only: they emit a plaintext-free
WorkflowStateResetFingerprint and append
the workflow_state.reset bucket event before deleting the encrypted row.
This initializer is only the public re-export boundary. Manifest parsing stays
in _profile_bucket_scan; health projection and
pointer repair stay in _profile_health;
encrypted state and run storage stay behind
WorkflowStateRepository and
WorkflowRunRepository; and engine
orchestration stays in _engine. Callers must
not duplicate pointer parsing, manifest resolution, secure-repository opening,
SQL routing, or master-key handling here. The active-profile refusal
NoActiveProfileError remains core-owned and is imported from
core.errors.
See also
WorkflowState: Encrypted progress,readiness, review, and event state for the active bucket.
WorkflowResult: Persisted terminalresult for one modelo workflow run.
resume_modelo_workflow(): Build theresume context for a persisted aborted workflow run.
resolve_modelo_workflow_resume_target():Resolve exact run ids, exact work-unit ids, calculation revisions, or visible modelo selectors to one resumable workflow run target.
list_profile_buckets(): Enumerate livemanifest-backed profile buckets without opening secure storage.
assess_active_profile_health(): Producethe redacted active-profile status used by CLI status surfaces.
workflow_state_repository(): Resolve theactive-bucket secure-object repository for encrypted workflow state.
WorkflowStateResetFingerprint: Redactedreset audit record produced before workflow-state deletion.
DeadlineEngineProtocol: Protocolboundary for pluggable deadline calculation collaborators.
Submodules¶
- aeat.application.workflow._adapters module
- aeat.application.workflow._deadline_stage module
- aeat.application.workflow._engine module
- aeat.application.workflow._engine_helpers module
- aeat.application.workflow._engine_recording module
- aeat.application.workflow._errors module
- aeat.application.workflow._events module
- aeat.application.workflow._models module
- Import ordering note
WorkflowStageWorkflowPurposeWorkflowAbortReasonWorkflowAbortReason.NO_PENDING_OBLIGATIONWorkflowAbortReason.INBOX_BLOCKING_REQUERIMIENTOWorkflowAbortReason.DEADLINE_PASSEDWorkflowAbortReason.ALREADY_FILEDWorkflowAbortReason.DRAFT_HAS_ERRORSWorkflowAbortReason.PREFLIGHT_FAILEDWorkflowAbortReason.CERT_INVALIDWorkflowAbortReason.USER_CANCELLEDWorkflowAbortReason.SITE_UNAVAILABLEWorkflowAbortReason.UNHANDLED_EXCEPTION
DeclaracionPointerProfileBucketPointerdeclaration_key()WorkflowStateactive_transaction_catalogue_repository()update_declaration_pointer()SiteHealthAlertWorkflowStepDetailsWorkflowStepWorkflowResultcompute_run_id()
- aeat.application.workflow._persistence module
- aeat.application.workflow._profile_bucket_scan module
- aeat.application.workflow._profile_health module
ActiveProfileHealthActiveProfileHealth.active_profileActiveProfileHealth.sourceActiveProfileHealth.statusActiveProfileHealth.registered_bucketActiveProfileHealth.profile_record_presentActiveProfileHealth.profile_record_errorActiveProfileHealth.profile_present_keysActiveProfileHealth.profile_total_keysActiveProfileHealth.missing_requiredActiveProfileHealth.repairable_by_clearing_pointerActiveProfileHealth.next_action
ActiveProfileRepairResultassess_active_profile_health()repair_active_profile_pointer()
- aeat.application.workflow._protocols module
- aeat.application.workflow._resume module
WorkflowResumeRefusedErrorWorkflowResumeRunAmbiguousErrorWorkflowResumeRunCandidateWorkflowResumeRunCandidate.run_idWorkflowResumeRunCandidate.modeloWorkflowResumeRunCandidate.periodWorkflowResumeRunCandidate.final_stageWorkflowResumeRunCandidate.aborted_reasonWorkflowResumeRunCandidate.started_atWorkflowResumeRunCandidate.short_work_unit_idWorkflowResumeRunCandidate.work_unit_id
WorkflowResumeTargetResolutionWorkflowResumeTargetResolution.run_idWorkflowResumeTargetResolution.sourceWorkflowResumeTargetResolution.modeloWorkflowResumeTargetResolution.periodWorkflowResumeTargetResolution.filing_yearWorkflowResumeTargetResolution.work_unit_idWorkflowResumeTargetResolution.short_work_unit_idWorkflowResumeTargetResolution.calculation_revision_idWorkflowResumeTargetResolution.short_calculation_revision_id
WorkflowResumeContextresume_modelo_workflow()resolve_modelo_workflow_resume_target()find_latest_run_for_period()find_unique_run_for_period()resolve_modelo_workflow_run_for_resume()resolve_modelo_visible_workflow_run_for_resume()resolve_modelo_exact_workflow_run_for_resume()workflow_resume_candidate_lines()
- aeat.application.workflow._utils module