Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src/lifecycle
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
..
agent_identity.rs hive-c0re: stop silently dropping errors on credential/marker writes 2026-10-09 10:24:15 +02:00
git.rs config PRs: remove the hive's config-PR webhook, poll and core merge 2026-10-02 23:13:03 +02:00
host_config.rs hive-c0re: let a swarm cap replace the hive's answer, not join its chain 2026-10-12 20:22:21 +02:00
mod.rs agents: read the hive's name and domain at runtime, not from the build 2026-10-12 10:52:21 +02:00
setup.rs hives read the forge through their own swarm-minted read account 2026-10-07 20:52:32 +02:00
tests.rs hive-c0re: bound the read-only container listing and systemctl status calls 2026-10-09 15:46:55 +02:00