Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu 023090a65d Compact finished rule archive commands and their effects after 90 days.
With archive now a durable Sync action, the stored archive runner writes
commands that keep up to 1000 cards' titles and placement, and effects rows
that keep the History and activity content written for them - forever, with
only a timeless final receipt to say they finished.

The runner now writes a completion receipt with its time after it finishes.
SYNC_RECEIPT_METADATA_DAYS (90) later the sweep removes the effects row - read
only while the command is unfinished - and replaces the command in place by
its id, checksum, invocation and plan. A late replay of the rule action
returns the invocation as done when the runner's own final receipt confirms
it; card and final receipts stay.

A MongoDB test covers compaction, the untouched recent and unfinished
commands and the refusals; the full-app durable Sync test compacts the real
archive command from its rule run and replays it. 565 server tests pass.

Thanks to xet7 !
2026-09-30 11:52:30 +03:00