Skip to content

Assert the 2023-24 Class 4 lower profits limit instead of expecting it to fail - #2303

Merged
MaxGhenis merged 3 commits into
mainfrom
remove-stale-xfail-1968
Oct 12, 2026
Merged

MaxGhenis merged 3 commits into
mainfrom
remove-stale-xfail-1968

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #1968 (closed by #2058)

What and why

test_lower_thresholds_align_with_the_personal_allowance[2023] carried a non-strict xfail for #1968: the model's 2023-24 Class 4 lower profits limit was £11,908, not the £12,570 that NICA 2022 s2 sets from 6 April 2023. #2058 fixed that on 10 October (class_4/thresholds/lower_profits_limit.yaml has 12,570 from 2023-04-06), so the case has been XPASSing. A non-strict xfail that passes never fails, and if the LPL went back to £11,908 the case would show as an expected failure, not a red test. So the test protected nothing for 2023-24.

This removes the marker, so 2023 is an ordinary case of the alignment test, and drops the #1968 exception from the invariant lists of this module and of test_ni_threshold_freeze.py, which repeated it.

Part of workstream W2 of the Autumn Budget CI plan: the follow-up CI change fails any skip or expected failure that isn't on a reviewed allowlist, and this marker would otherwise have needed an entry.

Review

An independent Opus 5.5 check confirmed the fix on main (the YAML value and its NICA 2022 s2 reference, and the 30 April fiscal-year sampling) and found the repeated #1968 sentence in test_ni_threshold_freeze.py, now removed.

Test plan

  • Before: uv run pytest policyengine_uk/tests/test_threshold_indexation.py -rxX on main gives 86 passed, 1 xpassed ([2023]).
  • After: the same command gives 87 passed.
  • uvx ruff format --check
  • Changelog fragment in changelog.d/

axiom: n/a: test-only change; the LPL parameter fix is #2058's

🤖 Generated with Claude Code

… it to fail

#1968 (the model's 2023-24 Class 4 LPL was £11,908, not the £12,570 NICA
2022 s2 sets from 6 April 2023) was fixed by #2058 on 10 October. The
non-strict xfail kept for it now passes silently as an XPASS, so the
alignment test protected nothing for that year. Remove the marker so a
regression to £11,908 fails the suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts too

The sibling module repeated the 2023-24 lower profits limit as an open
defect (#1968); #2058 fixed it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 11, 2026 15:54
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Hand-off to the UK hub from W2 of the Autumn Budget CI plan (session local_6c1ab389).

MaxGhenis added a commit that referenced this pull request Oct 11, 2026
#2324 makes bump_version.py count only the fragments towncrier consumes
and exit when there are none. prepare_release.py now uses that script's
own classification when it has one (so a commit with only untyped files
releases nothing) and counts every file otherwise, as before. The tests
pass with main's bump_version.py and with #2324's, so the two pull
requests can land in either order. Based on the patch from #2324's
session.

Also merges #2303 (the stale #1968 xfail), which this pull request's
own check rejects as an XPASS until it lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit b4a78d0 into main Oct 12, 2026
6 checks passed
@MaxGhenis
MaxGhenis deleted the remove-stale-xfail-1968 branch October 12, 2026 03:07
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.

1 participant