Skip to content

Tighten disability category thresholds#417

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/audit-disability-threshold-margin-401
May 24, 2026
Merged

Tighten disability category thresholds#417
MaxGhenis merged 1 commit into
mainfrom
codex/audit-disability-threshold-margin-401

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

  • replace the disability-category 10% threshold discount with a fixed GBP 1/week tolerance
  • document the tolerance as rounding protection rather than an empirical category shift
  • update tests to prove near-threshold values still classify while 9-10% below-threshold values no longer get promoted

Closes #401

Tests

  • uv run --python 3.13 --frozen ruff format --check policyengine_uk_data/datasets/disability_benefits.py policyengine_uk_data/tests/test_disability_benefits.py
  • uv run --python 3.13 --frozen ruff check policyengine_uk_data/datasets/disability_benefits.py policyengine_uk_data/tests/test_disability_benefits.py
  • uv run --python 3.13 --frozen pytest policyengine_uk_data/tests/test_disability_benefits.py -q
  • uv run --python 3.13 --frozen pytest policyengine_uk_data/tests/test_frs_only_imputation.py::test_frs_only_recomputes_disability_flags_after_amount_imputation -q
  • git diff --check

@MaxGhenis MaxGhenis merged commit 46392fd into main May 24, 2026
4 checks passed
@MaxGhenis MaxGhenis deleted the codex/audit-disability-threshold-margin-401 branch May 24, 2026 18:58
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.

Audit SAFETY_MARGIN = 0.1 on disability-benefit category thresholds

1 participant