pub fn render_gift_advisory(
state: &LedgerState,
year: i32,
prior_taxable_gifts: Usd,
tables: &impl TaxTables,
) -> Option<String>Expand description
P2-C Task 3 (D3): Form 709 gift per-donee advisory (§2503(b) annual exclusion applied independently per donee, not in aggregate).
Groups Removal{Gift} legs by their donee label for year:
Nonewhen there are NO Gift removals in the year (even with a table present). [R0-I2]Some(note)[R0-m6] when gifts ARE present but the year has NO bundled table (exclusion unavailable): Form 709 exposure is NOT evaluated — do NOT silently returnNone.Some(advisory)for all other cases: per-labeled-donee §2503(b) breakdown (each donee’s total vs the per-donee exclusion; filing trigger fires when ANY labeled donee exceeds the exclusion), plus an unlabeled-bucket caveat when anyNone-donee gifts exist.
Why per-donee matters (§2503(b)): the exclusion applies to each recipient independently. Two donees at $15k each with a $19k exclusion → $0 taxable (the old aggregate was WRONG: it would flag the $30k combined total, even though neither donee exceeded their exclusion).
Unlabeled bucket: None-donee gifts cannot have per-donee exclusion applied; a conservative
aggregate-vs-one-exclusion signal is emitted with an explicit caveat. Nothing is silently dropped.
Donations excluded: Removal{Donation} (§170) must NOT appear here — this advisory is for
§2503(b) Gifts only. kind == Gift filter enforces this.
Standalone informational artifact — does NOT feed compute_tax_year / engine B.