Skip to content

S5 — Structured delivery provenance invariant (C-15, supersedes #12) #56

Description

@Polichinel

Epic: #51 · S5 · depends on #61 (S0); uses #53 counts · supersedes #12 · story implementation

Problem (C-15)

Upload metadata lacks structured provenance (lookup version is only in a free-text description; no region, cell/unmapped counts, fill count). FAO can't audit what produced their data.

Build shape (per the epic design contract)

  • delivery/provenance.py (representation-free): build_provenance(...) -> dict from primitives — lookup_version, region, expected_cell_count, actual_cell_count, unmapped_count (+ fill_count if S2 provides it). No pandas.
  • Manager: attach the dict to both dsm.upload_data(...) metadata payloads (_save).

Acceptance criteria

Files

views_postprocessing/delivery/provenance.py (new), unfao/managers/unfao.py (_save), tests/.

Activity

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

    implementationCode implementation workstoryA single reviewable unit of an epic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions