Refresh the UK Universal Credit target contract - #727
Open
MaxGhenis wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #622 and the UC slice of #701. Refreshes the UK national calibration contract from policyengine-uk-data
ebf733cto 1.56.16 (12a1e028afeef08d8b2d74ee03fd9de3a78b2dd3), following policyengine-uk-data#452 and chronicle#184.The contract adds the value-free
dwp.uc.householdsdeclaration: a prepared UC-receipt indicator summed at benefit-unit level. DWP “household” means the UC unit of assessment, not an ONS household.This PR deliberately stops after the contract refresh. It does not start #623's calibration step and does not add an active UC reference, for the period-semantics reason below.
Period-semantics receipts and verdict
packages/microcosm-build/src/microcosm/build/ledger_targets.py:48-68: eachLedgerTargetReferenceowns an optional per-referenceperiod; periods are not restricted to one file-wide value.packages/microcosm-build/src/microcosm/build/ledger_targets.py:797-845: selector resolution filters to facts at or before that reference's period and fails loudly when no eligible fact exists.packages/microcosm-build/src/microcosm/build/country_spec.py:804-817and:925-952:target_references.jsonis loaded and typed intoCountrySpec.target_referencesreceipt inpackages/microcosm-build/src/microcosm/build/uk_runtime/national_build.py: the national build does not evaluate this resource yet.Verdict: references support per-reference periods in the Belgian convention, but the present UK national build evaluates none of them. A 2025 UC fact cannot resolve for the certified 2023 active subset because the resolver admits only facts at or before the reference period. Labelling the UC row 2023 would fail closed; labelling it 2025 would create an inert mixed-period declaration rather than a target evaluated by the national build. Per the requested stop rule, activation is deferred instead of forcing a misleading period.
Consequently, fixture-backed activation and its loud-failure test are also deferred: adding tests for an activation that the verdict disallows would contradict the stop rule. The Chronicle bundle dependency remains chronicle#184 and a later released consumer feed.
Registry-parity accounting
The governed surface changes from 651 rows (609 mapped + 42 signed exclusions) to 652 rows (610 mapped + 42 signed exclusions):
dwp/uc/households→dwp.uc.households;obr/jobseekers_allowanceremains because it is the distinct published JSA expenditure target, not one of those deleted UC split names.The exact closure invariant remains 187 declarations = 184 distinct mapped target IDs + 3 signed unmapped declarations.
Tests
Commands:
Scope
No calibration, dataset build, upload, merge, or active-reference change is included. This PR does not close #622; other items remain. The separate #623 claim remains for a later run.