From 16bd3ff8e5dcfa6f550db0f3fb282adeb207f262 Mon Sep 17 00:00:00 2001 From: Ziming Date: Fri, 6 Nov 2026 17:16:48 -0500 Subject: [PATCH] Give the Social Security state backend the method Core 3.34.8's apply_reform calls policyengine-core 3.34.8 (Core PR 652) made Simulation.apply_reform call _bind_to_tax_benefit_system after applying the reform, and that method now rebinds each existing branch. The state-machine backend executes Core's apply_reform body on its fixture Simulation but not the bind method, so test_social_security_input_state_machine failed with AttributeError on every PR once CI installed 3.34.8. Execute Core's installed _bind_to_tax_benefit_system body too; the fixture already has every global and attribute it uses. Co-Authored-By: Claude Opus 5.5 --- changelog.d/fix-ss-state-backend-core-3348.fixed.md | 1 + policyengine_us/tests/core/_social_security_state_backend.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog.d/fix-ss-state-backend-core-3348.fixed.md diff --git a/changelog.d/fix-ss-state-backend-core-3348.fixed.md b/changelog.d/fix-ss-state-backend-core-3348.fixed.md new file mode 100644 index 00000000000..5039c8d4ec6 --- /dev/null +++ b/changelog.d/fix-ss-state-backend-core-3348.fixed.md @@ -0,0 +1 @@ +Give the Social Security input state-machine test's Core backend the holder-rebinding method that policyengine-core 3.34.8's `apply_reform` calls, which had made the test fail on every pull request. diff --git a/policyengine_us/tests/core/_social_security_state_backend.py b/policyengine_us/tests/core/_social_security_state_backend.py index 04d6f7d1550..cf4fd10caa6 100644 --- a/policyengine_us/tests/core/_social_security_state_backend.py +++ b/policyengine_us/tests/core/_social_security_state_backend.py @@ -621,6 +621,10 @@ def load(self): "clone", "get_branch", "apply_reform", + # From Core 3.34.8 apply_reform rebinds holders to the reformed + # system, and each existing branch to its own, before replaying + # inputs. + "_bind_to_tax_benefit_system", "_invalidate_all_caches", "drop_computed_arrays", "extract_person",