You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Close the review findings on the :gogo: backfill (#89)
Fixes from the adversarial review of the ported PR #90:
- Duplicate-registration race: the one-shot existing-rows snapshot could
not close the window where JoinBigchat and the backfill process the
same user concurrently, and JoinBigchat had no dedupe at all. Both
paths now go through append_row_if_absent, which serializes the
check-and-append behind a process-wide lock (the app runs as a single
gunicorn worker). As a bonus this also absorbs duplicate Slack event
deliveries.
- A reactor who left the channel (or was deactivated) made the ephemeral
fan-out crash mid-loop, dropping the remaining users' info messages
and reporting the whole — already successful — request as failed.
Ephemeral sends are now per-user best-effort.
- Any other backfill error after the sheet was created also turned into
the global "try again" error, and retrying the mention cannot succeed
(same-name worksheet). The backfill now warns in the thread instead.
- get_emoji only caught SlackApiError; socket-level OSErrors (which this
repo already retries in get_replies) crashed the handler. It now uses
the same 3-attempt retry and degrades to None.
- N cold member lookups in one backfill each re-read the whole members
sheet; _fetch_members now has a short (60s) TTL cache.
Test gaps demonstrated by mutation testing are filled: multi-user
batches, the MemberLackInfo branch, the link-before-reactions ordering,
worksheet_id pinning, and a real-SlackClient contract test so the
original PR's kwarg-mismatch bug class cannot silently return.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iELKuaH7CvNy1GZRd7ptg
0 commit comments