Skip to content

Cross-dataset page per jurisdiction (BE bundle live; fail closed on manifest jurisdictions) - #167

Merged
MaxGhenis merged 1 commit into
mainfrom
cross-dataset-per-jurisdiction
Aug 23, 2026
Merged

Cross-dataset page per jurisdiction (BE bundle live; fail closed on manifest jurisdictions)#167
MaxGhenis merged 1 commit into
mainfrom
cross-dataset-per-jurisdiction

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

The Cross-dataset page (/microcosm/datasets) read one global bundle, was nav-gated US-only, and never checked a bundle's jurisdictions against the selected country. Belgium's evaluation bundle now exists (#164; hosted at policyengine/microcosm-evaluation), so:

  • Per-country bundle configuration, same pattern as the per-country HF release repos: the unsuffixed CROSS_DATASET_ARTIFACT_{DIR,BASE_URL} stay the US contract; _UK / _BE suffixes for the others (+ CROSS_DATASET_EXPECTED_RUN_ID_<CC>); one cached reader per country; the DIR/URL exclusivity rule applies per country.
  • Fail closed: a configured bundle must list the selected country in manifest.jurisdictions (UK or GB accepted for the UK), otherwise the existing 503-style artifact error ("bundle is for jurisdictions BE, not US"). An unconfigured country gets the existing unavailable state naming the country and its variables.
  • country threaded through every Cross-dataset API view, hook, catalog and detail link; country switches discard bundle-specific fact/source/filter URL state.
  • Nav shows Cross-dataset for every country; page copy and controls come from the bundle's own source labels and group metadata (no US presentation assumptions); the capped-relative-error definition text is unchanged.
  • Tests: route (BE-only config serves BE, US stays unconfigured), env resolution, jurisdiction aliasing and mismatch, country-switch URL behaviour, nav visibility, trimmed BE bundle fixtures. 219 pass; tsc --noEmit; next build.

Prod has CROSS_DATASET_ARTIFACT_BASE_URL_BE set; US stays unconfigured until a US bundle is published.

Boundary (Max, today): anything comparable to authoritative government facts belongs on this page and must be visible for other models too; the Scorecard keeps estimates with no such ground truth.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
calibration-diagnostics Ready Ready Preview Aug 23, 2026 6:11pm

Request Review

@MaxGhenis
MaxGhenis merged commit 055c582 into main Aug 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant