Skip to content

fix(alerting): resolve Main CI alerts when the job passes on latest main - #122

Merged
khluu merged 1 commit into
mainfrom
alerting/resolve-on-latest-main-pass
Sep 3, 2026
Merged

khluu merged 1 commit into
mainfrom
alerting/resolve-on-latest-main-pass

Conversation

@khluu

@khluu khluu commented Sep 3, 2026

Copy link
Copy Markdown
Member

Problem

Main CI alerts were going stale: a job fails, a fix lands on main, the job goes green again — but the alert stays open.

Root cause: the hourly backstop's targeted re-check (MainCIBackstopHandler) only refetched the build where the alert last failed (open_main_ci_alert_builds). When the fix lands in a later commit, the passing execution exists only on newer builds, which were never refetched. The 2-minute poller can also miss a pass if it finished while the worker was down and the scan window moved past. Either way, no newer pass ever reaches reconciliation, so the alert sits open indefinitely.

Change

The backstop now also fetches the newest finished main build and reconciles every open alert's job key against it:

  • alerting/main_ci.py — new MainCILatestBuildRef + MainCIBackstopStore.latest_finished_main_ci_build(); the handler adds the latest build to its targeted re-check set.
  • alerting/postgres.py / alerting/memory.py — implement latest_finished_main_ci_build() from alerting_main_ci_job_states (max latest_build_number).

Resolution flows through the existing order-guarded path in commit_main_ci_scan, so an older failure finishing late still cannot overwrite a newer pass, and the sweep still never advances the poller's scan cursor.

Deliberate boundary: if a job no longer runs on main at all (removed/renamed — e.g. a deleted model's test job), no pass observation exists, so the alert stays open for manual close rather than silently auto-resolving.

Tests

Three new tests in alerting/tests/test_main_ci.py:

  • resolves an open alert via the latest-build re-check when the pass was never observed by poller or sweep
  • keeps the alert open when the job is absent from the latest build (removed/renamed)
  • keeps the alert open (and increments failure count) when the job still fails on the latest build

uv run --extra dev pytest: 197 passed. ruff check clean on touched files; the two mypy errors in analyzer.py (boto3 stubs) are pre-existing.

AI assistance: this change was made with AI assistance (Kimi Code CLI).

The hourly backstop's targeted re-check only refetched the build where
an alert last failed. When a fix lands in a later commit, the passing
execution exists only on newer builds — which were never refetched — so
alerts stayed open even though the job had been green on main for days.

The backstop now also fetches the newest finished main build (tracked
via a new latest_finished_main_ci_build() store method, derived from
alerting_main_ci_job_states) and reconciles every open alert's job key
against it. A newer pass there resolves the alert through the existing
order-guarded path, so an older failure still cannot overwrite it.

Jobs that no longer run on main (removed or renamed) produce no pass
observation, so those alerts deliberately stay open for manual close
rather than silently auto-resolving.

Co-authored-by: Kimi Code <noreply@moonshot.cn>
Signed-off-by: khluu <khluu000@gmail.com>
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vllm-ci-dashboard Ready Ready Preview Sep 3, 2026 4:23am UTC

Request Review

@khluu
khluu merged commit 2f2fe81 into main Sep 3, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — abee973d Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant