cadrumo.adapters.inbound.censo.parser module¶
Inbound parser for the Certificado de Situación Censal (G313) artefact.
STRUCTURE-ONLY, extraction deliberately unpinned: the certificate’s issued
PDF layout has never been observed against a real specimen (none is
obtainable today — no certificate and no usable Clave credentials exist),
so this adapter refuses every document loudly and instructively instead of
guessing a layout and silently mis-extracting censal facts. The target
shape and the profile-fact projection are fully typed and tested in
cadrumo.domain.censo; the day a specimen arrives (through the
encrypted evidence path), the extraction lands here behind the same
signature and the refusal narrows to genuinely unrecognised documents.
The bytes route mirrors parse_justificante_bytes(): secure-storage
flows hold decrypted bytes in memory and must never materialise a
plaintext temporary file.
- parse_certificado_censal_bytes(data)[source]¶
Parse certificate bytes into a
CertificadoSituacionCensal.- Raises:
CertificadoCensalParseError – Always, today. A non-PDF payload is refused as an unrecognised document; a PDF payload is refused because the issued-certificate layout extraction is unpinned pending a real specimen. Both refusals carry a distinct locale key so the flow degrades honestly.
- Return type:
- Parameters:
data (bytes)