cadrumo.application.review.operator module¶
Operator-facing projections for the read-only review queue.
Projects ReviewQueue items into ReviewQueueRow records grouped
in a ReviewQueueReport, carrying the active BucketId and the
public BindingSourceKind selector vocabulary for CLI rendering.
- class ReviewQueueRow(**data)[source]¶
Bases:
BaseModelCLI-ready read-only review queue row.
- Parameters:
data (Any)
- item_id: str¶
- kind: str¶
- source_kind: str | None¶
- affected_object_id: str¶
- bucket_id: BucketId¶
- modelo: str | None¶
- period: str | None¶
- severity: ReviewSeverity¶
- state: ReviewState¶
- blocking: bool¶
- reason: str¶
- current_owner_surface: str¶
- canonical_next_command: str¶
- since: UtcInstant¶
The originating review item’s instant, carried under the same contract.
Every
ReviewItemvalidatessinceas UTC-aware, and this projection is the only thing between that record and the wire. Declared as a baredatetimeit re-admitted the naive and non-UTC values the canonical queue refuses, and cross-source sorting is only deterministic while every row’s instant is comparable.
- summary: str¶
- legal_refs: tuple[LegalRefId, ...]¶
Legal references (BOE permalinks or canonical IDs) justifying the finding.
Populated for
modelo_findingitems from the underlyingreferences_rules. Empty for transaction / invoice items where the obligation is not directly grounded in a registry legal reference.
- class ReviewQueueReport(**data)[source]¶
Bases:
BaseModelRead-only review queue report.
- Parameters:
data (Any)
- rows: tuple[ReviewQueueRow, ...]¶
- project_review_queue(*, settings=None, kinds=(), source_kinds=(), state=ReviewState.PENDING, modelo=None, confidence_below=None, ports)[source]¶
Return a
ReviewQueueReportusing accepted source-kind vocabulary.When
confidence_belowis set, the queue narrows to classified transactions whoseclassification_confidenceis non-None and strictly below the threshold, so the operator can triage the lowest-confidence classifications first (seecollect()). Invoice and finding rows carry no decision-confidence and are excluded while the filter is active.- Return type:
- Parameters:
settings (Settings | None)
state (ReviewState)
modelo (str | None)
confidence_below (Decimal | None)
ports (DraftReviewPorts)
- project_review_item(item_id, *, settings=None, ports)[source]¶
Return one review row by id.
Returns a
ReviewQueueRowmatchingitem_id.- Return type:
- Parameters:
item_id (str)
settings (Settings | None)
ports (DraftReviewPorts)