Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src/agent_config
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 37f6a845a0 hive-c0re: let a swarm cap replace the hive's answer, not join its chain
mara's ruling: "swarm level overrides replace the hive ui limits. otherwise
dont change the logic."

  swarm value present  ->  it is the value; nothing hive-side is consulted
  swarm value absent   ->  exactly today's chain: per-agent field, else hive

Per field, so a swarm memory ceiling leaves CPU on the hive's chain.

The fallback chain itself is not touched: effective_from_with_swarm calls
effective_from as it was and lets the swarm replace its result, and
effective_with_swarm delegates to effective, so there stays one place the
chain lives. `an_empty_swarm_map_leaves_the_existing_chain_bit_for_bit`
asserts the wrapper is a no-op across every shape the chain distinguishes.

The swarm's caps live in their own swarm-resource-limits.json, not in the
operator's resource-limits.json: different writers, different lifetimes,
and a swarm write into the operator's file would make "reset to hive
defaults" destroy something the operator never set. It is read and written
through the same read_map / write_map, so an unreadable file is an error,
and write_dropins resolves both files through limits_to_apply, whose
keep-the-last-applied-drop-in policy covers the swarm file too.

stage_limits hands limits_to_apply the swarm caps file too, so the
agent's memory-max-bytes copy, which it sizes its heap and subagents
against, is the MemoryMax= systemd enforces: the swarm cap when there is
one.

Nothing writes swarm-resource-limits.json yet; the reader comes with the
swarm's agent-limits bucket later in this series.
2026-10-12 20:22:21 +02:00
..
capabilities.rs hive-c0re: an unreadable capabilities file denies ManageRootAgent mounts 2026-09-26 21:11:54 +02:00
limits.rs refs: repoint seven comments that name files which have moved 2026-09-02 08:58:31 +02:00
mod.rs hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00
resource_limits.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
tool_groups.rs tool_groups: add test for the case-insensitive is_known match 2026-10-09 00:50:27 +02:00
topology.rs hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00