Add named non-default access to the US Populace local-area dataset#472
Merged
Conversation
Register a staged, non-default Populace US artifact
(populace_us_2024_acs_local, published in its own immutable Build L
release) so it can be loaded by name without ever becoming the certified
default.
- Add a sibling dataset_overlays.{country} manifest section merged into
the resolvable dataset registry by get_release_manifest. Overlays are
strictly additive (may not shadow the certified default or any certified
dataset) and survive re-certification, because certify_data_release only
rewrites data_releases.
- Register dataset_overlays.us.populace_us_2024_acs_local pinned to its
Build L revision + sha256; rebind the US TRO sidecar to the new manifest.
- Document loading the local-area dataset and filtering it for state/CD
breakdowns (docs/microsim.md), and the overlay mechanism
(docs/release-bundles.md).
- Add a fill-in-the-id Build M US Populace certification runbook replaying
#470 (docs/engineering/runbooks/), including verifying overlay survival.
Fixes #471
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #471
What
Two related changes to the US Populace data path.
1. Named, non-default access to the local-area artifact. The Build L artifact
populace_us_2024_acs_local.h5(~1.6M households, ACS 2024 multispine, PUMA-assigned CD-119/county/state, calibrated to state administrative totals and state/CD population; four reviewed limitations in its release gate summary) is published in its own immutable release and is deliberately not the certified default. This makes it loadable by name:2. Build M certification runbook. A fill-in-the-id runbook that replays #470, so tonight's default-flip is mechanical.
How — the
dataset_overlaysmechanism (design note)The registry that resolution reads (
data_releases.{country}.datasets) is regenerated wholesale bycertify_data_releaseon every certification. So a dataset hand-added there would be wiped by the very next certification (i.e. tonight's Build M). Putting the local-area entry directly indata_releases.us.datasetswould therefore be self-defeating.Instead this adds a sibling top-level manifest section,
dataset_overlays.{country}, that:get_release_manifestmerges into the resolvable dataset registry, soresolve_dataset_reference/resolve_managed_dataset_reference/managed_microsimulationload it by name at its own pinned, sha-verified revision;certify_data_releaseonly ever rewritesdata_releases, neverdataset_overlays.Default resolution is unchanged:
default_datasetstayspopulace_us_2024,default_dataset_uristays the certified Build J URI, andregion_datasets.nationalis untouched. The certified-bundle TRO composition is unchanged except for rebinding the bundle-manifest sha256 (the overlay is not a certified artifact, so it does not enter the TRO).Changes
src/policyengine/provenance/manifest.py—_apply_dataset_overlays+ merge inget_release_manifest.src/policyengine/data/bundle/manifest.json—dataset_overlays.us.populace_us_2024_acs_local(Build L revision + sha256).src/policyengine/data/bundle/us.trace.tro.jsonld— rebind manifest sha256 (required byTestVendoredSidecarBinding; regenerated US-only, UK preserved).tests/test_release_manifests.py— regression test that the overlay never changes default resolution; overlay resolves to its Build L tag; additive/guard/survive-recertification unit tests (TestDatasetOverlays).docs/microsim.md— load + state/CD filtering guidance.docs/release-bundles.md— overlay mechanism.docs/engineering/runbooks/build-m-us-populace-certification.md— Build M runbook (+ pointer from the data-certification skill).Verification
python scripts/bundle.py checkexits 0;ruff format --check+ruff checkclean.🤖 Generated with Claude Code