Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/nix
Author SHA1 Message Date
damocles
e0a5f737ac hive-matrix-mcp: resolve a bare server name through matrix-sdk's discovery before connecting 2026-11-22 19:59:21 +01:00
maia
b8851743e8 egress: the forward chain refuses by default where the intercept is on
egress.forward defaults to reject while egress.intercept.enable is on (a
hive controller host turns it on) and to log otherwise, because reject
without the intercept would refuse all web traffic and an assertion
already forbids it. log stays an explicit choice.

The hive-squid VM test runs its log-mode half on the base node, so the
base pins forward = log at mkDefault priority and the reject
specialisation overrides it. A module-eval case covers the default on a
controller host, on a host without the intercept, and an explicit log.
2026-11-22 19:47:38 +01:00
iris
91e2d26133 frontend: remove the stylix overlay and add hyperhive and Catppuccin light and dark themes 2026-11-22 17:55:10 +01:00
atlas
58236e1b7f default the host's swarmctl to the gateway; login takes a callback port 2026-11-22 15:01:14 +01:00
damocles
36a8b4fa1f vm-tests: build a sample android app offline in the android-dev archetype 2026-11-22 13:25:29 +01:00
damocles
1302965ca7 nix: the bash daemon gets the agent's store identity so it can publish its tasks 2026-11-21 13:31:28 +01:00
atlas
4a554fd6bf full-setup vm test: wait for the last created agent in the meta flake 2026-11-21 12:29:38 +01:00
iris
33fdd5205e swarm: an agent's backend secrets get a store leaf of their own, and its backend environment reads back
The credentials of an agent's backend (ANTHROPIC_API_KEY and the like) move to their own leaf, swarm/agents/<agent>/backend-secrets, written through new PUT, GET and DELETE routes on /api/hives/{hive}/agents/{agent}/backend-secrets. GET says only whether any are stored. The backend environment at backend-env now reads back as stored through GET on its route, so it holds configuration only.

The agent's hive-agent-backend-env unit now runs on every agent with a store, reads both leaves and writes the configuration and then the secrets into the one file the harness and the subagent daemon load, so a secret wins over a variable of the same name. It removes the file when the store holds neither. The harness counts an agent whose environment holds ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN as API-billed, so it tries the key instead of waiting for a Claude login; a real 401 still sets needs-login. The controller's policy may delete the new leaf.

Tests: the secret-client path, the controller routes, the script test of the unit with a stub bao, the module-eval cases and the harness's mode check. Docs: the swarm UI routes, the credentials reference and the API-key provider page.
2026-11-20 20:36:33 +01:00
maia
c9204ad0e0 android-dev archetype: ship the Android SDK and nix-ld so a Gradle build runs
The archetype installed Gradle, a JDK and android-tools but no SDK, no
ANDROID_HOME/JAVA_HOME and no nix-ld, so the aapt2 Gradle downloads could not
start on NixOS and an agent could not build an app.

It now builds an SDK (build-tools 36.1.0, platform 35, no emulator or system
images), sets ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME, and enables
programs.nix-ld. The SDK's unfree names are read off the SDK and added to
allowUnfreePackages, which adds to the claude-code allowance instead of
replacing it.

