Skip to content

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

Closed

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

  1. added
    story
    implementation
    on Jun 24, 2026
  2. changed the title [-]S5 — Structured delivery provenance in upload metadata (C-15, supersedes #12)[/-] [+]S5 — Structured delivery provenance invariant (C-15, supersedes #12)[/+] on Jun 26, 2026
  3. Polichinel commented on Jun 26, 2026

    @Polichinel
    CollaboratorAuthor

    Delivered and merged to development via #64 (input-integrity sprint S0–S6). ruff clean, 126 passed / 44 xfailed. Closing — the auto-close keyword did not fire because #64 merged into development, not the default branch. Live-run validation of the residual contracts (C-25 identity name/loa, C-43 enrichment equivalence) is tracked in the risk register and exercised by the go-global run (views-models#127).

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

    implementationstory

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions