Skip to content

fix(timelock): show operation ID in scheduled alerts, escape stale alert label - #410

Merged
spalen0 merged 1 commit into
mainfrom
timelock-alert-followups
Oct 3, 2026
Merged

spalen0 merged 1 commit into
mainfrom
timelock-alert-followups

Conversation

@spalen0

@spalen0 spalen0 commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Follow-ups to #409, found by a code review of that PR.

Changes

  • Scheduled alert shows the operation ID. TimelockController and Compound alerts (and unknown types) now have 🆔 Operation ID: \0x…`in the header, in the same format as the stale-operation alert. This lets you match a stale alert to the original scheduling alert and copy the ID intogetTimestamp/cancel. The line is in the header, so it survives when long call lists are truncated, and a batch shows it once. Aave, Lido and Maple keep their own 🆔 Proposal:/🆔 Vote:lines. An event with nooperationId` gets no line, instead of an empty code span.
  • Stale alert escapes the timelock label. format_operation put operation.timelock.label into Markdown V1 unescaped. A _, *, ` or [ in a config label would make Telegram reject the message and fall back to plain text. It now uses escape_markdown, as timelock_alerts.py already does.
  • Docs. monitoring.yaml cards (Timelock Events, Stale Ready Operations) and the timelock README now mention the operation ID, as AGENTS.md requires.

Testing

  • New tests: ID shown before calls, once per batch, kept under truncation, shown for Compound/unknown types, absent for Aave/Lido/Maple, no empty code span when the ID is missing; label escaping in the stale alert. 6 of them fail without the code changes.
  • uv run pytest -q tests/test_timelock_alerts.py tests/test_timelock_stale_operations.py tests/test_monitoring_config.py: 49 passed.
  • prek run --all-files (ruff check, ruff format, ty) passes.
  • Full suite: 4 failures in tests/test_safe_main.py::TestSafeApiQuota. They fail the same way on main and are unrelated to this change.

🤖 Generated with Claude Code

…ert label

Follow-ups to #409:
- Scheduled TimelockController/Compound (and unknown-type) alerts now show
  the full operation ID as inline code in the header, matching the stale
  alert's "Operation ID" line so the two can be matched. Aave/Lido/Maple
  keep their proposal/vote lines.
- Escape the timelock label in stale-operation alerts; a Markdown special
  in a config label made Telegram reject the message.
- Update monitoring.yaml cards and the timelock README.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@spalen0
spalen0 merged commit 48c0512 into main Oct 3, 2026
3 checks passed
@spalen0
spalen0 deleted the timelock-alert-followups branch October 3, 2026 13:39
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