Skip to content

Commit 589981b

Browse files
committed
tsk-52ujjr [OPEN] fix-forward #2924 (tsk-omud2i): add the missing 42
1 parent 4e8664d commit 589981b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

commit_message.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
tests: add Discord 429/Retry-After and Slack cursor regression tests with red-first proof
2+
3+
RED (origin/dev, before fix):
4+
```
5+
FAILED tests/channel_hub/test_connector_rate_limit.py::TestDiscordRateLimit::test_429_arms_rate_limit_and_skips_handle
6+
FAILED tests/channel_hub/test_connector_rate_limit.py::TestDiscordRateLimit::test_poll_loop_skips_rate_limited_channel
7+
FAILED tests/channel_hub/test_connector_rate_limit.py::TestDiscordRateLimit::test_200_empty_does_not_arm_rate_limit
8+
FAILED tests/channel_hub/test_connector_rate_limit.py::TestSlackCursorNotAdvancedOnRaise::test_handle_message_raise_preserves_cursor
9+
4 failed in 0.39s
10+
```
11+
12+
GREEN (HEAD, after fix):
13+
```
14+
4 passed in 0.20s
15+
```
16+
17+
Add tests/channel_hub/test_connector_rate_limit.py with:
18+
- Discord: _check_channel receiving 429 with Retry-After: 3 arms _last_rate_limit to roughly now+3 and does NOT call _handle_message; a following _poll_loop iteration skips that channel while the window is open; a 200 with [] must NOT arm a window.
19+
- Slack: when _handle_message raises on the first message of a batch, _last_timestamps[channel_id] is NOT advanced.
20+
21+
Also correct the changelog wording from at-most-once to at-least-once, and remove unused import time from slack_connector.py.

0 commit comments

Comments
 (0)