Skip to content

[Task] Correct the specification §7.2 flows/cells example to the B2 contract #102

Closed

Description

@DavidVFitzGerald

Delivery phase

Documentation. Requested by the maintainer on 2026-11-16, during L2 #97 grooming.

Goal

Make the §7.2 example in the specification match the delivered B2 API contract.

Context and authority

  • The §7.2 example shows revision_snapshot as plain revision UUID strings.
  • The delivered B2 API (apps/api/src/lca_api/dtos.py: Snapshot, FlowCellsRequest, Envelope, Cells) and the frontend both use {release_id, revision_id} pairs (RevisionRef in packages/python/lca_shared/src/lca_shared/contracts.py).
  • The example also omits fields that the request and response require:
    • comparison_token, required in both the request and the response;
    • request_id, in the response.

This is an illustrative example being aligned with the delivered contract that §7.1 already describes. It changes no product or scientific meaning, so no ADR is needed.

Requirements and constraints

  • Update only the §7.2 JSON example in docs/engineering/LCA_diff_Implementation_Specification.md so that it matches the B2 DTO field names and shapes.
  • No code, API or PRD changes.

Acceptance criteria

  • AC1 — The request example contains process_ids, row_keys, comparison_token and a revision_snapshot of {release_id, revision_id} objects.
  • AC2 — The response example contains request_id, the same revision_snapshot shape, comparison_token and cells matching FlowCell (process_id, row_key, present, amount, warnings).
  • AC3 — No other files change, apart from the roadmap if needed. git diff --check is clean.

Out of scope and follow-ups

Other contract reconciliation belongs to L2 #97.

Verification plan

Documentation only: cross-check the example against dtos.py and contracts.py, and run git diff --check.

Dependencies and readiness

None. Ready.

Activity

  1. added
    task
    on Nov 16, 2026
  2. DavidVFitzGerald commented on Nov 16, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS

    Reviewed: PR #104 at 421e67b1d7b70bab4429a408c0bab9e42fdf410f. Independent, documentation-only QA.

    • AC1 PASS: the request keys are exactly comparison_token, process_ids, revision_snapshot and row_keys. This matches FlowCellsRequest, built from Selection and Snapshot (list[RevisionRef]).
      • There are no missing or extra keys, which matters because the models use extra="forbid".
      • The row_key format matches queries.py:482 and the parser.
      • The token placeholder matches the signed comparison token issued by the rows endpoints.
    • AC2 PASS: the response keys are exactly cells, comparison_token, request_id and revision_snapshot. This matches Cells[FlowCell], built from Envelope.
      • The snapshot and token are echoed from the request.
      • The cells are FlowCell plus FlowValue, and they obey the presence/amount rule, with amounts as strings.
    • AC3 PASS: only the §7.2 JSON blocks changed, +9/−2. git diff --check is clean.
      • Both JSON blocks parse; this was validated in a capability-dropped container.
      • §7.1 and §7.3 meaning is unchanged, so no ADR is needed.

    Hosted CI: 4/4 checks pass at the reviewed SHA. QA made no changes.

    Coordinator handoff: PR #104 is ready for maintainer review and merge. Close #102 after the merge.

  3. DavidVFitzGerald commented on Nov 16, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Closed by the coordinator. The correction was delivered in PR #104, which the maintainer merged at 0fe3ff3. It passed independent QA (PASS at 421e67b) with hosted CI 4/4 passing.

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

    task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions