Implement Stage 9 v2 metadata catalog and preview routes - #3808
Draft
anth-volk wants to merge 26 commits into
Draft
Implement Stage 9 v2 metadata catalog and preview routes#3808anth-volk wants to merge 26 commits into
anth-volk wants to merge 26 commits into
Conversation
anth-volk
force-pushed
the
stage-9-v2-metadata
branch
from
August 30, 2026 09:28
7083332 to
dc9fdfb
Compare
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 #3807
Summary
/v2for tax-benefit models, model versions, variables, parameters, parameter-tree children, canonical parameter values, logical input datasets, regions, and compact economy-selection options.policyengine_versionoverride.Migration boundaries
/v2collection, detail, hierarchy, model-selection, and economy-option GET routes; the v2 schema migration and catalog-initialization workflow; model, variable, parameter, logical input dataset, and region reference data.GET /us/metadata,GET /uk/metadata, all existing callers, all creation operations, Cloud SQL reads and writes, simulations, reports, and output datasets.GET /v2/openapi.json./v2/{country_id}/metadatapreview is replaced before production use by independently paginated resources. No existing unprefixed response or route changes.Resource read behavior
country_id, optional exactpolicyengine_version,offsetdefaulting to 0, andlimitdefaulting to 100 with a maximum of 500.items,offset,limit, andhas_more; queries read one additional row and do not run a complete-result count./v2/parameter-values, while/v2/parameters/childrenreads one hierarchy level at a time.Catalog and deployment behavior
populace_us_2024; subnational regions use PolicyEngine.py regional alternatives where available and otherwise use the documented national fallback. User-facing dataset labels use “Microcosm.” UK regions useenhanced_frs_2024_25.DatasetVersionrows or simulation/report output datasets.COPY, set-based reconciliation, one transaction, and a transaction-scoped advisory lock.alembic upgrade headand before candidate deployment, never during imports, application startup, process restart, or request handling.Verification
__pycache__parameter nodes.scripts/run_quality_guards.pyand strict OpenSpec validation passed.