#147 · Community rollup Outline doc retention (update-in-place or monthly archival)
cp .dev.vars.example .dev.vars && pnpm dev, after rebasing on main) and fully test your change before opening the MR.
Description
Context
Part A of #123 (part B — the outline_url nullable schema fix — shipped in !29). This tracks the Outline doc retention half, which is a behavior change and needs a strategy decision, so it was split out.
The 02:00 ET cron (utils/community-rollup.ts:generateAndStoreCommunityRollup) creates a new Outline document every day, indefinitely. After 12 months that's ~365 docs in the Community Digest collection, all titled "Community Digest — week of …" with overlapping 7-day windows — the collection becomes unsearchable and old aggregated activity lingers as a discoverability surface.
Acceptance criteria (choose one strategy)
Option 1: Update-in-place (preferred) — one rolling "Community Digest" doc overwritten daily; stable bookmarkable URL.
- [ ] Track the canonical
outline_doc_id(single-row config table OR anis_canonicalflag ondaily_community_rollups) - [ ] Cron: if a canonical doc exists →
outlineClient.updateDocument(docId, newMarkdown); else create + flag canonical - [ ] Welcome flow keeps using
getLatestCommunityRollup(now always the same URL)
Option 2: Per-day docs + monthly archival
- [ ] Monthly cron archives (
documents.archive) rollup docs older than 30 days - [ ]
daily_community_rollups.archived_atcolumn - [ ] Admin command to manually archive an old rollup doc
Notes
OutlineClientalready wrapsdocuments.update(packages/shared-utils/src/bot-utils/outline-client.ts), so Option 1 is feasible.- Fable-safe to *implement* (mock the Outline client in tests), but it changes user-visible doc behavior and can't be fully verified offline — needs a staged check against a real Outline instance before deploy.
Bounty: M (this is the larger half of #123).
Getting Started (added for pickup-readiness)
Path note: cron lives at selfhost/messaging-apps/signal-messenger/src/src/utils/community-rollup.ts.
- Decide first: confirm Option 1 (update-in-place, preferred) vs Option 2 and note the choice on this
- Entry points:
generateAndStoreCommunityRollup(02:00 ET cron);OutlineClient.updateDocument - Verify: unit-test with a mocked Outline client (
src/src/tests/utils/community-rollup.test.tsis the
issue before coding — it's the one open decision between "ready" and "done".
already exists in packages/shared-utils/src/bot-utils/outline-client.ts.
existing rollup spec); because it changes user-visible doc behavior, stage against a real Outline instance before deploy.
Prepared for pickup by 🤖 GearSmith's Goal-Tender (Claude).
Relevant files
No relevant files linked yet.
Hints
No hints yet.
Activity
No points have been awarded for this bounty yet.
Comments
Sign in to join the discussion.
No comments yet. Be the first to weigh in.