aeat.application.workflow._events module¶
Bucket-event emission for workflow-state lifecycle transitions.
Currently owns the workflow_state.reset emission path used by the
aeat config repair reset-progress recovery route. The fingerprint
payload mirrors the row-level metadata of the discarded envelope plus
the actor/source/timestamp captured by the boundary; the plaintext
envelope content is never recorded. Events are appended to the
BucketEventHistoryRepository via emit_workflow_state_reset().
See also
WorkflowStateRepositoryComputes
WorkflowStateResetFingerprintrecords and calls this module before deleting the workflow-state envelope.aeat.application.workflow._persistence.reset_workflow_state()Public helper used by the
config repair reset-progresscommand to execute the emit-before-delete recovery route.BucketEventImmutable audit event emitted for
workflow_state.reset.BucketEventHistoryRepositoryAppend-only secure repository that stores the reset event.
- class WorkflowStateResetFingerprint(**data)[source]¶
Bases:
BaseModelRow-level fingerprint of a discarded workflow-state envelope.
Captured before the row is deleted so the operator-visible audit trail records what was discarded without retaining any plaintext payload.
reason_classclassifies the discarded envelope:"readable"when it decrypts and validates cleanly,"unreadable"when the row exists but cannot be decoded, and"absent"when no envelope row is present.- Parameters:
- schema_version: int | None¶
- written_at: datetime | None¶
- byte_length: int | None¶
- reason_class: str¶
- recovered_bucket_id: str | None¶
- class WorkflowStateResetEvent(**data)[source]¶
Bases:
BaseModelTyped payload for the
workflow_state.resetbucket event.- Parameters:
fingerprint (WorkflowStateResetFingerprint)
actor (str)
source (str)
timestamp (datetime)
- fingerprint: WorkflowStateResetFingerprint¶
- actor: str¶
- source: str¶
- timestamp: datetime¶
- emit_workflow_state_reset(*, fingerprint, actor, source)[source]¶
Append
workflow_state.resetto history and return theBucketEvent.The event is recorded against the recovered bucket id when one survives on the fingerprint, or against the system bucket otherwise.
- Return type:
- Parameters:
fingerprint (WorkflowStateResetFingerprint)
actor (str)
source (str)