cadrumo.application.filing.draft_review_ports module

Application-owned capabilities for draft approval and stale detection.

The draft-review lifecycle fingerprints several persisted authorities. This module keeps that use case independent from the encrypted-storage adapters and gives composition roots one cohesive bundle to bind for a profile bucket.

Core types: ModeloDraft.

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

Bases: Protocol

Read-only profile projection used by the approval-basis fingerprint.

load_path_values(*, bucket_id)[source]

Return canonical profile path values, or None when absent.

Return type:

Mapping[str, str] | None

Parameters:

bucket_id (str)

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

Bases: Protocol

Read-only draft store capability used by the review queue.

iter_drafts()[source]

Yield the bucket’s persisted drafts.

Return type:

Iterator[ModeloDraft]

envelope_path_for(identifier)[source]

Return the non-secret logical path marker for one draft.

Return type:

Path

Parameters:

identifier (str)

class DraftReviewPorts(transaction_repository, invoice_repository, observation_repository, profile_repository, draft_repository)[source]

Bases: object

Required persisted authorities for one draft-review invocation.

Parameters:
transaction_repository: TransactionCatalogueRepositoryProtocol
invoice_repository: InvoiceCatalogueRepositoryProtocol
observation_repository: CalculationObservationRepositoryProtocol
profile_repository: DraftReviewProfileRepositoryProtocol
draft_repository: DraftReviewDraftRepositoryProtocol
class DraftReviewPortsFactory(*args, **kwargs)[source]

Bases: Protocol

Construct the draft-review authorities for one profile bucket.