aeat.adapters.outbound.aeat.sede._renta_web_open module

Read-only Renta WEB Open browser driver for the AEAT electronic office.

Drives the AEAT Renta WEB Open anonymous simulator — a publicly accessible ZK-framework web application that lets an operator open a synthetic IRPF (personal income tax) declaration, populate casilla (numbered form field) inputs, and read back the computed summary values without creating a real submission.

The driver is strictly read-only for tax-filing purposes: it never presents, signs, or submits a declaration. It uses the open (no-auth) simulator path so no citizen credential is required. The computed values are returned as a RentaWebOpenObservation for use by the registry oracle comparison gate.

Key public surfaces:

class RentaWebOpenSedeDriver(*, settings=None)[source]

Bases: object

Renta WEB Open driver backed by the central AEAT BrowserSession surface.

Parameters:

settings (Settings | None)

property mode: Literal['live']

Always "live" — the driver requires a real Playwright session.

planned_operations(payload, *, expected)[source]

Return the ordered sequence of remote operations this driver will perform.

Deserialises payload via parse_renta_web_open_live_payload() and builds the RemoteOperation list: navigate to the app URL, start the open simulator, fill the identification profile, accept, apply any casilla-id-keyed overrides, navigate to the Resumen, scrape summary labels declared by canonical casilla id, navigate to any extra display-number scrape targets, and finally close the browser context.

Return type:

tuple[RemoteOperation, ...]

Parameters:
collect_observation(payload, *, expected)[source]

Run the async driver synchronously and return a RentaWebOpenObservation.

Wraps collect_observation_async() in asyncio.run. SedeError, SiteHealthError, and BrowserError are re-raised as RegistryValidationError so the registry oracle layer sees a uniform failure type.

Return type:

RentaWebOpenObservation

Parameters:
async collect_observation_async(payload, *, expected)[source]

Return a RentaWebOpenObservation by delegating to the functional collector.

Return type:

RentaWebOpenObservation

Parameters:
async collect_renta_web_open_observation(payload, *, expected, settings=None)[source]

Open the anonymous simulator, create a synthetic declaration, and return a RentaWebOpenObservation.

Return type:

RentaWebOpenObservation

Parameters:
extract_renta_web_open_summary_value(body_text, label)[source]

Extract one Spanish-formatted numeric value from Renta WEB Open summary text.

Return type:

str | None

Parameters: