Repository navigation
Conversation
policyengine.py 6.16.0 defaults UK runs to Microcosm's microcosm_uk_2024_25, and policyengine-api runs only that default, yet report-logger sent every UK INVESTIGATE issue to policyengine-uk-data. It now routes US and UK data issues to PolicyEngine/microcosm, and a UK run that named an Enhanced FRS or FRS file to policyengine-uk-data, which builds those files. The archive frontmatter gains dataset_at_run, taken from the microsim result's dataset, to carry that choice. - report-logger: country-and-dataset routing in prose and in the issue bash; the issue body names the dataset and its data version. - microsim-runner: UK API and local-path guidance, an optional dataset input, and dataset and data_version in its output; /analyze-policy gains --dataset for local runs. - calibration-diagnostics: where Microcosm keeps its UK targets, and that the live calibration API lists US releases only. - policyengine and policyengine-uk skills: policyengine.py still serves the Enhanced FRS and FRS files by name, as dataset overlays, and serves no per-area file. - test_country_routing: example, property and differential tests; the differential tests run report-logger's bash against the Python reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egment report-logger took the last path segment of dataset_at_run, so a URI whose revision contains a slash, such as enhanced_frs_2024_25.h5@refs/pr/3, routed to microcosm. It now drops any @revision first, as policyengine.py's dataset_logical_name does, then keeps the last path segment. The reference in test_country_routing.py does the same, the revision strategy now allows slashes, and a refs/pr/3 example joins the example and differential tests. microsim-runner also falls back to /{country}/metadata when a result carries no policyengine_bundle, and calibration-diagnostics names the UK default where it said "their place". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…they're gone The data skill said the old per-area H5s "no longer exist" and that policyengine-us-data's per-area files "were removed". Hugging Face's policyengine/policyengine-us-data still holds 51 state and 436 district H5 files; policyengine.py 6.16.0's bundle manifest references none of that repo's files. Both lines now say what the bundle serves, matching the policyengine skill. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
uk-data-issue-routing
branch
from
November 8, 2026 20:30
597ab30 to
b4f7854
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.
report-logger filed every UK
INVESTIGATEdata issue inPolicyEngine/policyengine-uk-data. policyengine.py 6.16.0 loads Microcosm'smicrocosm_uk_2024_25whenever a UK caller names no dataset, and policyengine-api runs only that default. So those issues went to a repo that didn't build the run's data. report-logger now files each data issue in the repo that built the run's dataset:PolicyEngine/microcosm(unchanged)PolicyEngine/microcosmenhanced_frs_*,frs_*)PolicyEngine/policyengine-uk-dataPolicyEngine/policyengine-{country}-data(unchanged)Structural issues still go to
PolicyEngine/policyengine-{country}.What changes
report-logger.mdpicks the repo from the run's country and, for UK runs, a newdataset_at_runfrontmatter field, in both its routing prose and its issue-filing bash. Microcosm now receives data issues from both countries, so the issue body names the dataset and its data version.microsim-runner.mdadds UK guidance for the API path (regionuk, baseline policy1, nodatasetparameter) and for the local path, wherepe.uk.ensure_datasets(datasets=[dataset], years=[year])loads a named dataset. It accepts an optionaldatasetfor local runs and returnsdatasetanddata_versionwith each result./analyze-policygains--dataset, which needs--mode local, and recordsdataset_at_runin the archive.calibration-diagnostics.mdpoints a UK hypothesis at Microcosm's UK target files, or at policyengine-uk-data when the run used one of its files. It also tells the agent that the calibration API lists only US releases.policyengineskill said the pre-2026 datasets "are gone", and thepolicyengine-dataskill said the per-area files "no longer exist" and "were removed". Thepolicyengineandpolicyengine-ukskills now say that policyengine.py serves the Enhanced FRS and FRS files only when a caller names one, from the gatedpolicyengine/policyengine-uk-data-privaterepo. Thepolicyengineandpolicyengine-dataskills now say that the bundle serves no per-area file.test_country_routing.pychecks the rule with example, property and differential tests. The differential tests run report-logger's bash andresolve_issue_repo, a Python restatement of the rule, on the same inputs.log_todescription and target-repo comment,reform-pipeline.md,docs/structured-output-and-chaining.mdandtests/pipeline/README.mdrepeat the rule, andanalyses/README.mddocumentsdataset_at_run. The stale-reference guard's message for per-area paths now says the bundle serves no such file.Evidence
microcosm_uk_2024_25as the UK defaultmanifest.json:106dataset_overlays, inpolicyengine/policyengine-uk-data-private, and_apply_dataset_overlaysraises an error for any overlay that would shadow a certified datasetmanifest.json:261-320,provenance/manifest.py:756-788resolve_managed_dataset_referencereturns the certified default when the caller names no dataset, and the named file otherwiseprovenance/manifest.py:1357pe.uk.ensure_datasetsloads named datasets, andpe.ukexportseconomic_impact_analysisbut nocalculate_budgetary_impactuk/datasets.py:378-424,uk/__init__.py:46-61dataset="default"routes/economy_routes.py:128,:290GET /uk/economy/1/over/1?region=uk&time_period=2026&dataset=enhanced_frs_2024_25returned HTTP 400, "dataset: Extra inputs are not permitted", on 2026-11-08, and the US route answered the same wayquery_parameters.py:114-117,:152policyengine_bundlewith the model version, data version and datasetservices/economy_impact_execution.py:402/uk/metadatalists one dataset undereconomy_options.datasets:microcosm_uk_2024_25build/uk/and its UK build stages inbuild/uk_runtime/3db6515GET https://calibration-diagnostics.vercel.app/calibration/dashboard/api/microcosm/releases, 2026-11-08policyengine/policyengine-us-datastill holds 51 state and 436 district H5 files, and the bundle manifest references no file from that repomanifest.json, 2026-11-08Invariants
test_country_routing.pychecks these for any dataset string Hypothesis generates:Noneor onePolicyEngine/<repo>name;INVESTIGATEandstructuralverdicts open an issue;INVESTIGATErouting ignore the dataset;INVESTIGATErouting lands in microcosm or policyengine-uk-data and reads only the dataset's name, which it takes as policyengine.py'sdataset_logical_namedoes (drop any@revision, keep the last path segment), so a dataset name and itshf://URI route alike;resolve_issue_repoagree forusanduk.A strict xfail records the one case where the two disagree: the bash sends
catopolicyengine-ca-data, the prose sends it topolicyengine-canada-data, and neither repo exists.Not in this PR
datasetquery parameter, which policyengine-api answers with HTTP 400. Its table of advertised US datasets also lists names that/us/metadatano longer serves.model-corroborator.md:105sends the same parameter, andtests/pipeline/test_dataset_naming.pytreats the old US names as advertised and the live default as a bad name.PolicyEngine/microcosmnorPolicyEngine/policyengine-uk-datahas thecalibrationorauto-filedlabel that report-logger'sgh issue create --labelpasses, andghstops before it creates an issue whose label the repo lacks (params.go:106-109).caroute, which sends data issues to repos that don't exist.Tests
uv run pytest --ignore=tests/test_skill_examples.pypasses 256 tests and xfails thecacase.scripts/build_claude_wrapper.pycopies the eight edited agents, commands and skills into the wrapper byte for byte.Before merge
🤖 Generated with Claude Code