From 26e2d1cec83a8e2695022f4266dfddd6e17eb8fa Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Thu, 16 Apr 2026 08:16:35 -0400 Subject: [PATCH] Strip volatile SMART counters from ticket title to stop comment spam Power_On_Hours and other SMART counters embedded in the issue string were included verbatim in the ticket title. Since the count increments every hour, the title was "new" on every run, triggering a title-update comment every single cycle (307 spam comments on two tickets). Strip ': Warning : ' / ': Critical : ' suffixes from the title before building the ticket payload. Counter values are still fully captured in the ticket description. Co-Authored-By: Claude Sonnet 4.6 --- hwmonDaemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index f2d8144..c131b01 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -1919,6 +1919,10 @@ class SystemHealthMonitor: clean_issue = clean_issue.replace('[cluster-wide] ', '').replace('[cluster-wide]', '') # Remove [ceph] marker since _categorize_issue adds it as issue_tag clean_issue = clean_issue.replace('[ceph] ', '').replace('[ceph]', '') + # Strip ever-changing SMART counters from the title so the title stays + # stable across runs and doesn't trigger hourly "Title updated" comment spam. + # The counter values are already captured in the ticket description. + clean_issue = re.sub(r':\s*(?:Warning|Critical)\s+\w+:\s*\d+', '', clean_issue).strip(': ').strip() # Extract drive capacity if this is a drive-related issue. # Issue strings now use serial numbers; find the matching drive by serial.