Closes #6696
2026-11-20 19:35:47 +01:00
atlas
cd786ef401 document the controller tcp listener and its two leaves 2026-11-20 19:24:20 +01:00
atlas
187ed82de0 gateway reaches the controller over tls with its own client leaf when the tcp listener is on 2026-11-20 19:24:20 +01:00
maia
60af939514 swarm-archive vm test: check the no-key run died on the missing key, not is-active 2026-11-20 09:10:34 +01:00
atlas
5da6a7bbb8 egress vm test: an agent_allow element passes one MAC to one address and port under reject 2026-11-20 04:04:30 +01:00
atlas
eab2dcb0a2 egress: document the allowed ssh connections 2026-11-20 04:04:30 +01:00
atlas
8ece0b7e0b egress: the forward chain allows each agent's declared ssh connections 2026-11-20 04:04:30 +01:00
atlas
934da6f31f agent ssh connections: declare per agent, render into the agent's ssh config 2026-11-20 03:10:41 +01:00
maia
d9551415bf hive-egress: the lease hook's lines reach the journal at info under egress-lease
dnsmasq relays the hook's stderr at LOG_DEBUG as dnsmasq-script, and the
field log shipper's journald receiver keeps info and above, so no lease
add or renewal was visible in the field. The hook now also writes each
line to /dev/log at info priority with identifier egress-lease. The
stderr print stays. The VM test reads the lines back with
journalctl -t egress-lease -p info.
2026-11-20 02:04:37 +01:00
maia
1552019580 egress-pin: a hung pass fails instead of stopping every later pass
The lock wait polls try_lock and gives up at the pass deadline (30 s), nft, ip
and nsenter get 10 s each before they are killed, and both pin units get
TimeoutStartSec=90s, which systemd does not set for a oneshot unit.
2026-11-20 00:59:35 +01:00
atlas
96334845f0 hive-egress: the spoof log line says which check failed
Each refused frame now goes through its own chain, spoof_<reason>, whose log prefix names the check that refused it (mac, vlan, dhcp, v4, v6, arp). The unmetered log lines of all reasons share one named limit, spoof_unmetered, so the budget stays one for all ports and reasons.
2026-11-20 00:27:20 +01:00
atlas
d3e15c7fbe vm-nightly: one job per test, with a lint that keeps the matrix list in step
A stuck test in the shared job was cut at the runner's one-hour limit and hid the other tests' results. The matrix list is static; check-vm-test-list.sh fails CI when it differs from nix/vm-tests.nix.
2026-11-19 21:55:34 +01:00
atlas
cead194b2a vm-tests: every test's globalTimeout stays under the one-hour job limit
full-setup 7200 -> 2400, semi-spread 10800 -> 3000, and 1800 on the four tests that used the driver's one-hour default. The runner kills a job at one hour and reports nothing, so a longer test timeout could never fire.
2026-11-19 21:55:34 +01:00
atlas
2fd1b7b61a antispoof vm test: match the spoof chain's verdict with its counter stats, scope link-local binds, run the receiver by store path 2026-11-19 21:50:37 +01:00
atlas
16260108ee hive-squid vm test: wait for squid's reload before probing, and count a refusal only with its log line 2026-11-19 19:42:29 +01:00
atlas
5747c4c325 hive: install container@.service on every hive, so agents created with nixos-container can start 2026-11-19 14:41:58 +01:00
atlas
0370076463 semi-spread vm test: a controller journal entry with no message cannot crash the settle loop 2026-11-19 14:27:59 +01:00
atlas
9e04477ec7 squid vm test: derive the relay's source address from the agent's, and assert a no-lease source is refused, never forwarded 2026-11-19 14:05:02 +01:00
atlas
887ea26c56 swarm-nats: the units the responder requires uphold it
A start job of swarm-nats-auth that fails on a dependency (the server, or
the container's trust bundle, failing first) leaves the unit inactive
rather than failed, so Restart=always never applies. Its recovery was a
set of one-shot host kicks; when the last of them still found a
dependency down, the responder stayed dead and the queue refused every
client (nightly full-setup, runs 8058 and 7917).

upheldBy the units it requires: whichever comes up last starts it.
2026-11-19 12:26:13 +01:00
atlas
7c2f7443fb semi-spread: wait for the pushed repo, bound the settle, name swarm faults
The test created its agents 0.5 s after pushing hyperhive/hyperhive, while
the forge still read the repo as empty, so the create's update_meta failed
and the next try came on the controller's 10-minute round. It now waits for
the two forge reads update_meta makes.

settle_hive_agents waited 3600 s, the CI job's own limit, so a stall was
killed rather than reported. It now waits 1200 s and also stops on a swarm
fault: a build the builder did not push to the cache, or an update_meta or
build_meta failure no later round got past. Timeouts and faults dump the
swarm builder's journal from heavyduty too.

Refs #6627
2026-11-19 12:25:39 +01:00
atlas
70a8ef77a7 squid vm test: the web node's nginx serves its certificate with addSSL 2026-11-19 12:25:07 +01:00
atlas
891a1cd5b1 antispoof vm test: nft is on the host's PATH 2026-11-19 12:24:44 +01:00
atlas
29ca381114 images: slim OCI images of the swarm daemons from nix 2026-11-19 12:23:54 +01:00
atlas
c78d73ccd1 ephemeral-rootfs vm test: the drop-in runs the check from /run/hive-rootfs-check 2026-11-19 10:59:45 +01:00
maia
2eacb83b21 a removed hive's OIDC client secret is deleted with its other store credentials 2026-11-19 08:42:46 +01:00
maia
c7d37ca455 grant-bootstrap re-applies the granter and restarts failed policy units; setup treats a refused granting unit as not done 2026-11-19 08:17:02 +01:00
maia
ca734f8ea0 bash OOM order: the stale +1000/task (0) comments say 900 and 1000 2026-11-19 08:03:07 +01:00
maia
dfe8f9eac0 memory-cap: keep the header comment under the block limit 2026-11-19 08:03:07 +01:00
maia
77f33a23d8 bash tasks are the OOM killer's first victims: score 1000, subagent runs 900, MemoryHigh on the bash daemon 2026-11-19 08:03:07 +01:00
damocles
fc8ec13620 docs: drop the turn-stats sqlite section and stale mentions, point the grafana check at the daemon 2026-11-18 20:53:12 +01:00
maia
188dbcea8b swarm-victorialogs: own network namespace, gateway over a unix socket 2026-11-18 19:17:58 +01:00
maia
a3682a5e9a ship the cache's init units' journal from a host with no collector, with the cache's own client 2026-11-18 09:43:57 +01:00
atlas
e9e71a09ac bao-grants: allow the hive forge token delete in the hives metadata check 2026-11-17 06:48:05 +01:00
atlas
11fec06a50 cut off hives that left the roster: forge token, team seat, token secret, login role 2026-11-17 06:48:05 +01:00
iris
fe4d68c13f the harness no longer publishes the agent's icon; the controller is its only writer 2026-11-17 06:47:48 +01:00
maia
6b3e1f0fb2 revoking a linked Matrix account also deletes its key-backup passphrase; a plain unlink keeps it for a relink 2026-11-16 22:49:16 +01:00
atlas
a4420d80d5 run the ssh cert script test under bash 2026-11-16 20:31:18 +01:00
atlas
3d7541c0af sign ssh certificates on demand from ssh itself, warn before setup, say what to do when a host key changes 2026-11-16 20:31:18 +01:00
atlas
fc29fc89c0 shorten the controller grant comment 2026-11-16 20:31:18 +01:00
atlas
e621397252 swarm ui ssh row with target snippets, docs for the per-agent switch 2026-11-16 20:31:18 +01:00
atlas
624d5f24f8 agent ssh unit on every agent with a store, one ssh_config, controller reads the ca key 2026-11-16 20:31:18 +01:00
atlas
aeb9317ad1 correct the ssh revocation docs and say the sign permission is shared 2026-11-16 20:31:18 +01:00