Skip to content

Retention: sweep polls past their window, and anonymous names nothing refers to - #3

Merged
binarycodes merged 1 commit into
mainfrom
feat/retention-sweep
Aug 26, 2026
Merged

binarycodes merged 1 commit into
mainfrom
feat/retention-sweep

Conversation

@binarycodes

Copy link
Copy Markdown
Owner

Nothing in the store was ever deleted. Two windows now do it, both whole days, either never to switch off:

  • WHICHDAY_RETENTION_AFTER_POLL_ENDS (5) — from the day a poll ended: its closing date, or the day locked in if that is later.
  • WHICHDAY_RETENTION_DAYS (90) — from created_at, reaching every poll whatever its state. Nothing survives it, including a poll still taking answers.

The same 90 days drop @whichday.anonymous names once no poll refers to them. Provider addresses are never dropped.

Deleting a poll deletes everything about it, so a saved link reads as a link to a poll that never existed — no view changed. V3 adds account.created_at; existing rows are stamped at migration time and get a full window from there.

Verified: 208 tests, coverage gate met. Against a copy of a real V1+V2 database — V3 applied, validate passed, and a 0-day window deleted 11 real polls.

@binarycodes
binarycodes merged commit b91ddec into main Aug 26, 2026
2 checks passed
@binarycodes
binarycodes deleted the feat/retention-sweep branch August 26, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant