cadrumo.application.modelo.workflow_gate_ports module

Application-owned capabilities required by the Modelo workflow gate.

The workflow gate builds and persists a filing draft and gives the submission preflight engine a read-only view of historical submissions. Those two surfaces are application contracts; encrypted repository construction belongs to an outer composition root.

exception WorkflowGatePersistenceError(operation)[source]

Bases: CadrumoError

Translated persistence failure raised by a workflow-gate capability.

Parameters:

operation (str)

Return type:

None

code
class WorkflowGateDraftRepositoryProtocol(*args, **kwargs)[source]

Bases: Protocol

Write capability for the bucket-scoped filing-draft store.

save(payload, /)[source]

Persist one approved draft.

Core types: ModeloDraft.

Return type:

None

Parameters:

payload (ModeloDraft)

class WorkflowGateSubmissionRepositoryProtocol(*args, **kwargs)[source]

Bases: Protocol

Read capability for historical submission records.

load(record_id, /)[source]

Load one historical submission by stable identifier.

Return type:

ModeloPresentado | None

Parameters:

record_id (str)

iter_submissions()[source]

Yield persisted submission records in stable order.

Return type:

Iterator[ModeloPresentado]

list_submission_ids()[source]

Return all persisted submission identifiers.

Return type:

tuple[str, ...]

class WorkflowGatePorts(draft_repository, submission_repository)[source]

Bases: object

Required persistence capabilities for one workflow-gate invocation.

Parameters:
draft_repository: WorkflowGateDraftRepositoryProtocol
submission_repository: WorkflowGateSubmissionRepositoryProtocol