Add UC family type totals from 2023 - #250
Conversation
|
Review at The substance is right: all 45 pre-existing 2025 family-type values are byte-identical to the retired API JSON, the 27 Totals are the publisher's own row ( 1. Should-fix — the 2. Should-fix — the machine-readable query is gone and the manifest URL is not an artifact. The retired JSON carried the exact Stat-Xplore query (database, measure, recodes, 3. Question — the second commit's title overstates. "Declare UC record set provenance explicitly" adds 52 literal 4. Question — Nits. The Could not verifyThat the CSV is what Stat-Xplore serves (UI download only, no fetchable URL), the R2 object at the manifest key, and the 2024 Approve once 1 is decided either way; 2 is worth doing in this PR since the query was the one thing the old artifact documented better than the new one. |
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Round one is in the comment above (#250 (comment)): data and totals verified, two should-fixes (the source_table rename re-keys all 45 existing 2025 facts; the Stat-Xplore query is no longer recorded and the manifest URL is a page, not an artifact). Happy to approve once those are decided either way.
|
@vahid-ahmadi Addressed the two should-fix items from your review. Should-address fixes
Skipped
Verification
|
vahid-ahmadi
left a comment
There was a problem hiding this comment.
Second pass at f5c45f60 (Claude Code, high effort; the one response commit read against the two should-fixes; validate-package 54 record sets / 162 rows / 0 errors; the focused tests, the provenance-class test, the suite tests and the bundle tests: 31 passed; the full suite did not complete locally this round and CI is green on the head).
1. Verified. The PR body now says the 45 existing 2025 fact keys are re-minted because source_table, source_file and vintage changed. I rebuilt the facts on main and on this head: 45 source record ids in common, 0 of 45 keys survive, 45 of 45 identical on value and on every non-source part of the key payload (period, geography, entity, measure, aggregation, domain, filters); only the three named source fields differ. The sentence is accurate.
2. Verified, with one residual. extraction_method (source_package.yaml:16-24) now records the table path, str:database:UC_Households, the measure URI str:count:UC_Households:V_F_UC_HOUSEHOLDS, and both field URIs, all verbatim against the retired query JSON. Not carried: the recode value-URI lists (the nine C_UC_HH_DATE:YYYYMM and five C_UC_FAMILY_TYPE:{1,2,3,4,99} values) and the old total: false. The latter is moot now that the publisher Total is kept; the former follow an obvious pattern, so this is a nit rather than a gap.
The diff since my pass is exactly that one hunk in one file; the skipped items are as she listed.
Approving.
- After rebasing over #250, the 27 April-December months of 2023, 2024 and 2025 overlap the new cross: summing its four payment x child-entitlement cells per family type lands on the published detail cell within 11 households (126 of 135 cells differ, disclosure control), under the same 15-household tolerance #250 applies. The published Total is not compared and no fact is emitted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Summary
total_benefit_unitssource measure instead of deriving totals from the five family-type rows.source_table,source_file, andvintage) changed; their values, dimensions, periods, and source record IDs remain unchanged.Chronicle governance
ledger-source-ingestorledger-source-fidelity: PASS — every emitted value resolves to the archived publisher CSV, and all facts carry source-row and source-cell lineage.ledger-contract: PASS —source_row_dimensionssupplies declarative evidence for guarded row headers without changing consumer-fact identity or values.ledger-boundary: PASS — the package preserves DWP's Total independently; the detail-to-total comparison exists only as a test and does not emit a computed fact.Tests
.venv/bin/chronicle validate-package dwp-uc-households-family-type-april-december-2025 --year 2025.venv/bin/pytest -q tests/test_chronicle_source_package.py -k 'dwp_uc_children_composition or dwp_uc_family_type'.venv/bin/pytest -q tests/test_chronicle_source_package.py::test_every_source_package_record_set_declares_provenance_class.venv/bin/pytest -q tests/test_chronicle_suite.py.venv/bin/pytest -q tests/test_chronicle_bundle.py::test_build_bundle_writes_merged_consumer_contract.venv/bin/ruff checkFixes #247