v1.1.1 — retention purge fix
Patch release fixing a critical bug in v1.1's data retention loop.
What broke in v1.1
MaintenancePurge (the 24h retention sweep introduced in v1.1) silently failed on every cycle:
- Wrong column name —
DELETE FROM ip_enrichment WHERE queried_at < ?referenced a column that does not exist. The actual column isfetched_at. The transaction rolled back, no rows were purged. - Lazy-created tables —
ip_enrichment,cowrie_tty_index, andartifactsare created on first write. On a brand-new install the first purge (fired at startup) hitno such table: ip_enrichmentand never recovered.
Net effect: every v1.1 install kept growing without bound. The whole point of fix #5 in v1.1 was defeated.
Fix
- Pre-create the three lazy tables at the start of
MaintenancePurge. - Use the correct
fetched_atcolumn. - New test (
internal/store/purge_test.go) covers fresh-DB, populated-DB row deletion across all four purged tables, and the zero/negative no-op short circuit.
Other changes
migrate_test.gofresh-open assertion bumpedv>=3→v>=4(stale since the v4 ladder step shipped in v1.1).install.shSHA256SUMS lookup now uses anchoredgrep -F+awk $2==bso future suffixed asset names (e.g.-musl) cannot collide.
Upgrading from v1.1
curl -fsSL https://raw.githubusercontent.com/hett-patell/ShardLure/main/scripts/install.sh | sudo bash
Or just download the binary for your arch from the assets below and systemctl restart shardlure-live.