Repository navigation
Forward branches through Social Security period discovery - #10676
Conversation
Keep calls without a branch compatible with the current Core holder API. Cover branch visibility and root fallback with the existing Core fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core PR 552 can leave a missing input's default uncached, so calculating independent_input for 2023 no longer stores the derived entry that the rebuilt dataset's input then shares a key with. Store that entry in the test, so it checks the same provenance under every Core release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review: Forward branches through Social Security period discoverySummaryPolicyEngine-core PR #552 (open, head The PR gives the wrapper
I found no correctness problems. The new forwarding passes a local run against core #552. The remaining notes are suggestions. Critical (must fix)None. Should addressNone. Suggestions
Verified correctCore API and the wrapper on old and new Core
Default and reform branches under #552
Memory and disk storage
Hand traces of the new expectations (fixture index 1/2/4/8 for 2023–2026; public 2024 inputs land on the reserved source branch at build, or on
Mutants
Local run against core #552 head State backend
Overlap with #10684. #10684 merged on 2026-11-06 as Test design and CI cost
Changelog. Axiom line assessment
CI statusAll green: 36 pass and 3 skipping. The skips are the workflow gates of an earlier superseded run (42314572037). Run 42317487869 at head Branch statusThe branch is 4 commits ahead of and 8 behind Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Approving per the review above: 0 critical, 0 should, 4 optional suggestions.
|
US + core hub merge audit, us#10676 at
🤖 Generated with Claude Code |
PolicyEngine/policyengine-core#552 adds an optional branch argument to
Holder.get_known_periods, and core's_calculatepasses the simulation's branch when it looks for fallback periods. PE-US wraps that method inpolicyengine_us/tools/social_security_inputs.py. Main's wrapper takes no branch, so under core #552 it raises aTypeErrorand stops root fallback calculations.The wrapper now forwards an explicit branch to the physical method,
_allow_fallback,_public_periodsand_effective_value. A call without a branch makes the same calls as before, so the wrapper keeps working with core's one-argument method. PE-US main needs this change before core releases #552. #10671 carries the separate subsampling assertion change.test_dataset_rebuild_keeps_new_input_provenance_when_old_cache_shares_keynow stores the derived 2023 entry that the rebuilt dataset reuses, withput_in_cache(..., derived=True), and keeps its assertions. Core #552 can leave a missing input's default uncached, so the test no longer relies on the calculation to store that entry.impact: none on current core; only branch-aware callers reach the changed path
axiom: n/a: core compatibility infrastructure; no policy change
Tests
Local runs at
de480911d0, one capped process per file:7786d3dca(3.34.8)6ed1b40merged into that mastertest_social_security_input_state_machine.pytest_social_security_known_periods.pytest_social_security_real_core.pyThe five skips on core master come from the branch cases, which read the holder method's signature and skip when it takes no branch.
Mutants, each run alone at
626fcc7fabunder a 4 GB and 1,800-second cap:test_known_periods_without_branch_keeps_reported_sources[social_security_retirement]kills it_allow_fallbacktest_known_periods_forwards_branch_to_fallback_checkkills it_effective_valuetest_known_periods_lists_only_sources_readable_by_requested_branchkills itThe outer fallback-permission call ignores the branch when it gets no period, so a call-through spy checks that the wrapper forwards it.
🤖 Generated with Claude Code