Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,11 @@ LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR (DEBUG skips Telegram sends)
REQUEST_TIMEOUT=30
RETRY_COUNT=3
BACKOFF_FACTOR=1.0

# Independent emergency destinations. Unset secret disables only that destination.
# LIQUIDITY_WEBHOOK_URL=http://127.0.0.1:8080/webhook/emergency
# LIQUIDITY_WEBHOOK_SECRET=separate-liquidity-shared-secret
# VAULTS_MOMMY_WEBHOOK_URL=http://127.0.0.1:8081/webhook/emergency
# VAULTS_MOMMY_WEBHOOK_SECRET=separate-vaults-mommy-shared-secret
# Durable outbox defaults to $CACHE_DIR/emergency_dispatch.sqlite3.
# EMERGENCY_DISPATCH_DB=/srv/cache/emergency_dispatch.sqlite3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ label-cache/
monitoring.db
monitoring.db-wal
monitoring.db-shm

# Durable emergency webhook outbox (including SQLite sidecars)
emergency_dispatch.sqlite3*
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ For more details about this repository, check out AI generated docs using DeepWi
## License

This repository is licensed under the GNU Affero General Public License v3.0. See [LICENSE](./LICENSE).

## Emergency webhook delivery

[Durable emergency delivery](utils/dispatch.md) documents the independent liquidity-monitoring
and optional vaults-mommy destinations, signed payload compatibility, severity-aware cooldowns,
recurring retries, persistent outbox and explicit recovery of terminal errors.
6 changes: 6 additions & 0 deletions automation/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

profiles:

emergency_delivery:
cron: "* * * * *"
description: "Drain durable emergency webhook retries even when no new alert fires."
tasks:
- { name: "emergency-delivery-retries", script: utils/dispatch_retry.py }

half_hourly:
cron: "*/30 * * * *"
description: "Thirty-minute risk monitoring for active Yearn strategies, and timelock alerts."
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _isolate_from_live_apis(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) ->
"""
for key in list(os.environ):
if key in {"ETHERSCAN_TOKEN", "LIQUIDITY_WEBHOOK_SECRET", "TENDERLY_API_KEY"} or key.startswith(
("PROVIDER_URL_", "TELEGRAM_", "LIQUIDITY_WEBHOOK_")
("PROVIDER_URL_", "TELEGRAM_", "LIQUIDITY_WEBHOOK_", "VAULTS_MOMMY_WEBHOOK_", "EMERGENCY_DISPATCH_")
):
monkeypatch.delenv(key, raising=False)
monkeypatch.setenv("LOG_LEVEL", "INFO")
Expand Down
Loading
Loading