Repository navigation
Review follow-ups from recently merged PRs (docs, comments and tests) - #2703
Conversation
Follow-ups N1-N3 from the review of #2225: the test comment names the disability premium route, the eligibility docstring names the carer (paragraph 4) route, and the disregard comment lists paras 3 and 4/5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
The reference tuple listed uksi/2006/214/regulation/29 twice; keep the first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
scottish_child_payment annualises by WEEKS_IN_YEAR (52), so the expected 1518.40 is 29.20 x 52, not 29.20 x 365.25 / 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
relevant_uk_earnings reads taxable_employment_income, which adds employment_benefits: SSP, SMP and SPP. The docstring named only SSP and SMP (found in the review of #2066). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
#2535 left a long line in the economic assumptions README; rewrap it to the file's 79-character width. Wording unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
#2535 left a short line in this YAML comment; join it so the block wraps to 79 characters. Wording unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
…ties The rows strategy draws is_full_year_category_a_director and is_apprentice for every person; the module docstring's 'for any' list now names both (follow-up from the review of #2505). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
Follow-up r9 P3-3 from the review of #2535: the 40 listed sources' adds/subtracts closures are pairwise disjoint, so no income is counted twice. They are today. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
Supplied role vectors are returned unchanged; widening an unflagged member's gap never makes a presumed child the partner; once identified parents take priority, presumed children and partners are disjoint. The reference's presumption is factored out so the properties can read it. All three pass; no model code changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6FaRutJG2o4ATFgPYn
|
Ready for hub review Head: Items
Changelog: Tests run (locally,
|
Aggregate impact on certified data: passBase Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in Notes
Moves flagged for reviewNone. Spending by benefit and service
Caseloads
Standard reform costings (change in gov_balance)
Standard reforms: change in each reform's target
Household net income by decileNo household's net income changes in any year. No change in any year: receipts by tax head; government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles. Checks failing on both base and head (1)
Counted-once checkEach of 91 components was raised by £1 per unit in 2026-27, and every head of its totals was read household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.
Provenance
Dataset: Receipts by tax head: head levels
Spending by benefit and service: head levels
Caseloads: head levels
Government balance, each component counted once: head levels
Model totals: head levels
Household income totals: head levels
Population: head levels
Poverty rates: head levels
People in poverty: head levels
Inequality: head levels
Mean household net income in each side's own deciles: head levels
Standard reform costings (change in gov_balance): head levels
Standard reforms: change in each reform's target: head levels
|
- Item 2: cite SR 2009/276 reg 3, which inserts the full NI Child Benefit disregard as Sch 6 para 64, instead of the old fractional text. - Item 5: document the even-pound base-income assumption beside the invariant-2 margin assertion. - Item 6: the non-dependant exemptions are reg 74(6), (7), (8) and (10); reg 74(9) is a gross-income disregard. - Item 7: add the NI equivalent, SR 2006/405 reg 6(1), to remunerative_work_hours. - Item 8: name question 8's current-tax-year test as the alternative reading of the Welsh lump-sum treatment. Comments and references only; no formula or value changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
UK hub: enqueued at
|
Resolve housing_benefit_applicable_income_disregard.py, where main's #2703 corrected the comment on the standard-disregard line this branch replaced. Keep the shared applied-standard call and move main's corrected paragraph citation into housing_benefit_applied_standard_earnings_disregard.py, where the special earnings disregard is now read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review leftovers from recently merged PRs, batched into one PR. No formula, parameter value or input changes.
Done
test_council_tax_reduction_pensioner_earnings_disregard_properties.py,housing_benefit_special_earnings_disregard_eligible.py(docstring) andhousing_benefit_applicable_income_disregard.py.uksi/2006/214/regulation/29entry fromhousing_benefit_applicable_income'sreference.september_cpi_uprating.yaml(it is underpolicyengine_uk/tests/policy/baseline/gov/social_security_scotland/, notparameters/). The worked figure now reads29.20 x 52 = 1518.40, which matches the test's expected output;scottish_child_paymentannualises byWEEKS_IN_YEAR(52).utils/pensions.py(from the review of Charge the winter fuel payment back through income tax, person by person #2066): therelevant_uk_earningsdocstring now names SSP, SMP and SPP, the three variablesemployment_benefitsadds intotaxable_employment_income.wales_childcare_offer.yaml.test_salary_sacrifice_ni_measure_properties.pynow names full-year Category A director status and apprentice status, which therowsstrategy draws.test_wales_childcare_offer_income_sources.pychecks that the 40 sources' adds/subtracts closures are pairwise disjoint. They are.test_child_and_adult_definitions_properties.py: supplied role vectors are returned unchanged; widening an unflagged member's gap never makes a presumed child the partner; once identified parents take priority, presumed children and partners are disjoint. All pass. The existing two-other-parents exception is kept.Source-checked follow-ups (hub, ae1c533)
The cloud session couldn't reach legislation.gov.uk or gov.wales. The hub's review fetched the sources, and these are applied from it:
nisr/2006/405/schedule/6/paragraph/64link shows the old £1.20/65p text. It now cites SR 2009/276 reg 3, which inserts the full disregard as paragraph 64.test_statutory_paternity_pay_income_tax_properties.py. The generated base incomes are even pounds, so PAY's 388.64 -> 389 pair cannot cross a personal-allowance taper-rounding step (personal_allowance.pyrounds the tapered allowance up).household_benefits_individual_non_dep_deduction.pyandhousing_benefit_non_dep_remunerative_work.yaml.remunerative_work_hours.yamlnow also cites SR 2006/405 reg 6(1), which sets the same 16 hours.Impact: none; comments, citations, docs and tests only.
axiom: n/a: no rule or parameter value changes
Tests
uv run pytest test_child_and_adult_definitions_properties.py -n 4: 18 passed.uv run pytest test_council_tax_reduction_pensioner_earnings_disregard_properties.py test_salary_sacrifice_ni_measure_properties.py test_wales_childcare_offer_income_sources.py -n 4: 98 passed.policyengine-core testonseptember_cpi_uprating.yamlandwales_childcare_offer.yaml: 48 passed. On the HBapplicable_incomeYAML directory: 145 passed.uvx ruff format --check .andgit diff --check: clean.Generated by Claude Code