Repository navigation
Broaden scope: accept reconciliation from views-reporting #3
Description
Proposal
Broaden views-postprocessing from "partner delivery" to "all post-forecast operations" and accept reconciliation (hierarchical country↔grid forecast consistency) from views-reporting.
Why
Reconciliation currently lives in views-reporting but it's not reporting — it's called by ensemble managers in pipeline-core as a core pipeline step before any reporting, evaluation, or delivery. It makes raw predictions consistent. That's post-processing.
views-postprocessing already has the spatial infrastructure (PriogridCountryMapper, bundled shapefiles) that reconciliation needs. Moving reconciliation here:
- Gives it the right roof (post-processing, not reporting)
- Removes views-reporting's torch dependency (reconciliation is the only consumer)
- Lets reconciliation use PriogridCountryMapper instead of viewser for country↔grid mapping
- Makes the dependency direction clean: pipeline-core → views-postprocessing (not pipeline-core → views-reporting for a non-reporting operation)
What would arrive
| Component | LOC | What it does |
|---|---|---|
| ReconciliationModule | ~293 | Orchestrates parallel country↔grid reconciliation with WandB alerting |
| ForecastReconciler | ~180 | Proportional scaling math (torch-backed, preserves zeros, clamps non-negative) |
| dataset_export | ~122 | Tensor extraction and dataset writeback utilities |
| Tests | ~200 | Type validation, temporal alignment, parallel execution, sum constraints |
| 2 CICs | — | Class Intent Contracts for both classes |
ADR-001 impact
The ontology would need a new category:
| Category | Purpose | Stability |
|---|---|---|
| Forecast Consistency Operations | Hierarchical reconciliation ensuring country totals match grid sums | Stable — core algorithm, changes require justification |
This broadens the repo from "partner delivery" to "post-forecast operations" — delivery is one kind of post-processing, reconciliation is another.
Metadata question
ReconciliationModule currently uses views_reporting.metadata.build_country_to_grids_cache() (viewser-based) for the country↔grid mapping. views-postprocessing already has PriogridCountryMapper which does the same thing via bundled shapefiles. During migration, reconciliation should switch to PriogridCountryMapper — this removes a viewser dependency and uses the authoritative spatial mapping engine that's already here.
Cross-reference
- views-reporting#72: "Reconciliation is not reporting — migrate to views-postprocessing"
- views-reporting#70: viewser dependency tracking (metadata complication)
Activity
Polichinel commentedon Jun 23, 2026
Execution plan created: this proposal is now broken into an epic + ordered stories + a tracking checklist. See #31 (epic) and #41 (tracking). Slice 1 (the numpy leaf + bit-exact parity) already landed in PR #30.
Polichinel commentedon Jun 26, 2026
Declining / closing (2026-06-26). This proposed broadening views-postprocessing's scope to own reconciliation. That premise is now reversed: the reconciler's correct home is the views-frames foundation (
views_frames_reconcile, Epic 11 / views-platform/views-frames#131), not vpp — it's a frame operation reused by forecasting ensembles, not by FAO delivery (CRP/SDP). vpp was only ever a way-station (PR #30); its copy is being deleted (#62). So vpp does not broaden to own reconciliation. Closing as declined. See register C-42.