hyperhive/hive-host-sock
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 792d7cb304 hive-host-sock: a jobq graph wire type that doesn't know what a node is
`jobs::NodeView` can only ever display hive-c0re's queue. Five of its
fields are domain knowledge: `approval_id` is only ever on a
`DeployWindow`, `inputs` only on a `MetaLock`, `build_log_id` only on the
nix-heavy kinds, `agent` is derived from the payload, and `kind` is a
payload tag consumers branch on. A component built against that shape
cannot render a second jobq.

`graph::GraphNode` is `hive_jobq::Node` with both generics erased: the
crate's own field set, with everything domain-specific in one opaque
`payload.data` slot the consumer renders without branching on. That is
the crate boundary made visible — hive-jobq owns structure, its host owns
meaning — and it is the same split #2957 drew inside the code.

Two details that are easy to get wrong and are pinned by tests:

`GraphDep::Node` carries `accepts` as the **set** of terminal outcomes,
not a strong/weak flag. A template emits its tails as a pair edged on the
same upstream node, and the only thing telling them apart is which
outcomes each accepts; collapsing that renders two structurally different
nodes identically.

There is **no roll-up field**. A group root ships as an ordinary node
with `parent: None`, and its own `state` is its subtree's answer —
`Finishing` means "own logic done, children still running", the terminal
states are the rolled-up outcome. A separate field would be a lossier
copy: `DagView::rollup_state` flattens `Running` and `Finishing` into
one, which is exactly the distinction a viewer wants.

`State` and `TerminalState` are re-exported from `hive-jobq` rather than
redeclared, so they cannot drift from the scheduler that produces them.
2026-08-03 00:39:14 +02:00
..
src hive-host-sock: a jobq graph wire type that doesn't know what a node is 2026-08-03 00:39:14 +02:00
Cargo.toml hive-host-sock: a jobq graph wire type that doesn't know what a node is 2026-08-03 00:39:14 +02:00
README.md docs(#2627): add READMEs for hive-jobq + the socket wire crates 2026-07-23 12:34:22 +02:00

hive-host-sock

Wire types for the host admin socket (/run/hyperhive/host.sock) — the host-control protocol spoken between the hivectl operator CLI and the hive-c0re daemon.

Why it's its own crate

Re-homed out of hive-sh4re so a standalone hivectl depends on just this protocol crate instead of the whole daemon-shared crate. hivectl drives the full hive (spawn / kill / destroy / rebuild / deploy) over this socket without linking hive-c0re; keeping the request/response shapes here is what makes that thin dependency possible.

Shape

Serde-derived request/response enums for the host admin protocol. The larger shared payload types some variants reference (Approval, AgentStatusRow, jobs::DagView) stay in hive-sh4re — this crate is only the protocol envelope, no server or client implementation.

See docs/boundary.md (host admin socket access) for the trust model around who may connect to the socket, and hive-priv-sock for the sibling split on the privileged-helper socket.