Skip to content

Devolved nations: Scottish income tax tests + SCP uprating fix (#46)#83

Open
vahid-ahmadi wants to merge 1 commit into
mainfrom
vahid/devolved-nations
Open

Devolved nations: Scottish income tax tests + SCP uprating fix (#46)#83
vahid-ahmadi wants to merge 1 commit into
mainfrom
vahid/devolved-nations

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Contributor

Addresses #46

Most of the devolved infrastructure already landed on main (commit 17324e5 added LBTT/LTT; Scottish income tax bands, is_in_scotland dispatch, and Scottish Child Payment were already wired and parameterised). This PR closes the two genuine remaining gaps the issue called out: the missing worked-example/divergence test coverage for Scottish income tax, and a documented data bug in the Scottish Child Payment amount.

Scope (this PR)

  • Scottish income tax — worked-example tests. Five new unit tests in src/variables/income_tax.rs pinning HMRC/Revenue-Scotland-style figures for the 2025/26 six-band structure (starter 19% / basic 20% / intermediate 21% / higher 42% / advanced 45% / top 48%):
    • £30k → £3,482.82, £50k → £9,013.80, £75k → £19,513.80, £150k (PA fully tapered) → £59,666.10.
    • An explicit Scotland-vs-rUK divergence test at the same income: a £50k Scottish taxpayer pays ~£1,527.80 more than rUK (42% vs 40% higher rate + lower threshold), while a £15k earner pays less via the 19% starter rate.
  • Scottish Child Payment uprating fix. Corrected the stale weekly_amount of £26.70 that was carried across every year: now £27.15 for 2025/26 (SSI 2025/100), £28.20 for 2026/27 (April 2026 uprating), and projected ~CPI uprating for 2027/28–2029/30 (£28.75/£29.34/£29.93), matching the repo's convention for other benefits. The existing SCP test reads from params, so it remains valid. Updated LEGISLATIVE_REFERENCE.md (the "known issues" and Appendix B.10 notes had flagged exactly this bug).

Remaining (out of scope, to document)

  • LBTT/LTT additional-dwelling supplement (ADS / higher-rates) — only primary-residence residential bands are modelled.
  • Other devolved Scottish benefits — Best Start Grant, Carer's Allowance Supplement, Funeral Support Payment.
  • Devolved Council Tax Reduction variants (Scottish/Welsh CTR rules differ from English CTR).
  • Scottish Landfill Tax.

Tests

cargo build and cargo test both pass — 195 tests, 0 failures, including all new Scottish income tax and divergence tests.

🤖 Generated with Claude Code

Add worked-example unit tests for the 2025/26 Scottish income tax
five/six-band structure (starter/basic/intermediate/higher/advanced/top)
at several income levels, plus an explicit Scotland-vs-rUK divergence
test at the same income. Correct the Scottish Child Payment weekly
amount to £27.15 (2025/26, SSI 2025/100) and £28.20 (2026/27), with
projected ~CPI uprating thereafter, fixing the stale £26.70 carried
across all years.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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