Skip to content

Make workflow and job gauges stateful and idempotent #44

@darthfork

Description

@darthfork

Parent issue: #35

Summary

Workflow/job gauges are currently mutated directly from event status values. This makes them vulnerable to duplicates, missed transitions, out-of-order events, and restarts.

Goals

  • Track workflow and job states by stable identifiers.
  • Apply transitions idempotently.
  • Derive queued/in-progress/completed gauge values from tracked state.

Suggested implementation notes

  • Use run_id and job id as stable state keys.
  • Keep bounded in-memory state with TTL or eviction.
  • Define behavior for restarts and incomplete history.

Acceptance criteria

  • Duplicate and out-of-order events do not cause gauge drift.
  • Gauge semantics are documented clearly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions