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

6,876 commits

Author SHA1 Message Date
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
maia
b0239914b8 readiness follows a cached store check instead of a constant or a login per probe 2026-11-19 08:43:43 +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
b21a3e3632 seven daemons log through hive-log so the log store gets their severities 2026-11-19 08:36:10 +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
ae37c228b1 swarm daemons exit 0 when told to stop while still waiting for the store at startup 2026-11-19 08:06:36 +01:00
flake-bot
5dd39ba88c nix flake update 2026-11-19 08:05:59 +01:00
atlas
12e797e7e3 auto-update: a rebuild is live until its whole subtree is terminal
rebuild_live checked only MetaSync, which finishes in 0.2 s, so the next
5-min pass queued a second rebuild while the first still held the stop,
swap and start. It now covers MetaSync, AgentWindow, Prebuild,
StopForUpdate, Swap and RebuildBookkeeping. AgentWindow is also the brace
of a pause window, so an open pause skips that agent's pass too; the docs
say so and a test pins it.
2026-11-19 08:05:01 +01:00
atlas
36515c289d reconcile: start a stopped harness inside a running container
hive-priv gains AgentHarness { agent_name, action: probe | start }, which
runs systemctl -M h-<name> against the fixed unit hive-agent.service.
run_reconcile and the 1-min tick read the unit for a running wanted-up
agent and start it when it is inactive or failed. A hive-priv without the
op reads as unknown state and leaves reconcile container-only.
2026-11-19 08:03:56 +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
22105fe423 bash OOM order: subagent test expects 900, const asserts for clippy 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
iris
d4dc8b48b1 swarm ui: the context limit zones line up with their handles and legend
The zones were drawn by percentage of the full track, but a range input's thumb travels its own range less one thumb width, and the range starts at 5. So the colour edges sat off the handles. The zones now follow the thumb's travel (a tested helper in soft-context), and the Firefox thumb has the same size as the other. The legend bars had no colour either, as the item rule reset the border colour; their rule is now more specific.
2026-11-18 23:22:03 +01:00