Skip to content

Fix #938 — preserve mute rules across size-triggered DB reset#941

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/938-mute-rules-survive-reset
May 7, 2026
Merged

Fix #938 — preserve mute rules across size-triggered DB reset#941
erikdarlingdata merged 1 commit into
devfrom
feature/938-mute-rules-survive-reset

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • ArchiveAllAndResetAsync (size-triggered DB reset at 512 MB) deletes monitor.duckdb and reinitializes empty tables. config_mute_rules was not in ArchivableTables, so all mute rules — including permanent rules with expires_at_utc = NULL — were silently lost.
  • Export config_mute_rules and dismissed_archive_alerts to a temp Parquet dir before the reset and re-import after. Parquet roundtrip keeps this schema-agnostic. On restore failure, the temp dir is retained for manual recovery.

Fixes #938

Test plan

  • New test MuteRulesSurviveResetTests.PermanentMuteRule_SurvivesArchiveAllAndReset (the bug case)
  • New test MuteRulesSurviveResetTests.ExpiringMuteRule_SurvivesArchiveAllAndReset
  • New test MuteRulesSurviveResetTests.EmptyMuteRulesTable_DoesNotBreakReset
  • Full Lite.Tests suite passes (260/260)

🤖 Generated with Claude Code

When monitor.duckdb exceeds 512 MB, ArchiveAllAndResetAsync deletes the
file and reinitializes empty tables. config_mute_rules was not in
ArchivableTables, so all mute rules — including permanent rules with
expires_at_utc = NULL — were silently lost.

Export config_mute_rules and dismissed_archive_alerts to a temp Parquet
dir before the reset and re-import after. Parquet roundtrip keeps this
schema-agnostic. On restore failure, the temp dir is retained for
manual recovery.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 754e1ca into dev May 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant