Merge pull request #1339 from NousResearch/hermes/hermes-048e6599
Merging Telegram gateway conflict hardening: same-host token lock, clean shutdown on getUpdates conflict, persisted runtime health, and clearer gateway status diagnostics.
This commit is contained in:
commit
a748257bf5
9 changed files with 692 additions and 9 deletions
22
tests/hermes_cli/test_gateway_runtime_health.py
Normal file
22
tests/hermes_cli/test_gateway_runtime_health.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from hermes_cli.gateway import _runtime_health_lines
|
||||
|
||||
|
||||
def test_runtime_health_lines_include_fatal_platform_and_startup_reason(monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
"gateway.status.read_runtime_status",
|
||||
lambda: {
|
||||
"gateway_state": "startup_failed",
|
||||
"exit_reason": "telegram conflict",
|
||||
"platforms": {
|
||||
"telegram": {
|
||||
"state": "fatal",
|
||||
"error_message": "another poller is active",
|
||||
}
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
lines = _runtime_health_lines()
|
||||
|
||||
assert "⚠ telegram: another poller is active" in lines
|
||||
assert "⚠ Last startup issue: telegram conflict" in lines
|
||||
Loading…
Add table
Add a link
Reference in a new issue