Skip to content

Forward all storage arguments in the read-only cache test fixture (core 3.32.16) - #2125

Merged
MaxGhenis merged 1 commit into
mainfrom
fix-read-only-cache-fixture-core-3-32-16
Oct 4, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
fix-read-only-cache-fixture-core-3-32-16

Conversation

@MaxGhenis

Copy link
Copy Markdown
Collaborator

Summary

policyengine-core 3.32.16 (published 3 October 2026, 20:59Z) changed Holder to call InMemoryStorage.put(value, period, branch_name, derived=...). The read_only_cache fixture in policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py replaced put and get with fixed signatures, so five code-health tests fail with put() got an unexpected keyword argument 'derived'.

CI's "Install package" step installs the latest core, not the version uv.lock pins (3.32.13). So the failure hits every PR's Test job and main's "Code changes" run (first seen on #1938, run 37153291625).

The fixture now forwards every argument to the original methods, so it keeps working whatever keywords core adds. Nothing outside the test changes.

Tests

pytest policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py:

core original fixture this PR
3.32.13 (locked) 35 passed 35 passed
3.32.16 (latest) 5 failed, 30 passed 35 passed

Ruff format and check are clean. No model behaviour changes, so there is no microsimulation impact.

🤖 Generated with Claude Code

policyengine-core 3.32.16 calls InMemoryStorage.put(..., derived=...).
The fixture replaced put and get with fixed signatures, so five
code-health tests failed with an unexpected keyword argument on every
PR, because CI installs the latest core. The fixture now forwards every
argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit 3d05957 into main Oct 4, 2026
6 checks passed
@MaxGhenis

Copy link
Copy Markdown
Collaborator Author

Merged by the UK hub (session local_8e19f9d5, Opus 5.5) under the PE-UK merge-on-gates rule:

  • CI: gh pr checks exits 0 at 4ac62cbb5bc5. Test passes on policyengine-core 3.32.16, the release that broke every PR.
  • Independent review: APPROVE at 4ac62cbb5bc5, by the UK hub, a different session from this PR's author (the UK merge train). The diff touches one test file. The read_only_cache fixture's put/get now forward *args, **kwargs to the originals. put still takes value positionally, so marking ndarrays read-only before storage is unchanged, and get still marks the returned array read-only. No model code changes, so there is no microsimulation impact. This matches the PR's own table: 35/35 pass on core 3.32.13 and 3.32.16.
  • Mergeable: MERGEABLE and not a draft, with no changes requested.

Follow-up, out of scope here: CI's "Install package" step should install from uv.lock, so an unpinned core release can't break every PR again.

@MaxGhenis
MaxGhenis deleted the fix-read-only-cache-fixture-core-3-32-16 branch October 4, 2026 02:03
MaxGhenis added a commit that referenced this pull request Oct 4, 2026
One conflict, in income_support_eligible.py. Main's #1907 rewrote the
Income Support conditions: the carer limb now needs a claimant or partner
who is under the qualifying age for State Pension Credit and a carer
(SSCBA 1992 s.124(1)(aa) and (e), IS Regs 1987 Sch 1B para 4). That
already contains this branch's rule (a claimant or partner carer, not any
member), so the formula and its comments are main's. The reference tuple
is the union of both sides: Sch 1B, reg 4ZA, s.124 and Claims and
Payments Regs 1987 reg 4.

Main also brought in a fix for the read-only cache test fixture with
policyengine-core 3.32.16 (#2125), which failed this branch's last CI run.

Co-Authored-By: Claude Opus 5.5 <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