The routing-heal added to get_or_create_session calls SessionDB.get_compression_tip; the stale-guard suite's bare MagicMock db returned a Mock the heal then assigned as session_id, failing JSON serialization. Model the real contract (a non-compressed session's tip is itself) so the heal is a correct no-op.