cadrumo.application.aggregation._undeclared_activity_advisory module¶
Calculate-path advisory for a casilla emptied by an undeclarable activity.
An aggregation that narrows rows by declared activity produces two zeros that look identical from the casilla. One is correct: the taxpayer carried on no such activity, so the box is empty because there is nothing to put in it. The other is a silence: the taxpayer carried on income in the period, and nobody ever declared what activity it belonged to, so every row was excluded by a rule the operator has no way to satisfy.
The exclusion rule itself is CORRECT and this module does not touch it. A row
with no declared activity must not enter an activity-scoped casilla: admitting it
would route a filer’s income into a box their activity may not answer to, and
that is the over-declaration error — strictly worse than an under-filled box the
operator can still complete by hand. What was missing is any statement that the
box is empty for that reason, which is what makes the zero a silent one
(no-silent-under-declaration).
So the advisory asserts nothing about the excluded income. It does not say the income is agrarian, or that it belongs in the casilla, because nothing on the ledger establishes either — that absence IS the finding. It says only what is measured: this period carries income the casilla did not admit, and no activity is declared for any of it.
Grounded from the registry rather than from prose. The casilla’s own
legal_refs / source_refs and those of the binding that feeds it ride the
diagnostic as typed data, read off the
ModeloRevision the resolver already holds.
Restating an article here would mint a second, unversioned copy of grounding the
registry owns, and would silently stop matching the moment a revision re-grounds
the box.
Fires narrowly, and the narrowness is the whole value. Three conditions must hold together, and each one excludes a population that would otherwise be told something useless:
a narrowing actually ran, so the Modelo 130 and Modelo 100 paths are silent;
the narrowing excluded at least one row, so a filer with NO activity at all in the period is never flagged — that filer’s zero is the correct one, and an advisory on it would fire on every inactive quarter and train the operator to ignore the channel on the quarter where it is genuinely right;
not one excluded row declares an activity, so a filer who HAS declared some other activity is silent — they answered the question, and their empty box is the correct answer to it.
- UNDECLARED_ACTIVITY_INCOME_SOURCE_KIND: Final[str]¶
Diagnostic
source_kindfor a casilla emptied entirely by an activity narrowing over income whose activity nobody declared.
- undeclared_activity_income_advisory_observations(aggregation, revision, *, resolver_id=None)[source]¶
Return an advisory when an activity narrowing emptied a casilla in silence.
- Parameters:
aggregation (
RentaIncomeLedgerAggregation) – The income aggregation whoseunadmitted_activity_incomecensus measures what the narrowing kept out.Nonethere means no narrowing ran and the advisory is silent.revision (
ModeloRevision) – TheModeloRevisionbeing calculated, read for the casilla and binding grounding the advisory carries. Never for a legal figure — the refs are identifiers, and the provisions behind them stay in the legal catalogue.resolver_id (
str|None) – Identifier of the resolver emitting the diagnostic, stamped on so an operator can attribute the advisory to the source that raised it.
- Return type:
- Returns:
A one-element tuple carrying the advisory, or an empty tuple whenever the casilla’s zero is an answer rather than a silence.