Skip to content

Alert channel takes alerts only: every team message routed by kind - #838

Merged
nambok merged 1 commit into
mainfrom
alerts-channel-alerts-only
Nov 24, 2026
Merged

nambok merged 1 commit into
mainfrom
alerts-channel-alerts-only

Conversation

@nambok

@nambok nambok commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

A team's alert channel got routine auto-merge status cards (merge conflicts, waits on an approving review). Every sender that wanted "the team's channel" opened the alert channel's settings item itself: the merge gate, security and infrastructure cards, plugin reviews, turned-off webhook endpoints, knowledge sign-ins, and log findings whose own setting was never saved. The merge gate also posted once per commit and wording, and posted waits on people's reviews, which are a pull request's normal state.

Every team-wide message now has a kind (alert, action or update), and its channels come from one router by kind. The alert channel takes alerts only unless the team ticks more; action and updates go to a new updates channel, or nowhere when there is none.

Changes

  • common::notify::route: Kind (alert, action, update), the kind of every message label, and per-destination kinds. The alert channel (ALERT_NOTIFY) saved before kinds existed reads as alerts only, the new updates channel (UPDATES_NOTIFY) as action and update. Reading old items this way is the migration: no write is needed and existing alert channels stop getting non-alerts at once. A test fails if any other file reads the alert channel's item.
  • Merge gate (await_merge): a wait on people's reviews never posts to a channel; the PR's status comment says it once. A conflict a person must resolve posts only where action messages go, once per PR and reason (told_sk), not once per commit or wording.
  • Security cards: a critical finding's new, raised and deadline cards are alerts; PR opened, CI passing, merged, withdrawn, lower tiers and the digest are updates. Infrastructure cards: P0 alert, P1 update.
  • Plugin reviews, turned-off webhook endpoints and knowledge sign-ins are action messages.
  • Log findings: in team mode an incident goes where alerts go and fix PR cards where updates go. The log analyzer Lambda posts new findings only to a channel that takes updates.
  • Alert cards on routes set to the team channel go through the router for the alert kind.
  • API: GET/PUT /api/updates-notify; /api/alert-notify returns and accepts kinds (left out, the saved kinds stay); test messages for the updates destination.
  • Incident case nt_alerts_channel_alerts_only and its page.

Verification

  • cargo fmt --all --check, rustfmt --check --edition 2021 worker/src/passes/incidents/*.rs
  • cargo clippy -p common -p gateway -p worker --all-targets -- -D warnings
  • cargo test -p common -p gateway -p worker
  • python3 -m pytest lambda/tests/test_log_analyzer.py

Every team-wide message is an alert, action or update, and picks its
channels through notify::route by that kind. An alert channel saved before
kinds existed takes alerts only; action and updates go to a new updates
channel. The merge gate never posts waits on people's reviews to a channel
and posts a conflict that needs a person once per PR and reason.
@nambok
nambok merged commit 7219c0e into main Nov 24, 2026
11 checks passed
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