Watch
0
0
Fork
You've already forked hyperhive
0
Commit graph

6,889 commits

Author SHA1 Message Date
iris
f4421b216f swarm ui: the header's tabs can be dragged onto each other to reorder them
Group tabs now show the grip and drag like agent tabs, and every tab in the strip takes the place of the tab another one is dropped on; the order is kept with the open tabs. An agent's tab keeps its other drag, onto a terminal to split it. moveTab is a pure function with tests.
2026-11-20 18:32:29 +01:00
iris
0a72f212da swarm ui: a terminal keeps 2000 rows and folds a burst of rows in at once
useSwarmTermStream appended each event with [...rows, row] and never dropped one, so a tab on a busy agent grew without bound in memory and DOM and each event cost a copy of the whole list. appendRows (a pure module, tested) folds a batch in with one copy, coalesces as before, and keeps the newest 2000. Events are collected for 50ms and folded in together, so a burst is one render.

The comments that described the old coalescing in useSwarmTermStream.ts's header and in termMsg.ts's TermEnvelope doc named a hook that no longer exists (useLiveStream), so both now point at term-rows.ts, where the rule lives.
2026-11-20 17:18:10 +01:00
iris
da187f8368 swarm ui: a popover stays on the page, and the ssh popover folds its explanations
A popover hung from its anchor and ran off the foot of the window when the anchor sat low. It now goes over the anchor when it fits neither way better below, and otherwise takes the roomier side with its height cut so it scrolls inside itself; the placement is a pure function with a test, and the box places itself again when its content changes size. The ssh popover showed three long paragraphs above its switch: the explainer and the host-key text now sit in a folded how it works section, and the warning and the switch stay visible. Its sections can no longer give the popover a sideways scroll.
2026-11-20 17:15:20 +01:00
iris
3be4ec069c frontend: one time wording for the swarm UI and the dashboard, and no HTML strings in the dashboard's busy buttons
fmtAgo, fmtUntil and durationLabel move to @hive/shared/time.js. The swarm UI's util.ts is deleted and its importers (RelativeTime, ReviewRuns, BuildsPage) read the shared module directly. The dashboard's own copies are gone: its fmtAgeSecs (a third phrasing, used for two status lines) becomes the shared fmtAgo, and the dashboard util.js lost fmtAgo, fmtElapsed, epochSec and truncate, which nothing called. asyncBtn and the bulk action buttons mark themselves busy with markBusy: a spinner node before the label and aria-busy, in place of replacing the button's innerHTML with a string (and the label, so the button changed width and lost its name). The el() helper loses its html attribute.
2026-11-20 17:02:32 +01:00
iris
16a5bff2b1 dashboard: action buttons use the swarm UI's button, with its danger tone and touch height
Button.css moves to @hive/shared, a rename from swarm-ui/src/ui/button/Button.css to shared/src/button/Button.css; the swarm UI's Button imports it from there and the dashboard imports it too. The dashboard's own .btn rules and its eleven per-action colour modifiers are gone: the bulk action buttons, the per-row purge and the selection bar's clear are ui-button, destroy and purge are ui-button-danger, and all of them have the 2.75em height the dashboard buttons were under. The form() and addBulkButton helpers take a tone (danger or default) in place of a btn-* class. The danger variant is the one the confirmations PR adds, identical, so the two merge in either order.
2026-11-20 12:55:25 +01:00
maia
94dd24fa99 egress-pin: a sweep says why a port stays unbound, which veths are off the bridge and which machines it could not read
A port nobody owns, a vb- veth that never joined the bridge and a machine whose
state file or namespace can't be read all left the bridge sweep silent, so a
container stayed unbound for 11 hours with nothing in the journal.

