fix(robomp): promote deferred events on periodic sweep

Ran deferred-submission promotion on an independent timer in addition to the empty-queue path, so a sustained ordinary queue can no longer starve a rate-limited submitter after their rolling window frees. Added ROBOMP_DEFERRED_PROMOTION_SCAN_SECONDS to tune or disable the sweep.

Fixes #5882
This commit is contained in:
roboomp
2026-07-17 17:33:23 +00:00
parent aecef46436
commit 4d494cc512
4 changed files with 84 additions and 4 deletions
+5
View File
@@ -129,6 +129,11 @@ class Settings(BaseSettings):
rate_limit_default: int = Field(3, alias="ROBOMP_RATE_LIMIT_DEFAULT")
rate_limit_contributor: int = Field(10, alias="ROBOMP_RATE_LIMIT_CONTRIBUTOR")
rate_limit_unlimited_raw: str = Field("", alias="ROBOMP_RATE_LIMIT_UNLIMITED")
# How often the dispatcher sweeps deferred rate-limited events back into the
# queue as their submitters' rolling windows free up. The empty-queue path
# promotes immediately; this periodic sweep guarantees progress even while a
# sustained ordinary queue keeps `claim_next_event` returning work.
deferred_promotion_scan_seconds: float = Field(60.0, alias="ROBOMP_DEFERRED_PROMOTION_SCAN_SECONDS")
# Logins (comma-separated, `@` prefix optional, case-insensitive) whose `@bot_login`
# mentions are treated as authoritative directives. These accounts also
# bypass rate limiting regardless of `author_association`.