You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e88d5b1
Browse filesBrowse the repository at this point in the historyBrowse files
* feat(serving): alert history + alert-rule repository behind ControlPlaneStore (ADR 0010 slice 2)
Second rollout slice of ADR 0010: alert delivery history and the alert-rule
repository (including mutable runtime state — state, fired_at,
last_escalation_level, flap window, cooldown) move behind the
ControlPlaneStore port. Pure extraction — table DDL, the YAML file format,
and the dispatcher/router behavior are byte-compatible; no behavior change
on the embedded (default) profile.
- ControlPlaneStore gains log_alert_delivery / get_alert_delivery_history
(mirrors the webhook attempt-log shape) and load_alert_rules /
save_alert_rules (JSON-shaped records — the port doesn't import the
AlertRule pydantic model, avoiding a cycle with alerts.dispatcher, which
imports get_control_plane_store to resolve the store).
- EmbeddedControlPlaneStore gains ensure_alert_history_table (moved verbatim
from alerts/history.py, same catalog_ddl_lock discipline as its webhook
siblings) and alert_rules_path_provider (mirrors conn_provider — resolved
per call so app.state.alert_config_path swaps in tests keep working).
- alerts/escalation.py and routers/alerts.py no longer reach
query_engine._conn (structural ratchet test extended); create_alert /
list_alerts / get_alert / update_alert / deactivate_alert now take the
FastAPI app (resolving the store internally) instead of a bare Path.
- src/serving/api/alerts/history.py removed; its DB-plumbing backwards-compat
re-exports (get_alert_history, ensure_alert_history_table) retired from
the alert_dispatcher.py shim — internal plumbing, not public SDK surface.
Tests: tests/unit/test_control_plane_store.py gains alert history log +
YAML rule-repository round-trip coverage; test_catalog_ddl_concurrency,
test_alert_dispatcher_backcompat, test_alerts_router_unit,
test_blocking_routes_offloaded and integration test_alert_dedup rewired to
the new module/signatures.
Verified: full unit+property 1561 passed, mypy strict clean, ruff clean,
integration (docker/live excluded) 206 passed/19 skipped.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* style: ruff format tests/unit/test_control_plane_store.py
---------
Co-authored-by: JuliaEdom <uedomskikh@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
0 commit comments