fix(safe): route Cap Money Multisig alerts to the CAP channel - #352
Merged
Conversation
The Cap Money Multisig was registered under the protocol label "CAP MONEY".
That field doubles as the Telegram channel key — send_telegram_message looks
up TELEGRAM_TOPIC_ID_{protocol.upper()} / TELEGRAM_CHAT_ID_{protocol.upper()},
which for this entry is "TELEGRAM_TOPIC_ID_CAP MONEY". That is not a legal
env-var name and can never be set, so every alert for this Safe hit the
"Missing Telegram credentials" branch in utils/telegram.py and was dropped
with only a log warning.
The Safe has been silent since it was added in 36fb771. monitoring.yaml
already lists a "Safe Multisig" monitor ("Cap Money Multisig queue") under
the cap protocol, and TELEGRAM_TOPIC_ID_CAP exists, so "CAP" is the intended
destination and matches where the CAP timelock monitor already reports.
It was the only entry in ALL_SAFE_ADDRESSES containing a space. Add a
regression test asserting every protocol label is a usable env-var suffix,
plus a comment recording the constraint.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
The Cap Money Multisig (
0xb8FC4940…8793) is registered inALL_SAFE_ADDRESSESunder the protocol label"CAP MONEY".That field doubles as the Telegram channel key.
send_telegram_messageresolves credentials as:For this entry that is
TELEGRAM_TOPIC_ID_CAP MONEY— not a legal env-var name, so it can never be set. Every alert for this Safe therefore fell into the missing-credentials branch (utils/telegram.py:243) and was discarded:The failure is silent — a log warning, no alert, no error. This Safe has produced no notifications since it was added in
36fb771.Fix
Relabel to
"CAP". That is the intended destination:monitoring.yamlalready declares aSafe Multisigmonitor — "Cap Money Multisig queue" — under thecapprotocol.TELEGRAM_TOPIC_ID_CAPexists, and is where the CAP timelock monitor already reports."CAP MONEY"was the only entry inALL_SAFE_ADDRESSEScontaining a space, so no other Safe is affected.Regression test
Added
TestSafeProtocolLabels::test_protocol_labels_are_valid_env_var_suffixes, asserting every protocol label matches[A-Za-z0-9_]+. Verified it fails against the old value:Also documented the constraint in a comment above
ALL_SAFE_ADDRESSES.Why this matters now
Surfaced while reviewing a CAP timelock operation that moves UUPS upgrade rights from this multisig to the Timelock (see yearn/risk-score#460). The multisig retains 92 Access Control roles after that operation, including 11 selectors on cUSD it can call with no timelock delay (
pauseProtocol,rescueERC20,setWhitelist,removeAsset, …). Its queue is exactly what we want eyes on, and we had none.Testing
🤖 Generated with Claude Code