test: update stale assertions post feature/mesh-intelligence merge

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson (via Claude) 2026-06-10 03:43:06 +00:00
commit dcb53ae30c
15 changed files with 182 additions and 130 deletions

View file

@ -370,6 +370,15 @@ def test_real_dispatch_arms_cold_start_anchor(db_path):
def test_real_dispatch_stale_drop_persists(db_path):
"""A stale event increments stale_dropped on disk."""
# The dispatcher reads fire freshness from adapter_config.wfigs.freshness_seconds
# (default 0 = disabled). Set it to 60 so the stale gate triggers.
from meshai.persistence import get_db as _gdb
_gdb().execute(
"UPDATE adapter_config SET default_json='60', value_json='60' "
"WHERE adapter='wfigs' AND key='freshness_seconds'"
)
from meshai.adapter_config import adapter_config as _ac
_ac.invalidate()
cfg = _build_config(cold_start_grace=0, fire_freshness=60)
factory, _ = _mk_channel_factory()
d = Dispatcher(cfg, factory)