Repository navigation
Closed
Labels
Description
Epic: #70 · S2 · documentation · depends on #71
Background
The single highest-value gap: no document explains the repo's role relative to the platform, or its internal seams. The accurate picture currently lives only in register C-40, code docstrings, and a views-models postmortem. This story creates the orientation doc a newcomer should read first — the one that would have prevented the un_fao postmortem's multi-attempt investigation.
Work
Create docs/architecture/role_and_seams.md (final path per S1) covering:
- Platform topology: datafactory (producer) → pipeline-core (framework) → views-postprocessing (post-forecast delivery) → views-faoapi (serving API). Dependency direction is one-way down; pipeline-core does not import vpp (verified: 0 imports; the only mentions are comments asserting no cycle).
- What vpp is: it is-a pipeline-core postprocessor — subclasses
PostprocessorManager+ForecastingModelManager(Template Method;execute()lives in the base and calls back into vpp's_read/_transform/_validate/_save). It fills the post-forecast lifecycle slot with delivery + input-integrity, not statistics. Statistics live downstream: collapse in faoapi (views_frames_summarize); reconciliation inviews_frames_reconcile. - The seams:
views_postprocessing/delivery/= representation-free invariants (primitives only) ↔views_postprocessing/unfao/extraction.py= the pandas seam that feeds them. The manager calls the invariants, never inherits them.- the inherited pandas base (
ViewsDataLoader,PGMDataset) and the C-40 gate — why a frame can't go end-to-end yet. - the draws / uncertainty contract: vpp must carry
(N, S)samples uncollapsed; collapse happens once, downstream (FAO delivery path is point/DataFrame-based — won't carry rusty_bucket's pooled draws #45). Contrast the native(N, S)frame vs pandas object-dtype list-in-cell.
- A simple diagram of the
read → enrich → validate → clip → saveflow and where each seam sits.
Acceptance criteria
- A reader can answer "what is this repo, what's its role vs the 3 sibling repos, where are the seams" from this doc alone.
- Dependency direction stated correctly (vpp → pipeline-core; pipeline-core does not import vpp).
- References C-40 and FAO delivery path is point/DataFrame-based — won't carry rusty_bucket's pooled draws #45 for the live constraints; contains no deleted symbols.
Validation / testing
- Cross-check every structural claim against code:
unfao/managers/unfao.py(inheritance + stages),delivery/+unfao/extraction.py(the seam), register C-40. - The S6 guardrail will later assert this doc has no deleted-symbol references and no dead links.
Dependencies
- Depends on S1 (IA decides this doc's path + responsibility). Blocks S3 and S4 (they link/align to it).
Notes
- Source material already written: register C-40, the un_fao pre/post-run postmortems (views-models
reports/un_fao_delivery_*_postmortem.md), and this epic's investigation.
Activity
Merge pull request #79 from views-platform/docs/s2-role-and-seams