swarm-otel-sockets probes once at activation. On a fresh swarm the
collector opens its sockets only after authelia answers, which is after
the operator unseals the store, so the probe failed and stayed failed
after ingest worked: the only red unit on the swarm.
swarm-otel-sockets-recheck.timer now starts it again each minute, and
only while it is failed (an ExecCondition on systemctl is-failed), with
a restart that does not block. The check itself gets no Restart: a
oneshot's start job stays pending through an automatic restart, so a
switch would wait on it for as long as the collector is down, and the
failed check is what the switch reports. full-setup waits for the check
to be active after the collector has recovered, and the module-eval case
pins the timer, the condition and the absence of a Restart.
Closes#6836
The model list read swallowed every failure, so a swarm that timed out
answering /api/models looked the same as one with no models: the dropdown
held only the agent's own value and "other…", with nothing to say why.
The failure now shows as a warning with the controller's reason and a
retry button, and the answer is read through a parser that ignores any
shape but a list of names.
swarm-bao-agent-pki (the agent PKI mount, its root and role, and the
listener's trust in it, with the restart of openbao) and
swarm-bao-agent-ssh-policy (the agent SSH CA mount and its role) are
their own module, with the bindings only they use. The mount names, the
cached agent CA, the listener bundle and the unit timeouts the host
module also reads join lib/swarm-bao-shared.nix.
Refs #6820
main read the environment inline and held the per-repo pass, the
certificate gauges and the verdict, so none of it could run in a test.
Each is now a function with its inputs as arguments:
- Env::read takes a lookup closure in place of std::env (same read
order), var names a missing setting by its full variable.
- finish, skip_counts, wanted_repo, walk_done, trimmed and cert_gauges
hold the branches that were inline.
- A pass talks to the forge, the identity provider and the collector
through a Remote trait. Live is the daemon's HTTP implementation, and
the tests' stand-in answers from memory, so no test opens a socket.
- post_request builds the collector request and refused the refusal
text, so both are tested without a connection.
x509-cert becomes a dev-dependency (the workspace already pins it) for
the test certificate. Behaviour is the same.
Refs #6811
The 17 swarm-bao-*-policy units that write a service's own policy and
cert-auth role (Grafana, the collector, the queue and store responders,
the CI runner and poller, the classifier, the builder, the cache, the
archive, the claude login minter, the notification router, stt and the
forge publisher) are their own module, with the reader lists and the unit
shape they use. The stanzas, leaves and unit helpers the host module also
reads join lib/swarm-bao-shared.nix.
Refs #6820
swarm-bao.nix held 5,146 lines in one module. Move two pieces out, with
no change to what it renders:
- lib/swarm-bao-shared.nix: the bindings more than one concern reads
(the TLS directory, the granter's login and unit shape, the leaves
several grants name, the CLI wrapper). swarm-bao.nix and the sibling
modules import it and inherit what they use.
- swarm-bao-operator-viewer.nix: the store's browser-UI login (the
operator viewer policy, the oidc auth config and its role), gated as it
was on the store and its server certificate.
Refs #6820
GET /api/models listed the agent-inference bucket on every request with
keys(), which needs the nameless ephemeral consumer subject
CONSUMER.CREATE.KV_agent-inference. The controller's NATS grant had that
subject for the status, permissions and bash task buckets but not for
this one, so NATS refused the create and the client waited out its
timeout: the request hung every time.
The controller now follows the bucket with a watch that replays each
key's current value first, keeps each agent's models in memory beside the
reported ones, and answers the request from there without reading the
bucket. The grant adds the one create subject the watch needs, with a
policy test like the other buckets'.
main read the environment through closures built inline and held the
per-request admission and answer inside the receive loop, so none of it
could run in a test. Each is now a function:
- env_var and env_number read through a lookup closure in place of
std::env, and main wraps std::env::var.
- request_agent, admit and respond hold the admission and the answer of
one request; answer takes any Engine instead of Whisper.
- stored_value holds the check on the stored client secret.
Tests run settings, admission and answers against a fake engine.
Closes#6811
The inference section was one wrapping line of badges, with the CPU and
memory caps among them, and an edit button that opened the same fields in
a dialog. The editor is now the section itself: a line says what the
agent runs on now and where it comes from, and the fields sit in one row
where there is room, with save, reset and clear below. Unsaved edits are
kept per agent. The claude login and API key row stays below. The caps
are not inference settings, so they become a row of the access section.
On a busy agent the activity section grew long: the todos and bash tasks
ran to dozens of rows, and the subagents were one wrapping line of badges.
Each list now shows its first five rows with a "show all N" button;
expanded, the rows scroll in a bounded box. The subagents are one row each
(name, model and effort, state and age), running first and the rest dimmed,
as in the menu on the terminal page, and a picked subagent stays in view
when the list is folded.
The collector's and Grafana's OIDC delivery units exited 0 when the store
held no value, so systemd did not retry them. On a fresh swarm authelia's
mint writes the secret about 30 s after the first read, and only the
refresh timer, ten minutes on, read it again. Both units now exit 75, and
the store retry they already carry asks every 30 s until the mint lands.
Closes#6790
An empty secret file made the prometheus receiver request a token for each published target every scrape; authelia's per-address limit then refused every client behind that address. Without a secret the collector starts on the config minus those jobs. full-setup asserts the limiter never fired.
parse_ports drops a bridge port whose listing has no numeric link_index
without a line, and the unenslaved check cannot see it because it is on
the bridge. A sweep now names such a veth after the usual 60 s grace,
keyed by its ifindex so a restart is a new finding. Diagnostics only: no
binding changes.
Refs #6646
The agent module exposes the PNG nix renders from the agent's icon as the
read-only option services.hyperhive.agent.iconPng, which the forge and matrix
avatar syncs now share. When the builder reads an icon it builds that one
attribute with nix build and sends the file, base64, next to the SVG in the
meta build reply, so the builder runs no renderer of its own.
After recording the icon, the controller sets the avatar of
agent-configs/<agent> from the PNG as the forge admin, removes the avatar when
the icon is removed, and leaves it alone when the builder sent no PNG. A marker
per repo holds the image's fingerprint, so a build whose icon did not change
makes no forge call; a forge that refuses the avatar does not fail the build.
An old builder sends no PNG, so it changes nothing.
The controller reads the PR's title and description with the rest of it and
puts both in the run's shared context, ahead of the commits. An empty
description reads as `(none)`. `TryOut` carries them as optional fields, so a
controller that sends none still gets its run answered.
New rule `closes-only-finished-issues`: a description that carries a closing
keyword for an issue and also says the PR leaves part of it undone is a
violation, because the keyword closes the issue when the PR merges.
The section shows the editor, with save, undo and the conflict handling,
instead of an edit badge that opens it in a dialog. It loads when the section
is first opened and keeps an unsaved edit while the section is mounted, so the
kept-edit wrapper the dialog needed goes away.
The details pane showed the agent's name, then status, message and wanted
rows with no card, then a folded status section repeating the state, and a
single settings section of eleven rows of different kinds.
The pane now opens with one identity card: icon and name, the wanted menu,
badges for freshness, turn state, context and a needed login, the whole
status message, and the hive, links and config PR. Below it the folded
sections answer one question each: terminal, activity (todos, subagents and
background tasks together), instructions, inference (which now holds the
claude login and API key), access, and accounts. The terminal page's popover
shows the card without the name and the four settings sections.
The filter bar no longer offers a filter on an agent's config PR. A
filter saved on it before is dropped by the table's existing handling of
columns that no longer exist.
With a selected agent the shell's 90em column left a wide screen mostly
empty. The page now raises that cap to 160em while two columns are
showing, and the details take three parts to the list's one (the list keeps
at least 24em). The cap and the columns move with the same easing.
ci.md named a raw forge port that no longer exists; network.md's map listed infra containers as sharing the host netns, which the forge no longer does.
The hive-forge container leaves the host netns and listens on no TCP port: Forgejo serves HTTP on a unix socket the gateway proxies to, and the built-in SSH server is off. The httpPort, sshPort and openFirewall options are removed with a message each.
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.
Select mode picks agents from the list: the select button in the filter
card, a press on an agent's icon, or a long press on a card starts it. In
it a card toggles a tick instead of opening its details, and the card's own
controls stop answering. A bar at the foot of the list has select all shown,
clear, broadcast and done; Escape leaves the mode.
Broadcast opens a dialog with the picked agents and a message box, sending
through the existing broadcast endpoint; the composer's send and result
parts are now shared with the swarm page's broadcast card. A full send shows
a toast and ends select mode; a partial one keeps the result with a retry
for the agents that failed.
Selecting an agent card opens its details in a column on the right of the
agents list, at /agents/<name>, instead of unfolding the card in place. The
list is full width until an agent is selected, then narrows and the details
slide in. A narrow screen shows the details alone, with a back button. A
card's message is cut to one line.
The shell treats /agents/<name> as the agents page, so the nav tab stays lit
and the page is not rebuilt on each selection.