Skip to content

Apply the Child Tax Credit family-element birth-date condition - #2475

Merged
juaristi22 merged 1 commit into
mainfrom
fix-2050-ctc-family-element
Oct 20, 2026
Merged

juaristi22 merged 1 commit into
mainfrom
fix-2050-ctc-family-element

Conversation

@juaristi22

Copy link
Copy Markdown
Collaborator

Refs #2050.

CTC paid the £545 family element even when no responsible child or qualifying young person was born before 6 April 2017. For a continuing zero-income 2024 claim with one child born on that date, modeled Child Tax Credit was £4,000; it is now £3,455. A child born the prior day retains £4,000.

The family element now uses the existing CTC responsibility mask and DOB helper. Separate dated family-condition and cutoff parameters preserve earlier supported years and independent reforms. The flat amount, individual-element cutoff, claim and income tests, explicit amount overrides and 2025 closure are unchanged.

This is a partial resolution: #1925 already removed uprating; the pre-2011 baby addition and 2003–2014 coverage remain open under #2050. The 2015 false activation is a model-coverage anchor, not legal commencement. Existing April annual sampling, age/month fallback when DOB is missing, looked-after/own-right-benefit proxies and statutory daily award-rounding limitations remain. No historical coverage, population impact or encoded parity is certified. Draft #2057 and ready #2061 retain their separate State Pension/PC work and fixture dependencies.

Sources: CTC Regulations 2002 reg 7(2)(a), SI 2017/387 reg 4(b), commencement reg 1, and Tax Credits Act 2002 s 9(2)(a).

Reproducer: policyengine_uk/tests/policy/baseline/gov/dwp/tax_credits/ctc_family_element.yaml::A child born on the family cutoff receives no family element

Validation: natural-cash RED 2 failed/1 control passed on unchanged production (initial PyYAML/absent-source setup attempt retained separately, zero tests). One bounded focused batch passed 68 unique cases: 23 new and 45 unchanged regressions, with JUnit and per-case JSONL; 62.61s pytest/70.24s CLI. Both post-fix final CTC and aggregate tax credits match the independent cash oracles. Native HTML build passed in 10.57s with existing Node warnings/public web-asset bootstrap retained. All 2,968 protected tracked files stayed byte-identical; no old-fixture changes were needed. Publication requires passing pinned formatting and independent captured-head review, recorded in the coordinator’s review report.

Local runtime: Python3.13.14/Core3.32.27/Hypothesis6.168.2/pytest8.4.1 versus locked Core3.33.2/Hypothesis6.169.0; offline/no-sync, exact checkout imports, external caches, no private inputs or full-suite run. The original 15 background source examples are not a count of executed tests.

axiom: needed

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right, fine to approve.

@juaristi22 thanks. The rule matches CTC Regulations 2002 reg 7(2)(a) as amended by SI 2017/387 reg 4(b): the family element is included only if a claimant is responsible for a child or qualifying young person born before 6 April 2017. The strict < on birth_day gets the on-the-day case right, and benunit.any gives one family element per claim. Using Refs #2050 rather than Fixes is right, since the pre-2011 baby addition and pre-2015 coverage stay open.

  1. nit: parameters/gov/dwp/tax_credits/child_tax_credit/eligibility/family_element_born_before.yaml:1 holds the same 20170406 date as the existing child_tax_credit/limit/born_before. A separate lever is a fair choice for reforms, but a comment saying the two dates are the same in law, and set separately on purpose, would stop someone "tidying" them later.
  2. nit: family_element_born_before.yaml:9-12 cites reg 7 and s.9 as amended, but not the amending SI. Adding SI 2017/387 reg 4(b) there, as in the ..._condition_applies.yaml file, would make the source of the date clear.
  3. nit: family_element_birth_date_condition_applies.yaml:10 titles the first reference "regulations 1 and 4(b)" but links to reg 4 only, and the second entry links reg 1 again. Titling the first "regulation 4(b)" would be tidier.
  4. nit: docs/book/programs/gov/dwp/tax-credits.md:67-98: the new section reads more like an internal note than user docs ("override contract", "own-right-benefit approximations", "certify"). The first two paragraphs are enough for most readers.
  5. nit (process): #2472 also edits docs/book/programs/gov/dwp/tax-credits.md. The hunks are next to each other but git merge-tree merges the two branches cleanly. No open PR of Vahid's touches these files.

What I checked

  • Read the issue, PR body and full diff. Checked reg 7(2)(a) and (3) on legislation.gov.uk (current text, £545 family element and £3,455 child element), and SI 2017/387 reg 1 (in force 6 April 2017).
  • Hand-computed the YAML cases: zero income, 2024, child element £3,455 plus family £545 gives £4,000; a child born on or after 6 April 2017 gives £3,455.
  • Ran policyengine-core test .../ctc_family_element.yaml (3 passed) and pytest test_ctc_family_element.py (20 passed) on the PR head. With CTC_family_element.py reverted to main, 2 of 3 YAML cases and 9 of 20 pytest cases fail.
  • Checked that parameters("2017") reads the condition as true and parameters("2016") as false.
  • ruff check and ruff format --check on the changed Python files: clean. Hosted CI is green, including Fix evidence. The Reproducer and axiom lines are present.
  • Did not run the full suite or any population dataset.

🤖 Generated with Claude Code

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, per my review above. Nits are optional.

@juaristi22
juaristi22 added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit a4a6b31 Oct 20, 2026
15 checks passed
@juaristi22
juaristi22 deleted the fix-2050-ctc-family-element branch October 20, 2026 02:48
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