Skip to content

Stop income imputation scaling housing costs#375

Draft
MaxGhenis wants to merge 4 commits intomainfrom
codex/remove-income-housing-scaling
Draft

Stop income imputation scaling housing costs#375
MaxGhenis wants to merge 4 commits intomainfrom
codex/remove-income-housing-scaling

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • remove the SPI income-imputation adjustment that scaled rent and mortgage costs by total imputed income growth
  • keep Gift Aid outputs separate from income components without tying them to housing-cost rescaling
  • replace the rescale-factor helper tests with a behavior test that asserts rent and mortgage costs are preserved while income outputs are overwritten

Rationale

Housing costs should come from the housing data path, calibration, and uprating logic. SPI income imputation changes person income components; it should not mechanically multiply household rent or mortgage costs as a side effect.

Tests

  • uv run pytest policyengine_uk_data/tests/test_income_imputation_housing_costs.py policyengine_uk_data/tests/test_frs_only_imputation.py policyengine_uk_data/tests/test_housing_targets.py -q
  • uv run ruff check policyengine_uk_data/datasets/imputations/income.py policyengine_uk_data/tests/test_income_imputation_housing_costs.py

@vahid-ahmadi
Copy link
Copy Markdown
Collaborator

Hi @MaxGhenis — this looks like a duplicate of #372 (opened 2026-04-20), which fixes the same rent/mortgage rescaling in policyengine_uk_data/datasets/imputations/income.py. The branch prefix here (codex/) suggests Codex didn't have visibility into the open-PR list — was that the case?

If you're happy to consolidate, I'd suggest closing this in favour of #372 — that PR is tied to the root-cause issue #367 (with the full element-by-element audit), and its regression test injects a ×100 dividend multiplier so the original 2.5× bug couldn't slip back in. I can pull your changelog.d/375.md and the additional behaviour test from here into #372 so nothing's lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants