From 77dc89bc2a3fcd0d53ee30139dbb3d3b9c73d2fb Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 16 Sep 2025 16:16:41 -0700 Subject: feat(roleplay_limiter): Lower surge thresholds --- src/umabot/config.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/umabot/config.py b/src/umabot/config.py index a58c446..39c034c 100644 --- a/src/umabot/config.py +++ b/src/umabot/config.py @@ -33,10 +33,10 @@ class Config: roleplay_limit_window_hours: int = 24 # hours dry_run: bool = False - # Surge-based roleplay limiting - roleplay_surge_threshold_1: int = 25 # First threshold for surge detection - roleplay_surge_threshold_2: int = 45 # Second threshold for surge detection - roleplay_surge_threshold_3: int = 70 # Third threshold for surge detection + # Surge-based roleplay limiting (data-driven thresholds) + roleplay_surge_threshold_1: int = 8 # First threshold: ~27% of daily posts + roleplay_surge_threshold_2: int = 12 # Second threshold: ~41% of daily posts + roleplay_surge_threshold_3: int = 16 # Third threshold: ~55% of daily posts @classmethod def from_env(cls) -> "Config": @@ -58,9 +58,9 @@ class Config: post_limit_window_hours=int(os.getenv("POST_LIMIT_WINDOW_HOURS", "24")), roleplay_limit_window_hours=int(os.getenv("ROLEPLAY_LIMIT_WINDOW_HOURS", "24")), dry_run=os.getenv("DRY_RUN", "false").lower() == "true", - roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "25")), - roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "45")), - roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "70")), + roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "8")), + roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "12")), + roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "16")), ) def validate(self) -> None: -- cgit v1.2.3