A timer run now prints one line for each, after the finding has stood for 60 s
and once until it clears, kept in <state file>.diag. Nothing it binds changes.
2026-11-20 09:12:23 +01:00
iris
62551e004e swarm ui: an agent's named ssh connections show in its ssh popover, with add, replace and remove
The ssh popover of an opened agent card gets a folded connections section: a table of the agent's named connections (name, user@host:port) with edit and remove, and a form that saves one. The list is read on the first open; a save is a PUT that replaces a connection of the same name, so the button reads replace and a line names the connection when the name exists; remove asks first. The controller's refusal shows under the form as it comes, and the section says the connections are inactive while ssh is off. The request building is in ssh-connections.ts with a test; swarm-ui.md describes the section.
2026-11-20 09:11:03 +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
damocles
e62915d5c4 docs: ci-log --job past the last job is an error 2026-11-20 09:10:13 +01:00
damocles
e44cbea4b6 hive-forge: ci-log errors on a --job past the run's last job 2026-11-20 09:10:13 +01:00
flake-bot
be2a406818 nix flake update 2026-11-20 09:09:32 +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
iris
844fb0a219 frontend: one dismiss rule for menus and popovers, menu keys, and dialog and side panel focus
useDismiss (shared) closes a floating box on a press outside or Escape: the press is seen in the capture phase, a press in an open modal dialog is not outside, Escape yields to a modal dialog the box is not in, and a box in a dialog closes alone. Popover, Dropdown, SettingsMenu, LinksMenu and UserMenu use it in place of five copies with different rules; Escape returns the focus to the button. Dropdown takes the focus on open and moves with the arrow keys, Home and End. The link, account and settings popovers drop role=menu (they had no menu keys) for a labelled group. Dialog no longer reports a close the caller asked for, ignores a drag that started inside and ended on the backdrop, and has a 2.75em close button. Popover uses the shared clampLeft. The dashboard's side panel is inert while closed, takes the focus on open and gives it back, and no longer claims aria-modal; hive-dialog gives the focus back on close.
2026-11-20 02:20:58 +01:00
iris
a19745d30d docs: the repo's own CI checks move from the CI runner page to the project process docs
docs/4-implementation/scheduler/ci.md described both the swarm-ci-runner product (hosting, registration, security, store maintenance) and this repo's own pipeline (which jobs run on a PR, the local equivalents, the nightly VM tests). The second part is project process: it moves, whole and in order, to docs/5-project/process/ci-checks.md, with a pointer left behind, an entry in the docs index and the one doc comment in hive-forge that named the old section updated.
2026-11-20 02:15:46 +01:00
iris
f29435fcf1 swarm ui: the messages page's feed is a folded card named message log
The messages page had a card called messages under a nav tab called messages, and its feed was the only part of the page open on arrival. The feed is now the folded message log card, like the broadcast and schedules cards above it. Its header carries the connection badge (live, reconnecting, disconnected) so the state shows while it is folded; the reconnect button moves into the bar inside it. The stream keeps running while the card is folded, and opening it scrolls the list to the newest message.
2026-11-20 02:14:26 +01:00
iris
c3e24fe2c6 swarm ui: ask before actions that cannot be undone, with a danger button and a useConfirm hook
Button gains a danger variant and an autofocus prop; ConfirmDialog gains danger (red confirm, focus on cancel). Destroy, delete linked account, delete claude login, remove schedule and delete flow use it. New useConfirm hook asks from inside a handler (await confirm({...})) without a dialog's state at the call site. It now guards: removing a swarm-wide egress domain, removing a domain for every agent from an agent's popover, removing a stored API-key environment, firing a schedule now, moving an agent's internet to a looser mode, the /clear message, and reload over unsaved instructions (replacing window.confirm). The review try-out's button is now called push a branch for a PR, since it pushes a branch and does not open one, and asks first. loosensInternet is a tested helper.
2026-11-20 02:13:23 +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
iris
7efa8c8ea7 frontend: one shared IconButton for the header's settings, links and account buttons
The gear was a quiet pill badge (37px tall), the links button a bordered rounded square with its own CSS, and the avatar a third copy of the same circle. They are one IconButton now: a 2.75em circle with no fill until hovered or open, then the raised fill and a purple outline. The avatar keeps its accent fill and initials and takes the shared shape. The swarm UI and the dashboard both get the shared look.
2026-11-20 01:25:43 +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
argus
cd64cbae82 review-classifier: UI state wiring with no computation needs no test of its own
An ARIA attribute or pressed flag, a focus call after navigation and a badge
shown by an existing boolean are glue like the other UI wiring already listed.
Logic that decides from data keeps its test.
2026-11-20 00:59:12 +01:00
iris
bb344f780e swarm ui: the swarm page's cards are one gap apart, as on the reports page
The swarm page spaced its cards with a 0.5em bottom margin on a wrapper each; the reports, review, jobs and messages pages use a column with a 1em gap. The swarm page is now a column with the same gap, and the wrappers are gone. Measured in a browser: the cards are 16px apart on both pages, at the same left edge and width.
2026-11-20 00:48:12 +01:00
iris
679d2ee420 swarm ui: show agent freshness and failures where the operator looks, page titles, try again, and stale-data notes
An agent card shows its freshness (stale with the last report's age, never reported, not in swarm identity) when it is not fresh, so the status filter has a visible reason. A failed state change shows its reason in a panel under the card, and a failed cancel shows its reason in the badge, instead of a hover title. Pages can set their title (usePageTitle) and the flow editor does, so several editor tabs differ; the 404 links home. The claude login dialog offers try again after a failure, announces its wait, and has a per-agent field id. The create-agent tabs go forward again as far as the operator has been, but not past a step that is invalid now (lastReachableStep, tested), and the disabled next and create buttons say why in a hint they are described by. usePolled reports when the last live answer arrived, and StaleNote says how old a list is under a failed refresh, or that it is the answer saved from the last visit, on the alerts, builds, review runs, hives, schedules and flows lists.
2026-11-20 00:44:01 +01:00
iris
e4cfac6926 frontend: root test and typecheck scripts, and tests for the review runs wording and the terminal drag
npm test and npm run typecheck now run in every workspace that has them (the repo root had only build and clean). New tests cover RunsTypes (labels and tones for every outcome, the classification count) and termDrag (what a drag carries and how the hover reads it). instructions.ts cannot be imported by a test under Node because of its .js specifier for unified-diff.ts, so it is not covered, and the conventions doc says so.
2026-11-20 00:28:04 +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
iris
c9e6cd2e61 swarm ui: landmarks, a skip link, a page heading, named repeated buttons and a log role on the terminal
The shell now has a main landmark that takes the focus when a page opens, a skip link as the first Tab stop, a labelled nav, aria-current on the active tab, and a hidden h1 with the page's name (no page drew one). The tab close button and tab link get a visible focus ring and a larger target. Repeated edit, remove, delete, fire now, pause, duplicate buttons and the icon-only terminal, expand and close badges get a name that says what they act on (Button gains ariaLabel). A badge can be pressed (aria-pressed), used for the internet modes and the SSH target form, whose fake tablist is now a labelled group. The terminal is a focusable role=log with live announcements off, and a latest badge scrolls back to the newest row once the operator has scrolled up and the terminal has stopped following.
2026-11-20 00:23:07 +01:00
iris
1ca82b3e09 frontend: one glass token pair in place of three copied light and dark blocks
Headers, badges, terminal panes, the message box and the dashboard's bars read --glass-clear and --glass-filter from theme.css; the light palette (colors.css) and the solid-backgrounds setting set them. Each surface keeps a single rule, the per-theme override blocks and the quiet-badge specificity workaround go, and the dashboard and agent page now follow the light palette like the swarm UI.
2026-11-20 00:22:35 +01:00
iris
2a719a52e8 swarm ui: a narrow-screen header, a one-row terminal badge strip and no sideways page scroll at 360px
There was no width media query anywhere. At 360px the header wrapped into three rows covering a third of the screen, an agent card's trailing controls pushed the page 100px wider than the screen, and the terminal's state badges wrapped onto its first rows of text. At 40em or less the brand and the menus share the first header row, the nav is one row that scrolls sideways (its indicator accounts for the scroll), a card's header line wraps and its icon is smaller, and the state badges over a terminal are one row that scrolls sideways.
2026-11-19 22:33:52 +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
iris
a1e5855859 frontend: remove the unused vanilla terminal and tab strip, and fix comments that describe removed UI
shared/src/terminal/terminal.js (and its index.js re-export and package export) had no importer: the Preact Row replaced it. The .tail-pill and .load-more-pill rules were only made by it, and the preview's own tail-pill override styled a pill that no longer exists. hive-tab-strip.js had no importer either. Four constants nobody imports are no longer exported. The shared terminal pane section of the web-ui shape doc now describes Row, linkify and markdown instead of the removed factory. Header comments that named removed components (StatusChips, MetaNav, Root.tsx, the cost badge, four folded sections, a detail dialog) now describe the current code.
2026-11-19 21:47:37 +01:00
iris
3d88108c4f frontend: light-theme terminal contrast, theme before first paint, color-scheme, motion and focus defaults
Light theme: the terminal and code blocks sat on --crust, a mid grey there, so text was 2:1 to 3:1. They now use --code-bg, which keeps 95% of a light palette's background (58% of the dark one's, as before); scrims and shadows keep --crust. Dark --muted goes from 4.44:1 to 4.72:1 on --bg. The stored theme and motion overrides are set by a blocking boot script in the head (the page allows no inline script), so a light OS no longer paints light before the dark default; a test keeps its keys in step with the shell. color-scheme follows the palette, so native controls and scrollbars match a forced theme. Five infinite animations (dashboard banner, container icon, pending badge, warn banner, spinner) now honour reduced motion and the in-app motion setting, ConnectionDot uses the same three-rule shape as the others, and the hive-warn element honours the system preference. Keyboard focus gets a default ring, and the cancel button and pane divider keep a visible one.
2026-11-19 20:45:18 +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
ad30b7ea31 reconcile tick: create a placed agent whose deploy event was missed
The swarm's deploy event is core NATS. The wanted-state declaration lands
before the build, so its create fails on no record, and only the event
re-drives it; a hive that missed the event had nothing to retry.

