Skip to content

fix: expose active run lifecycle in health - #2039

Merged
1 commit merged into
nesquena:masterfrom
ai-ag2026:fix/active-run-lifecycle-health
May 11, 2026
Merged

1 commit merged into
nesquena:masterfrom
ai-ag2026:fix/active-run-lifecycle-health

Conversation

@ai-ag2026

Copy link
Copy Markdown
Contributor

Summary

  • Track active WebUI agent worker runs separately from SSE STREAMS.
  • Expose active_runs, per-run metadata/age, oldest_run_age_seconds, last_run_finished_at, and idle grace timing in /health.
  • Register/update/unregister runs in the streaming worker lifecycle.

Why

active_streams only describes SSE channel state. A worker can outlive its SSE stream while unwinding, blocked in a provider call, handling cancellation, or waiting on delegated work. Restart/update guards need visibility into worker lifecycle too, otherwise /health can look idle while the engine room is still making unpleasant noises.

Test Plan

  • python -m pytest tests/test_run_lifecycle_health.py -q -o 'addopts='
  • python -m py_compile api/config.py api/routes.py api/streaming.py
  • git diff --check

Review note

A delegated reviewer attempt failed before tool execution with provider-side HTTP 429. I did not count it as approval; this PR has targeted regression tests plus static/security checks.

@nesquena-hermes nesquena-hermes closed this pull request by merging all changes into nesquena:master in 1483924 May 11, 2026
plerohellec pushed a commit to plerohellec/hermes-webui that referenced this pull request May 11, 2026
@ai-ag2026
ai-ag2026 deleted the fix/active-run-lifecycle-health branch May 27, 2026 08:32
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
bernyforce pushed a commit to bernyforce/hermes-webui that referenced this pull request Jul 29, 2026
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.

2 participants