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.
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
Suggested implementation notes
run_idand jobidas stable state keys.Acceptance criteria