Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph hyperhive/swarm-controller
Author SHA1 Message Date
atlas
263b21021a swarm-controller: ask the builder for the archetypes again soon after a failed pass 2026-11-07 11:54:23 +01:00
iris
5633107b32 swarm ui: sort every pull requests column, and read a protection rule as the forge does
The labels and reviewers columns had no sort, so "every column sorts" was
false; both now sort on their joined text.

A branch protection rule's name is a glob the forge compiles with `/` as its
separator, which also takes `?`, `[a-z]`, `[!a-z]`, `{a,b}` and a backslash
escape. The report read only `*` and `**`, so a rule such as `{main,release}`
matched nothing and its PRs showed as protected by no rule, needing no
approvals. It now reads all of them.
2026-11-07 11:46:05 +01:00
iris
944fd5b726 swarm ui: a diff column on the pull requests card, and "approved" as its header
The pull requests card gets a diff column, the lines a PR adds and removes
(`+120 −8`), sortable on the total. The controller takes the counts from the
forge's pull request list, so no call is added. The column that said "has all
approvals" is now headed "approved".
2026-11-07 11:46:05 +01:00
iris
f633963b77 swarm ui: a pull requests card on the reports tab
The reports tab gets a "pull requests" card under the issue report. It lists
the open PRs of every repo, or of one picked in a repo select, with the
columns a reviewer or merger filters on: author, labels, requested
reviewers, base branch, WIP (the forge's draft flag), approvals against the
base branch's protection rule, has all approvals, conflicts, protected base
and CI. Every column sorts, the small-set columns filter by picking values,
and the browser keeps the filters and the repo. No filter applies at first.

swarm-controller resolves each row so the page makes no calls of its own:
GET /api/pr-report and GET /api/repos/{org}/{repo}/pr-report. The required
approvals come from the first matching branch protection rule (an
unprotected base asks for none); an approval counts when it is the
reviewer's latest decision, on the current head, neither stale nor
dismissed and official.

A free-text table cell gets a minimum width, so a table with many columns
scrolls sideways instead of wrapping a title to a word a line.
2026-11-07 11:46:05 +01:00
iris
7479d7fca7 review classifier: pin that a try-out's expiry follows its own size
The expiry test only built entries sized for ten classifications, so a run
whose deadline was ignored or fixed at the default would pass. It now checks
that a run of a hundred is still held when ten would have expired, and drops
at its own deadline.
2026-11-07 11:32:04 +01:00
iris
cffe8895df review classifier: the most classifications a run carries is a setting
The limit was a constant of ten in swarm-wire, so a repo with eleven rules
could not be reviewed and nothing short of a rebuild changed it. It is now
`max_classifications` in the classifier settings, beside
`max_concurrent_reviews`: 1 to 1000, ten until set, and a document stored
before the field decodes with the default. The classifier settings form in
the swarm UI gets a "rules per review" field, and the try-out's add button
stops at the saved limit instead of a hard-coded ten.

The controller checks a try-out, and a requested review's rules file, against
the setting where the run starts. The rules file itself may hold up to the
1000 the setting allows, so raising the limit needs no change to a repo.
A review whose rules exceed the limit posts a no-verdict comment saying so.

A run's reply deadline was a constant that covered ten classifications, a
minute plus three each. It is now computed from the run's own size, so a
bigger run waits as long as it needs and a default-sized one still waits 31
minutes. The classifier's answer window in the queue permissions covers the
biggest run the setting allows.
2026-11-07 11:32:04 +01:00
atlas
64dfe0d205 cache-miss pass pushes a record the builder did not push
A meta build whose attic push failed (attic or its token not up yet) is
recorded with cached false and the deploy goes ahead. Nothing sent that
build again until internal/meta moved, so the create for that agent
failed on every hive and a rebuild was silently never pending.

The controller's cache-miss pass now also takes a record from the head
with cached false: it sends the same build without asking the cache, with
the pass's existing backoff (30 min doubling to 12 h), and rewrites the
record with cached true once the push lands, under the same
compare-and-set guard as a path change. The push.rs module doc no longer
claims the next build pushes again.

Mixed versions: controller-only, same wire type and builder request. An
old controller leaves an uncached record as before; a builder needs no
change.

Closes #6173
2026-11-07 09:05:45 +01:00
damocles
c8eaa93268 swarm: the notification router tells a PR's author when CI on it fails or is cancelled 2026-11-06 22:01:22 +01:00
iris
6739bb903d docs: sort the top-level directories into five sections by what the reader wants
Every docs directory moves under 1-getting-started, 2-handbook,
4-implementation or 5-project; the options reference (section 3) comes from
the website and has no directory here. trust-boundary stays whole under the
handbook for now. web-ui, swarm and tools split between handbook and
implementation, and the command-line references move to
2-handbook/reference. Links, path references in code and nix, and the docs
index follow the moves; no page content changes.
2026-11-06 18:46:57 +01:00
atlas
5d2b0c9a54 swarm-builder: an agent option whose eval failed is left out of the reply, not read as its default 2026-11-06 11:36:32 +01:00
atlas
aed7c8451a read the running rev and the hyperhive flake from /etc files, not the unit 2026-11-06 11:35:48 +01:00
atlas
68b38a9d44 swarm-controller: keep retrying the forge webhook secret and registration after a startup outage
The webhook secret slot is filled in the background, on the forge token's
capped unbounded backoff, when the store can't answer at start. The hook
registration waits for the secret and retries on the same backoff instead
of giving up after five tries.

Closes #6101
2026-11-06 09:21:59 +01:00
atlas
2158302159 retry a refused shared policy write at controller startup
A refused write of the shared hive policy or the shared agent policy
returned Ok from the startup pass, so only a controller restart tried
again. Both now come back as Unreachable, which the existing 30 s retry
already covers. Per-hive role failures stay warn-and-skip.

The retry rewrites the same policy text; nothing new is minted. No wire
or option change; internal to swarm-controller.

Closes #6087
2026-11-06 09:19:07 +01:00
atlas
5485151ba6 add a per-agent nix builds mode, host or none, carried like privateUsers 2026-11-06 09:18:42 +01:00
atlas
dd5fde848f squid blocks a runtime deny list from the controller in every egress mode, ahead of the allow list 2026-11-04 22:16:35 +01:00
atlas
4d8d43d677 review-classifier: a requested review runs even on a draft pr 2026-11-02 18:45:36 +01:00
atlas
49ef93a19e review-classifier: skip draft prs, classify once when they leave draft 2026-11-02 18:21:50 +01:00
atlas
b7d8c0dfc0 queue the build of a config head that moved without a webhook build 2026-11-02 17:56:35 +01:00
atlas
d6e983995d add external gitlab accounts: stored in bao, linked per agent, allowed in squid, usable with glab 2026-11-02 16:44:56 +01:00
atlas
4356f3840c pin the declared closure once per rebuild and seed the marker from the running closure 2026-11-02 07:55:10 +01:00
atlas
47c2acb640 deploy the closure the swarm declares, read no forge head, drop the update badge 2026-11-02 07:55:10 +01:00
atlas
0737798d78 controller: turn an archetype agent into a custom one 2026-11-01 22:44:28 +01:00
atlas
90272ec3c0 move links, adminSync.ignoreUsers and scrapeTargets under their service's deploy namespace 2026-11-01 20:47:23 +01:00
atlas
ee591b0546 skip empty agent-config repos in the config-pr scan 2026-11-01 19:17:53 +01:00
atlas
329d556ab9 order grant mirror writes by direction, re-mirror every five minutes, gate on the agent's own harness 2026-11-01 18:40:36 +01:00
atlas
e7e3281098 controller gates logs and metrics on the hive capability and mirrors the grant 2026-11-01 18:40:35 +01:00
damocles
862495530c drop the applied repo: the hive keeps no copy of an agent's config, only the deploy markers. Refs #5913 2026-11-01 17:49:10 +01:00
atlas
3ca660e558 record whether an agent's config sets privateUsers in its closure record 2026-11-01 17:06:18 +01:00
damocles
25295fd33f drop the proposed config repo: applied seeds from forge main, and the dead pending-init topology list goes with it 2026-11-01 15:30:33 +01:00
argus
7aa8441aa1 review-classifier: check that a commit message's claimed changes are in the diff
message-claims-match-diff is the reverse of one-purpose: a README, doc
page, test or rename the message names must be in the diff. The rules
file then holds the ten-rule cap, so the new-rule merge test appends to
the file minus its last entry and no longer depends on how many rules the
file holds.
2026-11-01 13:44:20 +01:00
iris
ff3d119c63 the agent state stream sends a new client the latest header first
The stream was a live tail with no replay, and the agent re-sends its header
once a minute, so a card opened mid-idle read "no report yet" for up to a
minute. The controller already follows every agent's header for the inference
route; it now keeps the newest one as published, and the stream sends it
first when it is under 150 seconds old. An agent that stopped keeps no state
older than that.
2026-11-01 01:59:09 +01:00
atlas
1e572d59a9 egress: a github link also derives raw, codeload and objects hosts 2026-10-30 17:07:46 +01:00
atlas
d30cb7d122 keep authelia's oidc client secrets in the store, not on disk
The mint creates each client's secret in the swarm secret store and writes only the digest to disk. It mints only when the store answers and holds none. A new unit moves the plaintext files an earlier release left into the store and removes each once the store holds the same value. The bridge reads its secret from the store into /run before each start. The secret publisher unit and its path unit are gone.
2026-10-30 16:57:58 +01:00
atlas
9193f37963 derive per-agent egress entries from operator-linked accounts 2026-10-30 12:28:51 +01:00
atlas
e46ad07226 add a per-agent egress log mode 2026-10-30 08:52:22 +01:00
iris
b74011bb54 the builds list keeps the swarm's deploy builds too
build_meta, the build of each agent from internal/meta before a deploy, now
writes its result into the same list as the config PR builds: the agent, the
internal/meta commit, how it ended and what nix printed. The builds card titles
them by agent and shows them with the PR builds.
2026-10-30 02:06:07 +01:00
atlas
76de27fc97 bring existing agent cert roles to the 1h token ttl on controller start 2026-10-29 14:22:23 +01:00
atlas
37d5fad0b3 re-read the declaration before a mint, and mint for a current certificate whose role is missing 2026-10-29 11:42:32 +01:00
atlas
da16487800 move the squid host options to deploy.hive-controller.squid 2026-10-29 09:53:20 +01:00
atlas
8126e0fffa mint a live agent's missing store identity from the renewal pass, and log the step a mint stopped at 2026-10-29 08:27:11 +01:00
atlas
0ad1dad8b5 derive backend hosts only from the operator's save; the backfill only drops 2026-10-29 08:25:22 +01:00
atlas
7e2f4ce7c8 always include a hive's own allowedDomains in the rendered swarm-wide list 2026-10-29 08:25:22 +01:00
atlas
c5a876b845 derive an agent's backend hosts into the egress allow list at the controller 2026-10-29 08:25:22 +01:00
atlas
74f463c40e move the c0re host options to deploy.hive-controller 2026-10-29 01:08:41 +01:00
atlas
c9abc2a42b make squid's allowed domains editable at runtime in the swarm ui 2026-10-28 23:01:43 +01:00
iris
da5fcbfd9b subagents publish their model and effort as headers on every row, and the swarm shows them
The subagent daemon stamps Swarm-Model and Swarm-Effort on each row it
publishes. The list endpoint reads them off the newest row it already fetches,
so a long-running subagent keeps them past the stream's 24 hour window, and the
terminal page's menu and the agent panel's list show them beside the name.
2026-10-28 21:55:02 +01:00
atlas
22522b386a log the proxy-credential, cache-miss and users-file passes at info, with counts in the message 2026-10-28 19:57:53 +01:00
atlas
cbe41bea54 rebuild an agent's closure when the binary cache lost it 2026-10-28 13:51:01 +01:00
atlas
ec06a91deb mint per-agent proxy credentials and a per-hive squid self-check credential 2026-10-28 13:50:35 +01:00
atlas
b1a00a3222 request the review classifier when a pr is opened or reopened 2026-10-28 10:22:13 +01:00