Send Tinker dedup_key with every recognised issue #44

Merged
jared merged 2 commits from feat/hwmon-dedup-key into main 2026-11-28 14:18:38 -05:00
2 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 e38ad5ff39 fix: give the dedup_key to the open ticket, not a newer closed one
Security / Python Security (bandit) (push) Successful in 1m3s
Lint / Python (flake8) (push) Successful in 1m5s
Lint / Notify on failure (push) Skipped
Lint / Python (flake8) (pull_request) Successful in 1m16s
Lint / Notify on failure (pull_request) Skipped
Test / Python Tests (pytest) (push) Successful in 3m47s
Security / Python Security (bandit) (pull_request) Successful in 1m10s
Test / Python Tests (pytest) (pull_request) Successful in 1m45s
Running the map against Tinker's 140 hwmonDaemon tickets showed open ticket
357934698 (pbs ZFS DEGRADED) losing its key to a newer closed ticket for the
same pool, which would have made the next report open a duplicate. Reports
land on the open ticket today, so not-Closed now wins, then newest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-28 14:10:07 -05:00
jaredandClaude Opus 5.5 9f808f4e38 feat: send Tinker dedup_key with every recognised issue (#42)
Lint / Python (flake8) (push) Successful in 57s
Lint / Notify on failure (push) Skipped
Security / Python Security (bandit) (push) Successful in 58s
Lint / Python (flake8) (pull_request) Successful in 1m3s
Lint / Notify on failure (pull_request) Skipped
Test / Python Tests (pytest) (push) Successful in 1m21s
Security / Python Security (bandit) (pull_request) Successful in 3m3s
Test / Python Tests (pytest) (pull_request) Successful in 3m36s
Part 4 of #42. Each report now carries a dedup_key (tinker_tickets#123), so
Tinker stops guessing "the same problem" from the title. Keys come from one
function, SystemHealthMonitor.dedup_key_for, which reads both raw issue
strings and the summary part of old ticket titles, so the backfill gives
existing tickets exactly the key the daemon sends.

- Ceph health warnings use the real health-check code (cluster:ceph:<CODE>),
  the key Thor uses, so Thor can adopt those tickets later. The daemon reads
  the code from `ceph health`; a message->code table covers old titles.
- Unrecognised issues are sent without a key and keep the title hash.
- scripts/dedup_key_map.py reads hwmonDaemon's tickets from Tinker (read
  only), keys the newest ticket per key, and writes the map for Tinker's
  scripts/backfill_dedup_keys.php. It reports anything it couldn't map.
- README: key table and the merge -> map -> backfill runbook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-28 14:05:23 -05:00