Repository navigation
Correct TV licence liability and free licence value - #2147
Conversation
|
@vahid-ahmadi, could you please review this PR with particular attention to two design choices? First, do you have concerns about adding |
|
Review pass (Claude Code, on Vahid's behalf) at Short version: approve with one should-fix. The should-fix is about how this PR combines with #2152, not about this PR alone. Liability now follows the law (s. 363, as amended in 2016): the trigger is watching live or using iPlayer, not owning a TV. The free-licence value is in GBP and counts only a complete exemption, which matches DWP's HBAI method. The new tests fail on main and pass here: 6 of the 12 new YAML cases fail on main. The DCMS suite (17) and the metadata test pass. CI is 6/6 green, and the PR merges cleanly with main. Your two questions
Findings
Checked and correct
Merge order with #2152 and #2153There are no textual conflicts: #2147 and #2152 touch different files. But they interact through
|
cb37b9a to
a68b2e9
Compare
|
Implemented the requested review changes in a68b2e9:
For the reviewed 2020 example, a free share of 117/365 plus the blind discount now produces a TV licence charge of 53.51 and a free-licence value of 50.49. PR #2152 can now calculate that share from the dated transition. Focused validation after rebasing onto current main:
The full UK test suite was not run. |
|
Thanks Anthony, the share split is right. Now that #2152 is in, this needs a rebase: both PRs change |
|
Suggested The check isn't required yet (decision d1368); it fails fix PRs whose description names no reproducer. 🤖 Generated with Claude Code |
a68b2e9 to
a99deaa
Compare
|
Rebased onto main The blind discount applies only to the remaining paid share. The two new 2020 cases calculate the exemption rather than supplying its result: £50.49 free-licence value and £107.01 paid, or £53.51 paid with blindness. The blind discount does not enter the free HBAI value. Validation: 27 YAML cases and 5 Python tests passed, sequentially, including the year-keyed age-reform test. Formatting, lint, Towncrier draft, fix-evidence validation and whitespace checks passed. No full suite or CI polling. #2153 will use this branch as its base and should merge afterward. |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Thanks Anthony. Re-checked after the rebase at a99deaa: the resolution is the one I tested, with #2152's fiscal_year_segments loop now in tv_licence_free_licence_share and the blind discount applied only to the paid share. Cases 8 and 9 give £50.49 free value with £107.01 or £53.51 paid, the TV licence tests pass locally, so does the full YAML suite (3,071), and CI is green. Approving.
|
UK hub: an independent review at Confirmed:
Nits:
The impact (none on the certified data) and the 🤖 Generated with Claude Code |
|
Merged by the UK hub (session local_8e19f9d5, Opus 5.5) on Max's d1728 (2026-10-19): the hub merges #2458, #2497 and #2147 on its gates, after correcting each body's
🤖 Generated with Claude Code |
Fixes #2145
Fixes #2149
What and why
PolicyEngine UK 2.106.1 used television ownership as the condition for both
the licence charge and the value of a free licence. Communications Act 2003
section 363 and the 2016 amendment to section 368 instead base liability on
using a receiver for live television or BBC on-demand programmes, regardless
of the device.
The free-licence value also declared a dimensionless unit even though it
returns the annual licence fee and enters GBP-denominated HBAI household
income. DWP's FYE 2025 HBAI methodology includes the cash value of complete
age-based TV licence exemptions, including the proportional value of any
partial-year exemption; it does not include the 50% blind-person discount as
a free licence.
This PR:
tv_licence_required, which can be supplied directly for householdsthat use licensable services;
household_owns_tvas a documented fallback so existing datasets andhousehold inputs keep their current behavior;
tv_licenceandfree_tv_licence_valuethrough the new variable;blind discount, applies the blind discount only to the remaining paid share,
and declares
free_tv_licence_valuein GBP;full free-licence value, the 50% discount, and the variable's currency unit.
The implementation cites:
would_evade_tv_licence_feeremains a behavioural input rather than anofficial policy rule.
#2152 has merged. This branch now includes that implementation from main:
tv_licence_free_licence_shareusesfiscal_year_segmentsto apply theBoolean Pension Credit requirement from 1 August 2020. The blind discount
applies only to the remaining paid share; the HBAI free-licence value excludes
the blind discount. #2153 is the dependent benefit-unit eligibility correction
and should merge after this PR.
Test plan
Rebased onto main
e01f2f5ec882ecb22ec00d137b39ac70213aa58eon 12 October 2026.changelog.d/2145.fixed.md.Reproducer:
policyengine_uk/tests/policy/baseline/gov/dcms/bbc/tv-licence/free_tv_licence_value.yaml::Case 9, the blind discount reduces only the paid part of the 2020 licence.Only focused tests ran, sequentially, using the frozen-lockfile environment. No full suite or CI polling.
Impact (UK hub, 2026-10-19): none on the certified data.
e2ea32893with main merged with this head (65ceae71e), on certified policyengine-uk-data 1.58.1, fiscal years 2025-26 to 2031-32.is_blind. The review read the source, not the file.tv_licence_requiredfalls back tohousehold_owns_tv, the only liability input uk-data writes.axiom: TheAxiomFoundation/rulespec-uk#473 queued