Repository navigation
Bring the built CGT taxpayer count within 20% of HMRC 2024-25 (1.59.0 is 32% under) #630
Description
Max ruled d1735 = A in the Budget coordinator session on 2026-10-20 (~22:20Z): publish with the measured CGT taxpayer-count limitation disclosed, then bring the count within 20%. The temporary bound change will release 1.59.1: the unpublished 1.59.0 contents plus the bound change.
The release-batch3 failure note (publish-failure-1.59.0.md) records:
- Batch 3 (Release the third uk-data batch #608) merged at
cbf50eaaunder d1678 = A; versioning cut 1.59.0 atdcd74565. - The unseeded, 512-epoch 1.59.0 publish run, push 39320323369, failed at
make test: 1 failed, 2,663 passed, 3 skipped, 1 xfailed. Nothing was uploaded or tagged. At the time of failure, 1.58.2 remained the latest published data, and PE-UK main still tested on 1.58.1. policyengine_uk_data/tests/test_cgt_band_donors.py::test_built_cgt_taxpayer_countmeasured 375k weighted CGT taxpayers against the 548k HMRC 2024-25 target (ratio 0.68, about 32% under), outsideabs(ratio - 1) < 0.2.- Start capital gains on HMRC's 2024-25 size-of-gain table #571 (
d071ad0f) introduced that two-sided ±20% check and the 2024-25 Table 2.1a target. The table has 551k individuals overall; excluding the 3k below the annual exempt amount gives the test's 548k above-exemption target. - In 1.58.2 (
a43e8c519), the count check was one-sided: below twice the old 378k target. That build was about 56% above its old target, per Start capital gains on HMRC's 2024-25 size-of-gain table #571's commit message, and passed. Its count against 548k has not been measured; an estimate from the old target is not a measurement. - The count test skips on
TESTINGbuilds via_REDUCED_BUILD_SLACK, so Release the third uk-data batch #608's CI did not exercise it. The hub's 512-epoch diagnostic builds ([DO NOT MERGE] Batch-3 fit attribution: seeded release at production settings (512 epochs) #618–[DO NOT MERGE] Batch-3 gate check: fixed release cb92e401 at production settings #621) also had the test step switched off byjobs/release-batch3/trim_workflow.py. The publish was the first full-settings run of this test on the release, a gap in the attribution plan. - Total gains passed its built-data bound in the publish build (no built-data test bounds CGT receipts; receipts improved in the seeded release fit summaries, from band 2 on 1.58.2 to band 1). The other Start capital gains on HMRC's 2024-25 size-of-gain table #571 built-data checks, including donors retaining weight and no stray gains, also passed.
Fit bands below are errors against each build's own calibration targets: 0 = within 10%, 1 = 10–25%, 2 = 25–50%, 3 = 50–100%.
| Target | 1.58.2 publish build | Release #621 (seeded) | #618 (seeded) | Without #571, #619 | No raking, #620 |
|---|---|---|---|---|---|
hmrc/cgt_taxpayers (total) |
3 | 2 | 2 | 3 | 2 |
capital_gains_tax (receipts) |
2 | 1 | 1 | 2 | 1 |
hmrc/capital_gains_total |
1 | 1 | 1 | 1 | 1 |
All three release candidates (the unseeded publish build and seeded #618 and #621) missed the taxpayer target in the 25–50% band. This points to systematic underfitting, alongside unseeded publish variability (#598). The temporary two-sided ratio bound is [0.5, 1.2]: the lower edge covers that measured error band so republishing does not fail on noise; the upper bound stays at #571's level.
Follow-up:
- Investigate why the combined 512-epoch calibration undershoots the CGT taxpayer targets, including how the aggregate and per-band targets interact.
- Bring the built taxpayer count within 20% of HMRC's 2024-25 above-exemption figure and restore the ±20% test.
- Validate the correction with the full-settings built-data tests and check seeded and unseeded fits, retaining the improved receipts fit.
Activity