Draft: [skip ci] Coalesce ciPipelineStatusUpdated updates

What does this MR do and why?

ciPipelineStatusUpdated has one topic for each pipeline and no rate limit. It is triggered when the pipeline status changes and again for every stage status change, because GraphqlTriggers.ci_stage_status_updated also triggers the pipeline topic. !257495 (closed) adds one more trigger for each failed job. Each trigger pushes the whole pipeline payload to every open page of that pipeline.

On GitLab.com, the field gets about 356 triggers each second on average and up to 734, and about 307 pushes to browsers each second, up to 1,662 (Grafana, 24 hours, 2026-10-21).

The payload is the current state of the pipeline, so the subscription fits the opt-in rule for coalescing from !266624 (merged):

coalesce window: 2.seconds

When graphql_subscription_coalescing is enabled for the topic, each websocket node runs the subscription at most once for each pipeline in each 2 second window, and always runs the last update. A subscriber can get an update up to 2 seconds later than today, plus the worker pool delay.

This MR depends only on the coalescer, not on !266626 (merged), so the two opt-ins can be reviewed and rolled out on their own.

It also makes the failed-jobs trigger in !257495 (closed) safe for large pipelines: a burst of job failures then costs one push for each window, not one push for each failure.

How to set up and validate locally

The coalescer specs in !266624 (merged) cover the behaviour. This MR only declares the window.

bin/rspec spec/graphql/subscriptions/ci/pipelines/status_updated_spec.rb

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

References

Merge request reports

Loading
Loading