Files
openclaw/src/infra
Masato Hoshino ef1c83274d improve(health): surface dead-lettered delivery queue entries (#99842)
* improve(health): surface dead-lettered delivery queue entries

Deliveries that exhaust retries are moved to the failed status in the
SQLite delivery queue for diagnostics, but no health surface ever read
them back: openclaw health stayed all-green while messages sat
dead-lettered, visible only in gateway logs. Add a per-queue failed
count accessor and report dead-lettered entries in the health snapshot
(JSON field plus a warning line), following the existing plugin and
context-engine health section pattern. Observer-only: no retry, purge,
or behavior change.

* test(health): cover snapshot and CLI dead-letter reporting

Add getHealthSnapshot coverage against an isolated state dir, an
openclaw health text-output test for the warning line, exact
oldest-failure timestamp assertions via fake timers, and a debug log
when the delivery-queue health read fails.

* fix(health): recompute dead-letter counts for cached gateway responses

The gateway health handler can serve a cached snapshot for up to a
refresh interval, so a delivery dead-lettered after the cache was
filled stayed hidden from openclaw health. Recompute the delivery
queue summary in mergeCachedHealthRuntimeState alongside the existing
context-engine and model-pricing live merges, and cover the cached
handler path with a regression test.
2026-07-06 01:22:16 -07:00
..
2026-06-04 03:17:57 -04:00
2026-06-05 01:51:27 +01:00
2026-06-04 02:55:39 -04:00
2026-06-04 03:42:18 -04:00
2026-06-04 03:22:42 -04:00
2026-06-04 03:42:18 -04:00
2026-06-15 19:34:16 +01:00
2026-06-04 03:11:12 -04:00
2026-06-04 03:17:57 -04:00