Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src/workers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas fccf2ab892 hive-c0re: read each agent's swarm caps from agent-limits
Every 30 seconds `workers::swarm_limits` reads the `agent-limits` key of
each agent this hive has and stores the result in
swarm-resource-limits.json, where the drop-in, the heap ceiling and the
dashboard read it. A cap therefore follows its agent to whichever hive
runs it.

Each value goes through the hive's own validate_cpu_quota /
validate_memory_max before it is stored, since hive-priv renders it
verbatim into the container's drop-in, and one bad value refuses the whole
set (argus on #4268, carried over from the wanted-state consumer this
replaces). A failed read, or a bucket that does not answer, leaves the
stored caps as they are; three failures in a row raise a banner.

swarm-nats-auth grants every hive `$JS.API.DIRECT.GET.KV_agent-limits.>`:
read-only, and every agent's key, not just the hive's own. Scoping it to
the hive's agents would need a roster in the auth responder, which
policy.rs argues against. mara chose this on #4268 (c95293); narrowing it
is a possible low-priority follow-up, not planned. A test pins that the
grant reads every key, writes none, and reaches no other bucket.

Contributes to #3865.
2026-10-12 20:22:21 +02:00
..
agent_sockets.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
auto_update.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
crash_watch.rs hive-c0re: bound the read-only container listing and systemctl status calls 2026-10-09 15:46:55 +02:00
knowledge.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
mcp_sockets.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
mod.rs hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
swarm_limits.rs hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
wanted.rs swarm: keep the webhook secret on read errors; surface hidden KV/auth/forge failures 2026-10-09 15:10:20 +02:00