Dupe guard 7-day window too short for bi-weekly/monthly campaigns #17
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The dupe guard in
poster.pycallsstore.already_posted_this_week(campaign_id, target)which only looks back 7 days. Campaigns scheduled less frequently than weekly (bi-weekly, monthly) fall outside this window and re-post identical content.Observed: Campaign 1 (AuDHD promo) re-fired on 2026-05-12, 21 days after the original 2026-04-21 post. Duplicate post deleted manually.
Fix applied (2026-05-20)
store.already_posted_this_week()default window changed from 7 days to 30 days (parameter, so callers can override).campaign_subs.max_posts = 1set for campaign 1 / r/AuDHD to hard-cap promotional one-shot posts.Recommended follow-up
dupe_guard_daysfield tocampaignstable so each campaign can declare its own window (defaults to 30).max_posts = 1is the correct tool — add a UI hint when creating a new campaign that this field should be set for one-shot posts.already_posted_this_weektoalready_posted_recentlyto avoid misleading the 7-day assumption in future.