Skip to content

Commit 2f86309

Browse files
CTO AgentPaperclip-Paperclip
andcommitted
docs(todos): mark incremental meme_stats as done
FFM-5 / commit 84a5119 is complete and deployed. Co-Authored-By: Paperclip <noreply@paperclip.ing>
1 parent c4f8763 commit 2f86309

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

TODOS.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313
### ~~Unstarve like_spread_and_recent engine~~ — DONE
1414
**Context:** Done 2026-03-20. Removed `age_days < 30` filter in `src/recommendations/candidates.py`. Candidates 72→thousands. See [specs/experiment-2026-03-20-adaptive-cold-start.md](specs/experiment-2026-03-20-adaptive-cold-start.md).
1515

16-
### Incremental meme_stats computation
17-
**What:** Rewrite `calculate_meme_stats()` to only update memes with reactions in the last 2–3 hours (using `WHERE m.id IN (SELECT DISTINCT meme_id FROM user_meme_reaction WHERE reacted_at > NOW() - INTERVAL '3 hours')`), then upsert only those rows.
18-
**Why:** Full table scan on 22M+ user_meme_reaction rows exceeded 300s Prefect timeout on 2026-03-23 (peak traffic), causing VQ connection storm (22 events) and 6.5h stats staleness. Temporary fix (timeout 300→600s, commit f40b16a) bought headroom but at peak traffic 600s will eventually be insufficient too.
19-
**File:** `src/stats/meme.py` (`calculate_meme_stats()`), `src/flows/stats/meme.py`
20-
**Depends on:** Nothing — isolated change. Verify that meme_stats UPSERT logic handles partial updates correctly (memes with no new reactions keep their existing stats).
16+
### ~~Incremental meme_stats computation~~ — DONE
17+
**Context:** Done 2026-03-27. Rewrote `calculate_meme_stats()` to only update memes with reactions in the last 3 hours, then upsert only those rows. Prevents full-table scan timeout cascade at peak traffic. Commit `84a5119`. See [FFM-5](/FFM/issues/FFM-5).
2118

2219
### Add per-user recency filter to goat engine
2320
**What:** In the goat SQL query, add a filter to exclude memes the user saw recently (e.g., `sent_at > now() - interval '30 days'` via `user_meme_reaction`). This rotates the GOAT pool per-user.

0 commit comments

Comments
 (0)