cadrumo.application.live.filed_history_operation module

Recorded supervision for the canonical filed-history pull composition.

Core types: TaxpayerProfile.

class FiledHistoryOperationRequest(**data)[source]

Bases: BaseModel

Immutable scope submitted to one recorded filed-history pull.

Parameters:
output_root: Path
today: date | None
limit: int | None
dry_run: bool
class FiledHistoryComposition(*args, **kwargs)[source]

Bases: Protocol

Outer-composed dependencies for one filed-history operation scope.

property ports: FiledObservationPersistencePorts

Return the immutable filed-observation persistence bundle.

property iva_remote_state_port: IvaRemoteStatePort

Return the composed IVA remote-state application port.

property notifications_ports: NotificationsPorts

Return the composed notifications query/persistence bundle.

property filed_data_port: FiledDataCapturePort

Return the composed filed-data acquisition port.

property certificate_secret_backend_factory: CertificateSecretBackendFactory

Return the composed certificate-secret capability factory.

property browser_session_factory: BrowserSessionFactoryPort

Return the composed browser-session capability factory.

property operator_scope_ports: OperatorScopePorts

Return the composed operator-auth storage-scope capability.

settled_filed_history_effect(run)[source]

Classify only effects the canonical result proves were committed.

Return type:

OperationEffect

Parameters:

run (FiledHistoryOnboardingRun)

class FiledHistoryEvidenceNoticeV1(**data)[source]

Bases: BaseModel

Safe public projection of one operator-facing Notice.

A narrower sibling of Notice, not that type itself: the operations public-schema contract rejects any model whose graph carries a custom serializer (Notice.context declares one), and this operation’s notices never carry an executable action in practice, so this projection omits that field entirely rather than smuggling the incompatible type through under another name.

Parameters:
severity: NoticeSeverity
code: str
message: str
context: tuple[tuple[str, str], ...] | None
class FiledHistoryPairOutcomePublicV1(**data)[source]

Bases: BaseModel

Safe public projection of one walked modelo/ejercicio pair outcome.

A distinct sibling of FiledHistoryPairOutcome, not that type itself: the private row’s shared STRICT_FROZEN_CONFIG does not set validate_default=True, which the operations public-schema contract requires, and that shared constant is not this Step’s to widen.

Parameters:
modelo: str
ejercicio: FilingYear
signals: tuple[FiledHistoryDiscoverySignal, ...]
row_count: NonNegativeInt
captured_count: NonNegativeInt
refused: bool
failure_type: str | None
failure_message: str | None
class FiledHistoryPublicResultV1(**data)[source]

Bases: BaseModel

Safe public projection of one settled FiledHistoryOnboardingRun.

A distinct type from the private result, not a passthrough: every field is independently declared here, so the public contract’s shape is owned by this module rather than mirrored from the private one it happens to resemble today.

Parameters:
dry_run: bool
captured_count: NonNegativeInt
reached_count: NonNegativeInt
scoping_signal: RegisterScopingSignal
carries_a_taxpayer_specific_denominator: bool
denominator_note: str
iva_wallet_status: str
iva_wallet_divergence: str | None
iva_wallet_blocked: bool
notificaciones_status: str
notificaciones_row_count: NonNegativeInt
stage_failures: tuple[str, ...]
sync_run_ref: SyncRunRecordReference | None
evidence_notices: tuple[FiledHistoryEvidenceNoticeV1, ...]
recapture_notices: tuple[FiledHistoryEvidenceNoticeV1, ...]
pairs: tuple[FiledHistoryPairOutcomePublicV1, ...]
class FiledHistoryOperationExecutor(*, sync_run_repository, composition_factory, pull=<function _pull_recorded_filed_history>, profile_resolver=<function _resolve_active_filed_history_profile>)[source]

Bases: object

Run the existing filed-history service under one recorded identity.

Parameters:
  • sync_run_repository (SyncRunRecordRepositoryProtocol)

  • composition_factory (FiledHistoryCompositionFactory)

  • pull (FiledHistoryPull)

  • profile_resolver (FiledHistoryProfileResolver)

async execute(request, context)[source]

Execute this public contract operation.

Return type:

str | None

Parameters:
build_filed_history_operation_definition(*, sync_run_repository_factory, composition_factory, pull=<function _pull_recorded_filed_history>, profile_resolver=<function _resolve_active_filed_history_profile>)[source]

Bind entrypoint-owned persistence to the canonical operation contract.

Return type:

OperationDefinition

Parameters:
  • sync_run_repository_factory (FiledHistorySyncRunRepositoryFactory)

  • composition_factory (FiledHistoryCompositionFactory)

  • pull (FiledHistoryPull)

  • profile_resolver (FiledHistoryProfileResolver)

build_filed_history_operation_registration(definition)[source]

Bind the filed-history definition to its stable public schemas.

The public result schema is FiledHistoryPublicResultV1, a distinct projection resolved through the registered result projector – never the private FiledHistoryOnboardingRun itself.

Return type:

OperationPublicDefinitionRegistrationV1

Parameters:

definition (OperationDefinition)