Skip to content

Capture the offline parity oracle + decide the country↔grid id system #32

Closed

Description

@Polichinel

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

  1. 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.
  2. 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).
  3. 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.

Activity

  1. added
    story
    planning
    needs-decision
    reconciliation
    on Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionplanningreconciliationstory

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions