Skip to content

feat: serve task provenance #322

Closed

Description

@uniqueg

Problem

Owners and admins can't see which plugins changed a task, which
backends were tried and why they failed. proTES records only the
backend chain, in tesTaskLog.metadata.forwarded_to, an array of
objects in a string map, which isn't TES-compliant (strict generated
clients may fail on it).

Proposal

  1. Endpoint GET /ga4gh/tes/v1/tasks/{id}/provenance (proTES
    extension in api/additions.openapi.yaml): the task's provenance
    document (stored since T1), with the plugin_builds and pipelines
    references expanded; owners and admins only, with the same ownership
    rules and 404 behaviour as GET /tasks/{id}. Tasks created before
    T1 have none (404 with a clear detail, or an empty document: see
    open questions).
  2. Normalisation: collections plugin_builds and pipelines in the
    task DB (indexes in config.yaml), filled with FOCA's helpers
    (); client pipelines stay inline in the task document.
  3. Gateway tags (FOCA ): at creation gateway.pipeline_hash,
    gateway.pipeline_source, gateway.plugins, gateway.provenance;
    with the backend update gateway.backend, gateway.backend_task_id,
    gateway.forwarded_at, gateway.attempts, gateway.route
    (gateway.route_truncated). Served in the BASIC and FULL views.
  4. forwarded_to deprecated: still written and served in this
    release, marked deprecated: true in additions.openapi.yaml
    (tesForward), in the docs and in the release notes, pointing to the
    tags; removed in T5. The tracker keeps reading forwarded_to.id and
    remote_task_id of stored tasks.
  5. Docs: API page (endpoint, tags, deprecation), access control
    (who sees provenance), operations (GDPR notes: no new personal data,
    retention with the task, record_failed).

Acceptance criteria

  • Owners and admins get the provenance of a task; others 404.
  • New tasks carry the gateway.* tags in BASIC/FULL; the
    relayed task carries none.
  • forwarded_to is still served and marked deprecated.
  • Tests for the endpoint, tags, deprecation flag; 100% coverage.

Dependencies

Open questions

  • Tasks without provenance (created before T1): 404 with detail "no
    provenance recorded" (chosen, consistent with "served as absent") or
    200 with an empty document?

Activity

  1. added
    priority: high
    status: blocked
    type flag: spec change
    type: feature
    workload: days
    on Oct 24, 2026
  2. added
    status: in progress
    and removed
    status: blocked
    on Oct 31, 2026
  3. removed
    status: in progress
    on Oct 31, 2026
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

    priority: hightype flag: spec changetype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions