Repository navigation
Conversation
This was referenced Oct 9, 2026
Open
This was referenced Oct 9, 2026
Open
Open
Open
Open
Collaborator
Author
Collaborator
Author
|
@coderabbitai review |
Contributor
✅ Action performedReview finished.
|
JuaniRios
force-pushed
the
rai-2998-alert-kind
branch
2 times, most recently
from
October 10, 2026 01:15
fbd6bef to
94cbce9
Compare
JuaniRios
force-pushed
the
rai-2998-console-json
branch
2 times, most recently
from
October 10, 2026 01:58
fe16690 to
c8c36c9
Compare
JuaniRios
force-pushed
the
rai-2998-alert-kind
branch
2 times, most recently
from
October 10, 2026 02:39
93e82b9 to
2d7244c
Compare
JuaniRios
force-pushed
the
rai-2998-console-json
branch
from
October 10, 2026 02:39
c8c36c9 to
04a3de7
Compare
JuaniRios
force-pushed
the
rai-2998-alert-kind
branch
from
October 10, 2026 03:14
2d7244c to
86403e8
Compare
JuaniRios
force-pushed
the
rai-2998-console-json
branch
from
October 10, 2026 03:14
04a3de7 to
5130604
Compare
JuaniRios
force-pushed
the
rai-2998-console-json
branch
from
October 10, 2026 04:11
5130604 to
c752cfa
Compare
JuaniRios
force-pushed
the
rai-2998-alert-kind
branch
from
October 10, 2026 04:11
86403e8 to
7320f93
Compare
This was referenced Oct 10, 2026
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of RAI-3103.
Every operational alert now logs a typed
kindfield. Item 5 of the RAI-2998 stack, part 3 of 3.Live effect: each
operational_alertline getskind="...". The message text is unchanged · Risk: medium (the alert pager reads these lines. A text-mode label changes only for an alert whose embedded error text named a different phrase, see below) · Ships: with the next bot releaseWhy
Today the
kindlabel onoperational_alertscomes from a regex over the message text in t0.devops. Every new or reworded alert needs a t0.devops PR, or it pages as unclassified. With JSON logs the bot can emit the kind itself (RAI-2998 comment, scope addition for item 5).Decisions
AlertKindinsrc/alerts/mod.rsis a closed enum, declared by one macro in two groups:extracted: 68 kinds. Their strings are exactly the extractor's phrases, in its order. Tests pin the list against the unclassified rule inobservability/alerting/liquidity.rules.yml, and a proptest checks the bot classifier against the real regex.not_extracted: 26 new kinds for alerts the regex cannot classify today (hedge stall, capital CCTP burns, recovery jobs, PnL ledger startup, and others). They still page as unclassified until the extractor and the rules learn them.Notifier::notify(kind, message). All 31 directerror!(target: "operational_alert", ...)sites logkind = AlertKind::X.as_str(), and a test fails on a site without one.CapturingNotifierchecks every alert a test drives: the kind must be what the regex reads from that message.kind="..."after the message, and the regex takes the rightmost phrase. So a text line now classifies by the field. This only changes a label when an embedded runtime error named a different phrase.Before the kind comparison on staging
kindandalert_kindonoperational_alert_kindswill show false mismatches.log_format = "json"is set. No config flips it here.Proof
cargo nextest run -p st0x-hedge -p st0x-configpasses. Clippy, fmt, pre-commit, andgen-t0-liquidity.py --checkare clean.Not in this PR
The
liq_trade,liq_transfer, andliq_eventstructured event lines. A stableevent_idneeds the committed event sequence, and the event-sorceryReactordrops it before the reactor sees it. That needs a sequence-aware hook in event-sorcery first, so it comes as a follow-up.Merge conditions
Same as the stack below.