OptionallimitMax rows deleted per call (bounds lock time and vacuum pressure).
Default 10,000, capped at 100,000. Loop until deleted is 0 to drain.
OptionalnamespaceAge horizon as a Postgres interval string (e.g. '90 days', '12 hours').
Rows qualify when updated_at < NOW() - olderThan.
OptionalstatusesTerminal statuses to prune. Defaults to all three; non-terminal values are ignored.
Retention parameters for
pruneEscalations. Prunes only terminal rows (resolved/cancelled/expired) — the statuses every engine state transition treats as final — older than the given horizon.