Epic: #31 · Type: spike / decision — first story, gates the rest.
Background
The frozen views-reporting reconciliation groups grid cells by VIEWS country_id, which build_country_to_grids_cache fetches from viewser over the network (views_reporting/metadata/entity_metadata.py). Our GAUL lookup (views_postprocessing/data/gaul_lookup.parquet) carries admin1_gaul0_code — a different country-id system. To prove parity we must group by the same VIEWS country_id, and we want the parity test to run offline (no viewser, no torch in CI).
Work
- Build a small but realistic cm + pgm sample (several countries, multiple grid cells each, multiple months, ≥1 target, a real-ish sample count) — richer than
views-reporting/tests/test_reconciliation_module.py fixtures.
- Run the untouched views-reporting reconciliation on it with an explicitly injected country→grids mapping (bypass viewser), and freeze
(cm, pgm, mapping, reconciled_pgm) to a committed fixture (tests/fixtures/reconciliation_e2e_parity.npz) via a generator script (mirror scripts/gen_reconciliation_parity_fixture.py).
- Decide & record (short ADR or risk-register note): the frames-native module groups by an injected VIEWS
country_id mapping for parity; sourcing the mapping from the GAUL lookup (different id system) is a separate later decision.
Acceptance criteria
Validation
- Fixture loads with numpy alone; a smoke check confirms the slice-1
reconcile_proportional reproduces per-country slices of the oracle output.
Dependencies
First story — none.
Epic: #31 · Type: spike / decision — first story, gates the rest.
Background
The frozen views-reporting reconciliation groups grid cells by VIEWS
country_id, whichbuild_country_to_grids_cachefetches from viewser over the network (views_reporting/metadata/entity_metadata.py). Our GAUL lookup (views_postprocessing/data/gaul_lookup.parquet) carriesadmin1_gaul0_code— a different country-id system. To prove parity we must group by the same VIEWScountry_id, and we want the parity test to run offline (no viewser, no torch in CI).Work
views-reporting/tests/test_reconciliation_module.pyfixtures.(cm, pgm, mapping, reconciled_pgm)to a committed fixture (tests/fixtures/reconciliation_e2e_parity.npz) via a generator script (mirrorscripts/gen_reconciliation_parity_fixture.py).country_idmapping for parity; sourcing the mapping from the GAUL lookup (different id system) is a separate later decision.Acceptance criteria
Validation
reconcile_proportionalreproduces per-country slices of the oracle output.Dependencies
First story — none.