Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/swarm-controller/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas b68b74d687 swarm-builder: build each agent config PR head and post a commit status
A new `swarm-builder` service, in its own container on the host that sets
`deploy.builder.enable` (defaulted on by `allSwarmServices` where the host
has the builder's store leaf, like the review classifier).

When an `agent-configs/<agent>` PR is opened, reopened or synchronized,
swarm-controller queues a `build_agent` jobq node. The node sets a
`swarm-builder` commit status to pending on the PR head, sends
`{agent, rev, pr}` to the builder over NATS request-reply
(`$SWARM.builder.build`), and writes success (store path), failure (last
line nix printed) or error (no builder / no reply) on the head. The node
fails when the build does, so the Jobs page matches the PR.

The builder builds nix/builder/check-flake's `check` with every input
overridden: hyperhive and nixpkgs to the host's own
`c0re.hyperhiveFlake`/`c0re.nixpkgsFlake` (what a hive there renders into
its meta flake), and the agent to the PR head on the forge. Evaluation is
pure and runs in the container; builds go to the host nix daemon as an
untrusted client. The private config repo is fetched with the token of a
new read-only `builder` forge account (in the `hives` team), which the
controller mints into `swarm/services/builder/forge/token`; git gets it
from a credential helper reading the child's environment, so it is in no
argument or URL.

Credentials: a `builder` store leaf minted by glue-bao-tls on the store
host, a `swarm-builder` reader policy (forge token + its own OIDC client
secret), an authelia machine client, and a `--builder-client` grant in the
queue's auth-callout responder. The controller gains a grant on the token
path and the secret publisher a deny on it.

This is the agent-config build check atlas scoped on #5081 (slice 3):
nothing is pushed to a cache, nothing is written to KV, and a red status
gates no deploy. The check composes agent-base + the config without the
values a hive adds (CA, docs, claude-code path, ports, input follows), so
it can disagree with a hive's own build.
2026-10-14 03:30:46 +02:00
..
forge swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
matrix_account matrix: back up agents' room keys with a controller-minted recovery passphrase 2026-10-14 02:09:57 +02:00
review_classifier review classifier: escape $ in verdict cells so the forge doesn't render them as math 2026-10-13 21:21:21 +02:00
agent_icon.rs swarm: let an agent publish its own icon 2026-09-28 13:47:37 +02:00
agent_identity.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
agent_input.rs swarm UI: send a message to an agent, without its hive 2026-10-04 03:02:14 +02:00
agent_limits.rs controller stores: recover from a record they can't decode 2026-10-13 08:12:50 +02:00
agent_renewal.rs swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it 2026-10-13 19:16:04 +02:00
agent_state_stream.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
agent_status.rs swarm-ui: add agent start/stop, backed by the wanted-state route 2026-09-02 19:57:04 +02:00
auth.rs swarm options: no swarm.* value depends on a deploy option or this host's hive 2026-10-04 18:13:47 +02:00
builder.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
config_pr.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
forge.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
forge_account.rs swarm-controller: record the review classifier's runs and list them 2026-10-12 21:48:51 +02:00
github_account.rs swarm-controller: record the review classifier's runs and list them 2026-10-12 21:48:51 +02:00
inference.rs controller stores: recover from a record they can't decode 2026-10-13 08:12:50 +02:00
issue_report.rs swarm-ui, swarm-controller: the review try-out's repo and PR fields offer the repos and PRs to pick 2026-10-12 19:05:37 +02:00
linked_accounts.rs swarm-controller: record the review classifier's runs and list them 2026-10-12 21:48:51 +02:00
main.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00
matrix_account.rs matrix: back up agents' room keys with a controller-minted recovery passphrase 2026-10-14 02:09:57 +02:00
otel_http_client.rs swarm-queue-client: request the bearer-authz scope when minting an agent token 2026-09-17 09:51:44 +02:00
pulls.rs swarm-ui, swarm-controller: the review try-out's repo and PR fields offer the repos and PRs to pick 2026-10-12 19:05:37 +02:00
queue_identity.rs swarm-queue-client: re-read a held OIDC client secret when the IdP refuses it 2026-10-13 19:16:04 +02:00
read_policy.rs swarm-secret-client: agents may list their own subtree; controller rewrites agent policies 2026-10-01 17:43:28 +02:00
review_classifier.rs review classifier: model, effort and review concurrency as swarm-wide settings 2026-10-13 01:45:19 +02:00
schedules.rs schedules: keep projecting a schedule whose definition stops decoding 2026-10-13 08:12:50 +02:00
status.rs swarm-controller: make status::render/row pub(crate) so agent_status.rs's doc links resolve 2026-09-02 10:20:29 +02:00
store.rs fix doc-comment pointers broken by the module-eval split 2026-09-20 04:31:08 +02:00
subagent_term.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
term_stream.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
test_nats.rs swarm-controller: end a dead replay, clamp stale resume ids, test on a real server 2026-10-11 23:26:24 +02:00
vcs_metrics.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
wanted.rs swarm-controller: first credential-renewal pass waits for the queue connection 2026-09-30 15:46:56 +02:00
webhook.rs swarm-builder: build each agent config PR head and post a commit status 2026-10-14 03:30:46 +02:00