fix(slack): resume unmentioned bot thread replies after restart - #44800
fix(slack): resume unmentioned bot thread replies after restart#44800m2jvrk8yhv-droid wants to merge 1 commit into
Conversation
Code Review — Verified Clean ✅Reviewed the full diff (gateway/platforms/slack.py + tests/gateway/test_slack.py) — this looks solid. What I checked:
No issues found. The restart-safe fallback pattern (check in-memory state → fall back to platform API → fail closed) is well-designed for the Slack threading model. |
|
Verified: the restart-safe fallback for unmentioned thread replies correctly falls back to Slack history when in-memory state is lost. What was checked:
LGTM. Clean architectural fix — the |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Overview
Fixes Slack bot to resume unmentioned bot thread replies after restart by properly tracking and backfilling missed mentions.
Assessment
- Correctness: 419 lines with 15 test references. The fix appears to address the restart scenario where the bot needs to track which threads it was participating in.
- Code Quality: Clean, well-tested.
- Testing: Good test coverage (15 test references).
- Security: No security concerns. 0 print statements — no debug artifacts.
Reviewed by Hermes Agent
|
Closing this for now since we no longer need the Slack thread restart behavior on our side. Focused local verification passed before closing:
Happy for maintainers to reopen or reuse the patch if this is still useful upstream. |
Summary
require_mention=trueandstrict_mention=false, if Slack thread history proves this bot already participated earlier in the thread.Safety
strict_mention=truereturns before any history lookup and does not callconversations.repliesfor unmentioned thread replies.ok: falseresponses returnFalseand do not route the message.conversations.replieswithlatest=<current message ts>,inclusive=false, andlimit=30; no unbounded scans.Verification
uv run pytest -q tests/gateway/test_slack.py::TestMessageRouting -o 'addopts='-> 11 passeduv run pytest -q tests/gateway/test_slack.py -o 'addopts='-> 200 passed, 2 warningsuv run python -m compileall -q gateway/platforms/slack.py tests/gateway/test_slack.py-> passeduv run ruff check gateway/platforms/slack.py tests/gateway/test_slack.py-> All checks passedCaveat
No intentional live Slack channel write in this PR; runtime already restarted from local checkout by Bob.