Some checks failed
check / check (push) Has been cancelled
Rewrites retention_days=0 to the RetentionForeverDays sentinel (365 * 1000) in Webhook.BeforeSave, so the GORM column default cannot win the race. The reaper skips retain-forever webhooks before building any query. Also bounds the reaper's cutoff arithmetic: a time.Duration is int64 nanoseconds, so day counts above MaxFiniteRetentionDays (106751) overflowed and wrapped the cutoff into the future, where created_at < cutoff matched every row and the sweep deleted everything. parseRetentionDays now rejects finite values above the ceiling, and retentionCutoff saturates so rows written by older versions cannot reach it either. Views render RetentionLabel() rather than the raw sentinel.
4.7 KiB
4.7 KiB