cadrumo.application.modelo._autonomic_deduccion_advisory module¶
Madrid nacimiento/adopción indeterminate-eligibility advisory for verification.
The Madrid nacimiento/adopción deducción autonómica (casilla 1039, DL 1/2010
arts. 4 y 18.1) auto-populates on the calculate path only for the determinable
single/monoparental individual filer
(inject_derived_autonomic_deduccion_facts());
a tributación conjunta declaration or a married/pareja-de-hecho filer is
fail-closed by design because the unidad-familiar 61.860 € límite needs the
spouse’s base imponible, which the app does not persist. That fail-closed
branch resolves casilla 1039 to zero with no operator-facing signal that the
entitlement might still exist.
This module implements the advisory: when the filer is a Madrid
resident with at least one nacimiento/adopción-eligible descendant, the unit is
indeterminate (conjunta or married/partnered), and casilla 1039 has resolved to
zero, emit a non-blocking ADVISORY prompting the operator to confirm eligibility
and consider entering the deducción manually. The finding stays advisory
because the unidad-familiar income-limit gate genuinely cannot be evaluated
from data this application holds (no-silent-under-declaration is
symmetric for a deducción: over-claim, not silence, is the hazard the
calculate-path fail-closed default already guards against; this advisory is
the surface half of that same guard).
The advisory reads the casilla-1039 semantic role and the resolved input value
off the verify-time RegistrySnapshot
for the target modelo revision, the same authority the calculate path resolves
its registry formula against.
See also
inject_derived_autonomic_deduccion_facts()The calculate-path injector whose fail-closed branch this advisory surfaces to the operator.
madrid_nacimiento_adopcion_candidate_weighted_count()Shared candidate-count primitive: evaluates only the per-descendant window/cohabitation condition, independent of the unit’s determinability.
_collect_revision_verification_findings()Verification collector that appends this advisory beside the DT 12ª / art. 20 / art. 52 / Convenio LOB advisories using the same non-blocking mechanism.
- madrid_nacimiento_adopcion_eligibility_advisory_finding(snapshot, casilla_values, *, bucket_id, operation, profile=None)[source]¶
Warn to confirm Madrid nacimiento/adopción eligibility for an indeterminate unit.
Loads the bucket’s
UserProfileRecorddirectly (the same source the calculate-path injector reads) so the verify path can see thetax_residence.ccaa/renta_taxpayer.marital_status/renta_filing.declaration_type/renta_family.descendiente.*facts thatTaxpayerProfiledoes not carry.Fires only when ALL of the following hold: the revision is the 2025 M100 filing year the first-slice registry formula covers; the filer is a Madrid resident; at least one descendant is inside the nacimiento/adopción applicability window and cohabits (the candidate weighted count is strictly positive); the unit is indeterminate (tributación conjunta or a married/pareja-de-hecho filer — the same condition that makes the calculate-path injector fail-closed); and casilla 1039 resolved to zero (the auto-trigger did not fire). A determinate single/monoparental filer whose entitlement was already auto-populated, or a unit with no eligible descendant, never fires this advisory.
Returns
Nonewhen the bucket carries no profile record, the revision does not declare the casilla-1039 semantic role, or any of the firing conditions above is not met.Core types:
RegistrySnapshot.- Return type:
- Parameters:
snapshot (RegistrySnapshot)
casilla_values (Mapping[CasillaId, Decimal])
bucket_id (str)
operation (PinnedAuthorityOperation)
profile (ModeloWorkProfile | None)
- madrid_nacimiento_adopcion_advisory_finding_for_work_unit(snapshot, casilla_values, *, work_unit, operation, profile=None)[source]¶
Convenience wrapper reading
bucket_idoff aWorkUnit.Core types:
RegistrySnapshot.- Return type:
- Parameters:
snapshot (RegistrySnapshot)
work_unit (WorkUnit)
operation (PinnedAuthorityOperation)
profile (ModeloWorkProfile | None)