Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 9e7a2002d1 jobq: a generic per-state roll-up, served beside the graph
A consumer that wants "how much is in flight" — a summary line, a badge,
a health check — had to fetch the whole graph and tally it client-side,
on every poll, in every consumer.

`hive_jobq_wire::state_rollup` counts `roots` and their subtrees by
state, straight off a `Graph<N, R>` with **no bound on either
parameter**. A node's state is a scheduler concept, so counting by state
needs to know nothing about what the payload or the resource are;
bounding it like the projection does would make a host implement two
display traits to be allowed to count, which is a requirement about
rendering imposed on arithmetic.

It takes the roots for the same reason `wire_snapshot` does — which
groups are in view is the host's policy, and nothing is ever removed
from a graph — so passing the same set makes the roll-up describe
exactly the graph beside it.

Each entry carries BOTH counts: `nodes` (the whole subtree) and `roots`
(just the group tops). One rebuild is ~7 nodes and 1 root, so a summary
meaning *operations* and one meaning *steps* are different numbers over
the same queue, and picking one here would make this crate decide what
counts as a job — the domain question it exists not to answer. It
reports both structural facts; the viewer chooses.

A pair, not a map: JSON object keys are strings, so a map would spell
the state twice and give the wire no ordering. Every state rides with
its zeros in a fixed order, so a consumer can index positionally and
never handles a missing bucket. Tallying positionally against
`ALL_STATES` means a new upstream `State` fails the exhaustive match in
`state_index` rather than silently landing in an existing bucket.

hive-c0re serves it at `GET /api/jobq/rollup`. The queue-side method is
a call site, not an implementation: it supplies the lock and the same
`visible_roots` as `graph_snapshot`, so the summary cannot describe a
different visible set than the graph it summarises.
2026-08-03 20:37:06 +02:00
..
agent_config feat: derive BUN_JSC_forceRAMSize from effective per-agent MemoryMax= 2026-07-26 21:56:25 +02:00
dashboard jobq: a generic per-state roll-up, served beside the graph 2026-08-03 20:37:06 +02:00
forge fix(#2911): keep the forge token out of argv 2026-08-02 13:21:42 +02:00
job_queue jobq: a generic per-state roll-up, served beside the graph 2026-08-03 20:37:06 +02:00
lifecycle refactor(#2949): the build-log row carries its node id 2026-08-02 22:00:34 +02:00
socket_server coordinator: push_todo returns Result so callers can see delivery outcome 2026-08-03 01:08:24 +02:00
stats hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
stores hive-c0re: deliver scheduled prompts via push_todo, not a broker message 2026-08-03 01:08:24 +02:00
workers jobq: key transient tombstones per pill, not per agent 2026-08-03 18:15:58 +02:00
actions.rs fix(#2971): thread the queue node id into nix_logged 2026-08-03 17:53:53 +02:00
container_view.rs resource_limits: read the override map once per SSE scan 2026-07-26 14:56:36 +02:00
coordinator.rs jobq: key transient tombstones per pill, not per agent 2026-08-03 18:15:58 +02:00
dashboard_events.rs jobq: key transient tombstones per pill, not per agent 2026-08-03 18:15:58 +02:00
gateway_nginx.rs sweep: wire gateway-nginx reload + config-repo branch-protection into warning banners 2026-07-16 00:05:29 +02:00
loose_ends.rs hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
main.rs knowledge: ping every agent when internal/knowledge changes 2026-08-02 03:10:06 +02:00
matrix.rs fix(#2860): hive-c0re stops assuming matrix is on localhost 2026-08-03 20:34:36 +02:00
meta.rs fix(#2971): thread the queue node id into nix_logged 2026-08-03 17:53:53 +02:00
migrate.rs refactor(#2916): drop the two obsolete startup migrations 2026-08-02 01:41:37 +02:00
paths.rs refactor(#2916): drop the two obsolete startup migrations 2026-08-02 01:41:37 +02:00
priv_client.rs feat(#2862): push a snapshot to a peer hive's store over the mesh 2026-07-31 22:15:37 +02:00
questions.rs delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +02:00
server.rs hivectl: batch QueueNodes polling by id set, drop remaining dag wording 2026-08-03 20:35:24 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
webhook_secret.rs chore(#2510): bump indicatif/tower-http/hmac/sha2 to latest majors 2026-07-16 10:42:30 +02:00