wanted.rs now remembers which agents the last declaration places with a
container. Each tick, a placed agent with no container whose record says
the builder pushed its closure gets its first deploy through
JobQueue::insert_first_deploy_if_idle, which queues nothing while any node
targets the agent. Record reads and creates back off like restarts, in a
history of their own.
2026-11-19 12:28:42 +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
maia
ffbd2f4dea swarm-controller: an opt-in plain /healthz and /readyz listener a kubelet can probe 2026-11-19 12:23:17 +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
atlas
439cb28c8c hive-forge: ci-rerun takes repeatable --input key=value for workflow dispatch
The dispatch goes out as a raw API POST so a forge rejection of an input
reaches the caller with its response body.
2026-11-19 10:52:33 +01:00
maia
96cb25a040 swarm-controller: a stop signal ends the startup secret-store reads
The queue client secret and the webhook secret are read at start through
a retry schedule of about a minute. Neither heard SIGTERM, because the
shutdown signal was only installed once the controller began serving, so
a stop during a store outage waited out the schedule or the unit's stop
timeout.

main installs the signal first and passes it to queue_identity::init and
webhook::load. A stop that arrives first ends the read and exits 0.
2026-11-19 10:37:23 +01:00
maia
7df2d646ff swarm-controller: a TokenStore test double covers token mint and rotation
The forge token paths (ensure_*_forge_token, replace_token, observe_agent,
observe_hive) took the concrete SecretStore, so none of them could run
without OpenBao. They now take a TokenStore trait, implemented by
SecretStore, with a FakeTokens double in the store tests.

ensure_hive_forge_token keeps its order: the account and team steps, then
the store login, then the token.
2026-11-19 09:38:13 +01:00