Skip to content

feat(plugins): write gateway tags #494

Closed

Description

@uniqueg

Problem

proTES records forwards in tesTaskLog.metadata.forwarded_to, an array
in a string map, which is not spec-compliant, and WES has no
equivalent. Clients and dashboards need a compliant, trustworthy record
of where a task went.

Proposal

foca.plugins.tags:

  • Server-written keys under plugins.tags.prefix (default gateway.):
    at creation gateway.pipeline_hash, gateway.pipeline_source,
    gateway.plugins, gateway.provenance; after forwarding
    gateway.backend, gateway.backend_task_id, gateway.forwarded_at,
    gateway.attempts, gateway.route (compact JSON of the last
    max_route_entries attempts), gateway.route_truncated.
  • Limits: keys ≤ 64 characters, values ≤ 1 KiB, gateway.route ≤ 4 KiB
    (dropped from the front), client tags gateway.pipeline and
    gateway.backends ≤ 8 KiB; URLs normalised, without user info or
    query; reason codes, never messages.
  • strip_for_forwarding(tags): removes every gateway.* key
    (including the client's gateway.pipeline and gateway.backends)
    from the relayed task.
  • creation_tags(run), routing_tags(run) for the app to store.

Acceptance criteria

  • Keys, limits, truncation and stripping tested; values are strings
    only (TES/WES string maps).
  • Docs: tag reference (for clients and dashboards; re-run rule).
  • 100% coverage, mypy, ruff, mkdocs build --strict.

Surviving the Connexion 3 migration

Pure functions on string maps and the run's provenance; framework-free.

Dependencies

Open questions

  • None.

Added during pre-review: tags stay string maps (gateway.pipeline_hash is left out when there is no hash; remote IDs are coerced to strings); FOCA provides the tag helpers (creation_tags, routing_tags, strip_for_forwarding) and apps write the tags; max_route_entries must be positive.

Activity

  1. added this to the v0.18.0 milestone on Oct 24, 2026
  2. added
    priority: high
    status: blocked
    type: feature
    workload: days
    on Oct 24, 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: highstatus: blockedtype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions