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 21e3f626f4 hives read the forge through their own swarm-minted read account
swarm-controller now gives every hive in its directory a forge account,
`hive-<hive>`, in a new `hives` team of `agent-configs` (read on
`repo.code` + `repo.pulls`, every repo including later ones), and mints
one `read:repository` token named `swarm-hive` into the store at
`swarm/hives/<hive>/forge/token`. A five-minute pass queues a
`MintHiveForgeToken` node for a hive whose token is missing or no longer
matches the forge, whose account is missing, or whose team membership or
team settings drifted. A hive whose store or forge read failed is never
queued, so an outage cannot rotate every hive's token. The token decision
reuses `agent_token`'s classifier and replace step, now parameterised by
name and scopes.

An agent may be called `hive-<x>`. The hive account is created with
`hive-<hive>@hives.hyperhive.local` and the job refuses an account by that
name with any other email before it locks it down, adds it to the team or
mints for it; agent creation already refuses the hive's account by the
same email check.

The controller's bao policy gains the `swarm/hives/+/forge/token` leaf
(create/read/update), pinned by the bao-grants module-eval assertion. The
hive's own policy already reads `swarm/hives/<hive>/*`.

hive-c0re reads that token through `forge::reader_token()`, falling back
to the core token file when the store holds none, and uses it for:
fetching a merged config rev (swarm deploy, `hivectl forge
reconcile-config`), reseeding a purged `applied`, the meta-update
cascade's fast-forward, seeding `proposed` on first deploy, and finding
the PR that merged a refused rev. Those reads no longer require a local
`hive-forge` container. The `/knowledge` clone moves from the forge
host's boot sweep into the knowledge pull, so every hive clones it.

Posting the deploy-failure comment on that PR stays on the core token.

Refs #4851
2026-10-07 20:52:32 +02:00
..
agent_config hive-c0re: fail on an unparseable resource-limits or topology file, write both atomically 2026-09-27 02:41:38 +02:00
dashboard swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
forge hives read the forge through their own swarm-minted read account 2026-10-07 20:52:32 +02:00
job_queue hive-c0re: drop the remaining "mirror" wording for the removed push 2026-10-07 20:04:07 +02:00
lifecycle hives read the forge through their own swarm-minted read account 2026-10-07 20:52:32 +02:00
socket_server hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
stats container stats: measure agent disk usage through hive-priv, unknown on failure 2026-10-05 18:56:46 +02:00
stores hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
workers hives read the forge through their own swarm-minted read account 2026-10-07 20:52:32 +02:00
actions.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
container_view.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
coordinator.rs container stats: measure agent disk usage through hive-priv, unknown on failure 2026-10-05 18:56:46 +02:00
dashboard_events.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
gateway_nginx.rs gateway: $connection_upgrade does not come from recommendedProxySettings 2026-09-02 09:04:24 +02:00
loose_ends.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
main.rs container stats: measure agent disk usage through hive-priv, unknown on failure 2026-10-05 18:56:46 +02:00
matrix.rs matrix: drop the per-hive appservice and its unused token 2026-10-05 07:48:17 +02:00
meta.rs swarm CA: describe the store's pki root as the only anchor in docs and comments 2026-10-05 21:17:10 +02:00
migrate.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
paths.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
priv_client.rs container stats: bound hive-c0re's wait for the disk measurement, no total for an agent with no paths 2026-10-05 18:56:46 +02:00
server.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
swarm_agent_status.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_notices.rs swarm: present tense + no-queue-coordinates wording 2026-09-13 12:01:58 +02:00
swarm_queue.rs swarm-queue-based lifecycle notices, replacing push_todo(MANAGER_AGENT) 2026-08-24 14:34:37 +02:00
swarm_status.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
test_env.rs test(hive-c0re): one crate-wide lock for env-mutating tests 2026-08-19 01:38:54 +02:00