Skip to content

Add SQLite-backed alerts API#273

Open
spalen0 wants to merge 2 commits into
mainfrom
db
Open

Add SQLite-backed alerts API#273
spalen0 wants to merge 2 commits into
mainfrom
db

Conversation

@spalen0

@spalen0 spalen0 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add SQLite-backed alert persistence and best-effort capture from Telegram, structured alerts, crash alerts, ops errors, and automation digests
  • add stdlib read-only alerts API plus monitoring-api systemd unit, deploy install integration, runbook docs, and retention job
  • migrate utils.cache state to SQLite with legacy text read-through, CACHE_BACKEND=file rollback, and deploy/migrate-file-cache-to-db.sh for live imports

Verification

  • uv run --extra dev ruff format .
  • uv run --extra dev ruff check .
  • uv run --extra dev mypy --explicit-package-bases utils/paths.py utils/store.py utils/cache.py utils/migrate_cache_to_db.py utils/telegram.py utils/alert.py utils/runner.py automation/runner.py api utils/prune_alerts.py
  • uv run --extra dev pytest tests/ (502 passed, 4 skipped)
  • bash -n deploy/install.sh
  • bash -n deploy/migrate-file-cache-to-db.sh
  • deploy migration wrapper smoke-tested against a temp CACHE_DIR

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