Maintainer decision of 2026-09-30: receipts are compacted after 90 days to
a permanent minimal id and outcome. A stored webhook plan keeps each
target's URL, its X-Wekan-Token credential and the request body; a response
row keeps the receiver's reply and a comment plan the comment text - all
forever, and the plan had no completion evidence of its own.
The notification plan retention becomes a shared kit (syncPlanRetention.js)
and webhooks use it: once every target's delivery is confirmed, a completion
receipt with its time is written. After SYNC_RECEIPT_METADATA_DAYS (90) the
sweep first removes the plan's response and comment-plan rows - read only
while a delivery receipt is missing - then compacts the plan in place. A late
replay of the compact form returns as delivered; delivery and comment
receipts, already minimal, stay.
A MongoDB test covers what is removed and what an undelivered plan keeps,
replay of the compact form and its refusals; the full-app webhook test
compacts a really delivered plan, checks the URL and token are gone, and
replays it without touching the comment. 565 server tests pass.
Thanks to xet7 !
Maintainer decision of 2026-09-30: receipts are compacted after 90 days to a
permanent minimal id and outcome, notification plans included. A stored Sync
notification plan keeps every recipient's rendered subject and HTML, and had
no completion evidence of its own, so it could never be told finished and
was kept forever.
Delivery now writes a receipt once it is confirmed - planId, activity hash,
plan checksum and completedAt; the first stored receipt wins. After
SYNC_RECEIPT_METADATA_DAYS (90) an hourly sweep replaces the exact plan the
receipt was written for with { _id, activityHash, checksum,
compactReceiptVersion } in place, so its id stays taken. A replay that finds
the compact form returns as delivered and never rebuilds or resends; within
the period a replay still re-checks every recipient, as before. A compact
plan without its matching receipt, or for changed activity content, is
refused.
The other receipt rows named in the decision - Scrum completions and
requests, Sync operation intents and completions - already hold only ids,
hashes and timestamps, so there is nothing in them to compact.
MongoDB tests cover what is compacted and what is not, idempotence, replay
of the compact form and the refusals; the full-app delivery test compacts a
real delivered plan and replays it without sending.
Thanks to xet7 !