Watch
0
0
Fork
You've already forked hyperhive
0

swarm roster shows a declared agent's state before it has ever reported

A declared agent that never reported (e.g. its first deploy was lost) had no hive in the roster row, so the wanted merge skipped it and swarm-ui showed 'no declaration' with the state control disabled. GET /api/agents/status now takes such a row's hive from the one hive whose declaration places the agent, so the declared state shows and the control works on deploy.
This commit is contained in:
atlas 2026-10-21 00:48:55 +02:00 • committed by mara
commit d989636d98
3 changed files with 109 additions and 19 deletions

View file

@ -18,7 +18,9 @@ The swarm's control plane. The swarm UI and `swarmctl` are its clients.
- **Agent roster and wanted state** — every agent the swarm knows
(`GET /api/agents`, `/api/agents/status`), and the state it declares for
each one on its hive (`up`/`offline`/`paused`/`destroyed`,
`PUT /api/hives/{hive}/agents/{agent}/state`).
`PUT /api/hives/{hive}/agents/{agent}/state`). An agent that has never
reported takes its hive and declared state in `/api/agents/status` from the
one hive whose declaration places it.
- **Job graph** — a `hive-jobq` scheduler, served at `GET /api/jobq/graph`.
Every provisioning step below runs as a node in it.
- **Agent creation** — `POST /api/agents` queues the SSO identity (through