Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src
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_config hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
dashboard agents: remove send(operator) and the operator inbox; alert on turn failures 2026-10-12 08:50:06 +02:00
forge hive-c0re: a refused rev is an error log + Grafana alert, not a PR comment 2026-10-09 22:25:39 +02:00
job_queue docs: the agent config meta-flake input is the local applied mirror, not forge git+http 2026-10-10 14:06:43 +02:00
lifecycle hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
socket_server agents: the send(operator) refusal also covers agents without matrix 2026-10-12 08:50:06 +02:00
stats hive-c0re/swarm-*: drop clippy allows and dedupe unix_now + KV open_or_create 2026-10-09 10:25:48 +02:00
stores agents: remove send(operator) and the operator inbox; alert on turn failures 2026-10-12 08:50:06 +02:00
workers hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
actions.rs hive-c0re: a deploy request for a rev applied/main already contains is a no-op 2026-10-09 22:25:39 +02:00
container_view.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
coordinator.rs hive-c0re: close build-log rows a dead process left in flight 2026-10-11 02:37:08 +02:00
dashboard_events.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
gateway_nginx.rs hive-c0re, hivectl: make the htpasswd and wg key tests fail on the in-place write 2026-10-09 17:22:25 +02:00
loose_ends.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
main.rs hive-c0re: validate forge env at startup; char-safe short revs 2026-10-09 10:51:39 +02:00
matrix.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
meta.rs agents: read the memory cap at boot, not from the build 2026-10-12 10:59:11 +02:00
migrate.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
paths.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
priv_client.rs agents: read the hive's name and domain at runtime, not from the build 2026-10-12 10:52:21 +02:00
secret_file.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
server.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
snapshot_push.rs hive-c0re: clear O_NONBLOCK on the snapshot-store socket before btrfs send gets it 2026-10-11 02:42:45 +02:00
swarm_agent_status.rs hive status publishing: read the hive's OIDC secret from the store, retry until it is there 2026-10-10 01:05:33 +02:00
swarm_notices.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_queue.rs hive status publishing: read the hive's OIDC secret from the store, retry until it is there 2026-10-10 01:05:33 +02:00
swarm_status.rs hive-c0re: read each agent's swarm caps from agent-limits 2026-10-12 20:22:21 +02:00
test_env.rs test(hive-c0re): one crate-wide lock for env-mutating tests 2026-08-19 01:38:54 +02:00