feat: add reminders_wfigs.enabled kill switch, default disabled

Adds (reminders_wfigs, enabled) to REGISTRY (default=False) and
gates _tick_adapter() on the flag — when false, wfigs fire reminders
are skipped entirely. Use the digest instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson (via Claude) 2026-06-09 05:45:25 +00:00
commit 376b0dbb2d
2 changed files with 15 additions and 0 deletions

View file

@ -487,6 +487,11 @@ REGISTRY: dict[tuple[str, str], dict[str, Any]] = {
# =================================================================
# v0.6-phase3 reminders: per-adapter clock-driven re-broadcast config.
# =================================================================
("reminders_wfigs", "enabled"): {
"default": False,
"type": "bool",
"description": "Enable Active: reminder broadcasts for ongoing fires. Disabled by default — use the digest instead.",
},
("reminders_wfigs", "cadence_kind"): {
"default": "interval",
"type": "str",

View file

@ -117,6 +117,16 @@ class ReminderScheduler:
async def _tick_adapter(self, adapter: str) -> int:
"""Look up the reminder config + query the adapter's table."""
# Per-adapter kill switch: adapter_config reminders_<name>.enabled
try:
from meshai.adapter_config import adapter_config
ac_adapter = f"reminders_{adapter}"
enabled = _safe_get(adapter_config, ac_adapter, "enabled")
if enabled is not None and not enabled:
return 0
except Exception:
pass
cfg = _ReminderConfig.load(adapter)
if cfg is None:
return 0