Skip to content

fix(congressional): make aggregate cash and mutual funds optional - #408

Merged
benbenbang merged 1 commit into
mainfrom
fix/407-networth-agg
Oct 2, 2026
Merged

benbenbang merged 1 commit into
mainfrom
fix/407-networth-agg

Conversation

@benbenbang

Copy link
Copy Markdown
Member

This commit corrects CongressionalMemberNetWorthAggregate decoding after a survey for #407 found cashAndCashEquivalents and mutualFundsAndETFs absent on live rows, so both are now optional and decode as None when the key is missing instead of failing.

Optional members:

  • cash_and_cash_equivalents and mutual_funds_and_etfs become Option / pointer / Optional across the Rust, Go, and Python models and must now be handled as nullable.

New typed columns and overflow map:

  • Add typed columns pension_and_retirement_assets, other_amount (wire Other), other_assets, salary_and_wages, trusts, and government_securities for the most frequent extra fields.
  • Keep every remaining untyped column in a new additional_columns map rather than dropping it, so open-ended rows round-trip.

Tests and docs:

  • Extend the aggregated fixture and parity tests to cover absent cash, absent mutual funds, typed columns, and additional_columns.
  • Record the rule and survey in ADR 0033.

close #407

BREAKING CHANGE: CongressionalMemberNetWorthAggregate.cash_and_cash_equivalents and mutual_funds_and_etfs are now optional (Option / pointer / Optional); handle None. New typed columns (pension_and_retirement_assets, other_amount for wire Other, other_assets, salary_and_wages, trusts, government_securities) and an additional_columns map are added.

This commit corrects CongressionalMemberNetWorthAggregate decoding after a survey for #407 found cashAndCashEquivalents and mutualFundsAndETFs absent on live rows, so both are now optional and decode as None when the key is missing instead of failing.

**Optional members:**
* cash_and_cash_equivalents and mutual_funds_and_etfs become Option / pointer / Optional across the Rust, Go, and Python models and must now be handled as nullable.

**New typed columns and overflow map:**
* Add typed columns pension_and_retirement_assets, other_amount (wire Other), other_assets, salary_and_wages, trusts, and government_securities for the most frequent extra fields.
* Keep every remaining untyped column in a new additional_columns map rather than dropping it, so open-ended rows round-trip.

**Tests and docs:**
* Extend the aggregated fixture and parity tests to cover absent cash, absent mutual funds, typed columns, and additional_columns.
* Record the rule and survey in ADR 0033.

close #407

BREAKING CHANGE: CongressionalMemberNetWorthAggregate.cash_and_cash_equivalents and mutual_funds_and_etfs are now optional (Option / pointer / Optional); handle None. New typed columns (pension_and_retirement_assets, other_amount for wire Other, other_assets, salary_and_wages, trusts, government_securities) and an additional_columns map are added.
@benbenbang
benbenbang enabled auto-merge (rebase) October 2, 2026 09:21
@github-actions github-actions Bot added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 2, 2026
@benbenbang
benbenbang merged commit 5a06df5 into main Oct 2, 2026
9 checks passed
@benbenbang
benbenbang deleted the fix/407-networth-agg branch October 2, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(congressional): aggregate net worth fails on absent cash/mutual funds and drops columns

1 participant