Submit a merge request that closes this issue to earn points on merge — bounties stack on the standard +40 merge_pr award. New to the repo? See the Contributing guide, and Local Development & SSO to run the app locally (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 an is_canonical flag on daily_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_at column
  • [ ] Admin command to manually archive an old rollup doc

Notes

  • OutlineClient already wraps documents.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
  • issue before coding — it's the one open decision between "ready" and "done".

  • Entry points: generateAndStoreCommunityRollup (02:00 ET cron); OutlineClient.updateDocument
  • already exists in packages/shared-utils/src/bot-utils/outline-client.ts.

  • Verify: unit-test with a mocked Outline client (src/src/tests/utils/community-rollup.test.ts is the
  • 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

No comments yet. Be the first to weigh in.

↑ Top