Diagnostics: hang watchdog with scoped reports and thread stacks #6

Closed
agent wants to merge 2 commits from Diagnostics into master

2 commits

Author SHA1 Message Date
66c7b7c4a5 Diagnostics: cover hang reporting with unit tests
Some checks failed
Windows / build (pull_request) Has been cancelled
CMake on a single platform / build (pull_request) Has been cancelled
CMake / build (pull_request) Has been cancelled
The tests exercise blocked and busy reports, scope names, debugger pauses,
summary-before-sampling, input event counts, idle suppression, contributors and
report retention. They drive UiTrail directly and run with an injectable clock.
2026-10-27 23:28:11 +03:00
c18d07d6f8 Diagnostics: add hang detection and reporting
HangWatchdog watches UI phase timestamps and writes a report when a non-idle
phase exceeds its threshold. It records the phase, handled input count and open
scope trail, samples every thread through StackTrace, and classifies the UI as
blocked, busy or waiting repeatedly. Reports support follow-ups, recovery,
custom contributors and retention.

The scope trail is private to Diagnostics. The default report directory is
HOME/<process>/hangs, overridable with MODULES_HANG_DIR, so the module needs no
AppStorage dependency.
2026-10-27 23:28:11 +03:00