Repository navigation
feat(morpho): audit live governance against daily jobs - #469
Merged
Merged
Conversation
Record each daily alert that implies an indexed event and settle it against the live path's decisions, so a missed event is reported instead of hidden by the daily job. Indexer lag stays waiting, never agreement. Before production cutover, also record when Telegram accepted production alerts, send one LOW correction when a reorg removes an event behind a sent alert, and wrap lines too long for one Telegram message. Guardian, sentinel and allocator changes stay daily-only by decision. Refs #437, #449 Co-Authored-By: Claude Opus 5.5 <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.
Implements the audit in #449 and the fixes needed before the #450 cutover (epic #437).
MORPHO_LIVE_DELIVERYis unchanged, so this does not switch anything to production.Audit (#449)
#453 made the live path re-read on-chain state, so there is no event-derived state to compare with the daily snapshots. The audit compares outcomes instead: each daily alert that implies an indexed event is recorded and checked against the live path's decision for that event, matched on market id, calldata, new role holder, or adapter.
matcheddivergentwaitingout_of_windowDivergences show in
reportandhealth, and post once to the errors chat as[morpho-live-audit]. Recording is best effort and cannot fail a daily job. It is skipped when the stream has no inbox.Reminders, resolutions, escalations of an operation already seen, and guardian, sentinel, and allocator changes are not audited. The last three role types stay daily-only by decision (recorded on #437).
Fixes before production
sent_at, andreportadds decision-to-Telegram and block-to-Telegram delays.Docs
monitoring.yaml, the Morpho README, the runbook (audit, cutover criteria, theCACHE_DIRrequirement forreport), and outdated "sends no alerts" docstrings.Testing
uv run ruff format,ruff check,ty check, andprekpass.tests/test_morpho_live_audit.pyis new, and 153 Morpho and subscriber tests pass.TestSafeApiQuotatests caused by a realSAFE_API_KEYin the local.env, andtest_sd_notify_sends_datagram(socket path too long on the local machine).🤖 Generated with Claude Code