Austin Pickett
3eface06f7
fix(serve): expose turn_in_flight as an idle proof for pooled backends
...
The Desktop pool caps local `hermes serve` children and holds each child's
slot lease for its lifetime. Its renderer refreshes lastActiveAt every 60s
for every open socket, so a bot-tile-pinned resident is keepalive-fresh
forever: occupied is not busy, and the pool cannot tell the difference. The
renderer's own turn bookkeeping cannot see cron fires (HERMES_DESKTOP=1 runs
the in-process ticker), messaging turns served by a pooled backend, or a
session blocked on an approval, so it is not a safe proof either.
Add `GET /api/health/idle` (token-gated; whether a turn is running is
activity recon, unlike the public liveness route) returning
`idle: true|false|null` from `hermes_cli/web_server_idle_proof.py`. It
reuses the SSH idle-exit primitive `turn_in_flight()` (running gateway
sessions + running cron jobs) and adds the human-input ledgers: open
server->client requests (`server_requests.open_request_count`) and queued
gateway approvals (`approval.pending_gateway_approval_count`). Any ledger
that cannot be read yields `null`, which the Desktop treats as busy.
Tests: unit invariants over the fail-closed table and the real ledgers, and
a live test that boots three desktop-shaped children (HERMES_DESKTOP=1,
per-child HERMES_HOME, port 0), holds one busy in the cron running-job
ledger, and probes all three over HTTP. RED on base: every child 404s.
2026-09-17 00:34:50 -05:00
..
2026-09-13 09:40:44 -07:00
2026-09-16 21:32:45 -04:00
2026-09-15 21:46:37 -07:00
2026-09-16 14:21:14 -07:00
2026-09-17 00:34:50 -05:00
2026-09-14 09:02:28 -07:00
2026-09-15 04:11:11 -07:00
2026-09-16 17:51:11 -07:00
2026-09-15 04:11:11 -07:00
2026-09-16 16:48:42 -07:00
2026-09-15 03:58:44 -07:00
2026-09-15 03:58:44 -07:00
2026-09-16 16:48:42 -07:00
2026-09-16 14:34:59 -07:00
2026-09-11 03:45:33 +05:30
2026-09-15 20:44:42 +05:30
2026-09-15 04:57:29 -07:00
2026-09-16 14:34:59 -07:00
2026-09-16 14:34:59 -07:00
2026-09-15 20:44:42 +05:30
2026-09-15 04:12:13 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 16:16:24 +05:30
2026-09-16 14:34:59 -07:00
2026-09-12 22:07:41 -07:00
2026-09-15 03:38:29 -07:00
2026-09-12 22:07:41 -07:00
2026-09-16 14:34:59 -07:00
2026-09-16 17:16:06 -07:00
2026-09-15 18:26:38 -07:00
2026-09-15 19:06:54 -07:00
2026-09-16 16:53:40 -07:00
2026-09-15 18:24:22 -07:00
2026-09-12 08:25:54 -07:00
2026-09-16 16:54:57 -07:00
2026-09-12 08:25:54 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 19:28:32 -07:00
2026-09-16 17:49:48 -07:00
2026-09-15 06:29:50 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 14:52:26 +05:30
2026-09-16 17:11:01 -07:00
2026-09-15 18:25:46 -07:00
2026-09-13 14:35:32 -07:00
2026-09-16 17:23:44 -07:00
2026-09-12 22:00:02 -07:00
2026-09-13 14:35:32 -07:00
2026-09-15 04:08:53 -07:00
2026-09-15 20:47:06 +05:30
2026-09-15 04:12:13 -07:00
2026-09-13 20:50:10 -07:00
2026-09-15 19:05:29 -07:00
2026-09-15 19:05:29 -07:00
2026-09-15 06:29:50 -07:00
2026-09-12 08:25:36 -07:00
2026-09-13 20:41:41 -07:00
2026-09-12 16:17:04 -07:00
2026-09-16 17:12:11 -07:00
2026-09-15 06:29:50 -07:00
2026-09-15 21:47:48 -07:00
2026-09-15 05:25:39 -07:00
2026-09-15 00:41:13 +05:30
2026-09-10 01:08:18 -07:00
2026-09-16 17:42:32 -07:00
2026-09-14 08:10:36 -07:00
2026-09-16 08:57:18 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 05:09:06 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 05:38:31 -07:00
2026-09-16 17:00:07 -07:00
2026-09-13 05:07:11 -07:00
2026-09-13 09:18:02 -07:00
2026-09-16 23:13:20 -04:00
2026-09-10 01:25:45 -07:00
2026-09-15 04:12:13 -07:00
2026-09-13 05:09:06 -07:00
2026-09-16 17:02:34 -07:00
2026-09-16 23:19:45 +05:30
2026-09-15 04:12:13 -07:00
2026-09-15 12:06:08 -07:00
2026-09-15 04:12:13 -07:00
2026-09-13 20:51:06 -07:00
2026-09-12 21:39:10 -07:00
2026-09-14 08:10:36 -07:00
2026-09-15 20:44:42 +05:30
2026-09-15 04:12:13 -07:00
2026-09-16 08:57:18 -07:00
2026-09-16 00:33:03 -07:00
2026-09-16 08:57:18 -07:00
2026-09-16 08:57:18 -07:00
2026-09-15 03:44:36 -07:00
2026-09-15 04:07:13 -07:00
2026-09-16 16:52:59 -07:00
2026-09-17 00:32:12 -04:00
2026-09-10 01:00:19 -07:00
2026-09-16 16:43:08 -07:00
2026-09-15 03:59:50 -07:00
2026-09-16 00:32:15 -07:00
2026-09-16 17:11:01 -07:00
2026-09-16 16:58:43 -07:00
2026-09-16 00:35:00 -07:00
2026-09-14 16:14:33 -07:00
2026-09-16 16:51:45 -07:00
2026-09-16 16:58:43 -07:00
2026-09-13 05:09:06 -07:00
2026-09-15 18:35:32 -07:00
2026-09-15 18:34:40 -07:00
2026-09-15 18:33:43 -07:00
2026-09-09 12:18:58 -07:00
2026-09-15 18:34:40 -07:00
2026-09-16 16:56:22 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 18:28:26 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 23:13:20 -04:00
2026-09-15 18:35:59 -07:00
2026-09-12 08:25:54 -07:00
2026-09-16 17:09:50 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 16:18:17 -05:00
2026-09-16 17:50:21 -07:00
2026-09-15 06:29:50 -07:00
2026-09-15 18:55:47 -07:00
2026-09-16 15:16:09 -05:00
2026-09-16 15:16:09 -05:00
2026-09-15 04:12:13 -07:00
2026-09-15 19:06:54 -07:00
2026-09-15 03:38:29 -07:00
2026-09-16 17:11:01 -07:00
2026-09-15 05:34:29 -07:00
2026-09-13 05:07:11 -07:00
2026-09-10 04:22:38 -07:00
2026-09-13 20:54:50 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 03:39:45 -07:00
2026-09-16 17:11:01 -07:00
2026-09-16 17:06:26 -07:00
2026-09-16 16:59:23 -07:00
2026-09-16 10:52:32 -07:00
2026-09-10 09:11:00 -07:00
2026-09-12 01:35:05 -07:00
2026-09-12 01:35:05 -07:00
2026-09-15 18:58:02 -07:00
2026-09-16 17:06:26 -07:00
2026-09-14 22:01:32 +00:00
2026-09-11 03:45:31 +05:30
2026-09-10 18:11:25 -07:00
2026-09-16 18:12:34 -07:00
2026-09-16 00:32:15 -07:00
2026-09-16 14:18:39 -07:00
2026-09-16 17:15:38 -07:00
2026-09-16 15:47:44 -07:00
2026-09-16 15:47:44 -07:00
2026-09-16 15:47:44 -07:00
2026-09-15 18:48:59 -07:00
2026-09-16 17:08:25 -07:00
2026-09-16 17:08:25 -07:00
2026-09-16 17:08:25 -07:00
2026-09-11 03:45:31 +05:30
2026-09-16 00:32:15 -07:00
2026-09-13 14:33:11 -07:00
2026-09-16 14:21:14 -07:00
2026-09-16 14:34:59 -07:00
2026-09-15 06:22:15 -07:00
2026-09-16 14:34:22 -07:00
2026-09-16 17:02:38 -07:00
2026-09-13 05:08:29 -07:00
2026-09-10 14:56:55 -04:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:11 -07:00
2026-09-15 06:36:19 -07:00
2026-09-16 17:19:58 -07:00
2026-09-14 19:49:12 +05:30
2026-09-15 03:44:36 -07:00
2026-09-13 05:07:50 -07:00
2026-09-13 05:07:50 -07:00
2026-09-16 17:16:06 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 00:35:00 -07:00
2026-09-15 18:30:05 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-11 06:24:54 -07:00
2026-09-16 17:02:13 -07:00
2026-09-11 06:37:27 -07:00
2026-09-09 13:30:28 -07:00
2026-09-11 06:24:54 -07:00
2026-09-15 18:25:46 -07:00
2026-09-13 05:32:38 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 17:57:48 -07:00
2026-09-12 08:25:54 -07:00
2026-09-15 04:12:13 -07:00
2026-09-15 04:12:13 -07:00
2026-09-12 08:25:54 -07:00
2026-09-13 05:08:29 -07:00
2026-09-11 03:45:31 +05:30
2026-09-12 21:47:53 -07:00
2026-09-13 05:21:02 -07:00
2026-09-14 08:10:36 -07:00
2026-09-16 17:58:25 +00:00
2026-09-15 03:53:13 -07:00
2026-09-15 18:55:47 -07:00
2026-09-16 00:32:15 -07:00
2026-09-15 14:52:26 +05:30
2026-09-11 06:24:54 -07:00
2026-09-15 04:12:13 -07:00
2026-09-12 08:34:43 -07:00
2026-09-16 16:42:47 -07:00
2026-09-16 16:42:47 -07:00
2026-09-12 08:25:54 -07:00
2026-09-15 18:30:32 -07:00
2026-09-15 21:57:59 +05:30
2026-09-16 17:13:56 -07:00
2026-09-13 05:08:20 -07:00
2026-09-16 17:04:46 -07:00
2026-09-16 17:44:36 -07:00
2026-09-16 14:34:59 -07:00
2026-09-16 17:13:56 -07:00
2026-09-16 17:13:56 -07:00
2026-09-16 17:45:29 -07:00
2026-09-16 16:55:42 -07:00
2026-09-15 04:12:13 -07:00
2026-09-16 17:04:46 -07:00
2026-09-10 11:48:01 -07:00
2026-09-13 19:19:32 -07:00
2026-09-09 21:16:40 +05:30
2026-09-15 03:40:26 -07:00
2026-09-16 08:57:18 -07:00
2026-09-15 18:48:59 -07:00
2026-09-15 04:37:41 -07:00
2026-09-11 15:28:37 -07:00
2026-09-17 00:34:50 -05:00
2026-09-14 08:10:36 -07:00
2026-09-12 18:35:21 -07:00
2026-09-15 20:44:42 +05:30
2026-09-16 16:44:53 -07:00
2026-09-11 06:37:27 -07:00
2026-09-16 17:11:08 -07:00
2026-09-13 21:30:02 -07:00
2026-09-13 20:55:29 -07:00
2026-09-15 18:27:06 -07:00
2026-09-16 16:43:08 -07:00