hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas de09628c7c fix(#2733): write the agent pause marker via hive-priv
`Coordinator::set_paused` wrote the marker directly with `std::fs::write`
from hive-c0re, which runs as the unprivileged `hive-core` user. The
agent's harness dir is chowned to the agent user on every container boot
(`user.nix`'s activation chown), mode 0755 — so hive-core can stat the
marker but gets EACCES creating or unlinking it. Pause therefore only
ever worked on an agent that had never booted; the read side works
because a stat needs traverse, not write, which is why the paused pill
and `is_paused` looked healthy.

Route both directions through hive-priv, the root helper that already
owns the other writes into agent-owned directories:

- `PrivRequest::SetAgentPaused { agent_name, paused }`, with the marker
  filename constant moved to hive-priv-sock. That is the narrowest crate
  all three sides share (hive-priv deliberately does not depend on
  hive-sh4re, which re-exports it for the in-container resolver). A
  private copy on any one side would break pause silently, since every
  reader just sees "no marker".
- `write_agent_state_file` generalised to `write_agent_dir_file`, taking
  the target directory: `state/` and `harness/` are both agent-owned,
  which is the same reason both need root.
- resume unlinks via `remove_file`, which acts on the leaf and never
  follows a symlink — an agent could otherwise plant a link at the
  marker path and have root delete an arbitrary file.

`Coordinator::set_paused` becomes an async round-trip; its three call
sites were already async. Both directions stay idempotent because the
dashboard toggle and `hivectl pause|resume` fire without reading the
current state first.
2026-07-27 09:42:31 +02:00
..
agent_config feat: derive BUN_JSC_forceRAMSize from effective per-agent MemoryMax= 2026-07-26 21:56:25 +02:00
dashboard fix(#2733): write the agent pause marker via hive-priv 2026-07-27 09:42:31 +02:00
forge docs: describe the deploy subtree 2026-07-25 22:55:02 +02:00
job_queue job_queue: finish reparent call-site swap, delete dead sync path 2026-07-26 19:47:36 +02:00
lifecycle deploy: gate config merges on ancestry, CAS the applied/main move 2026-07-26 15:47:40 +02:00
socket_server docs: describe the deploy subtree 2026-07-25 22:55:02 +02:00
stats feat: per-agent CPU and memory limits 2026-07-26 14:15:05 +02:00
stores delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +02:00
workers delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +02:00
actions.rs deploy: gate config merges on ancestry, CAS the applied/main move 2026-07-26 15:47:40 +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 fix(#2733): write the agent pause marker via hive-priv 2026-07-27 09:42:31 +02:00
dashboard_events.rs delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +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 feat(#2635): wire harness-local questions mirror (inc2 pt2) 2026-07-26 02:07:33 +02:00
main.rs feat: per-agent CPU and memory limits 2026-07-26 14:15:05 +02:00
matrix.rs refactor(#2302): type socket wire fields as ident, validated by serde on deserialize 2026-07-20 21:46:18 +02:00
meta.rs feat: derive BUN_JSC_forceRAMSize from effective per-agent MemoryMax= 2026-07-26 21:56:25 +02:00
migrate.rs refactor(#2302): type socket wire fields as ident, validated by serde on deserialize 2026-07-20 21:46:18 +02:00
paths.rs fold hive-c0re module tree into the daemon binary + drop dead pub items surfaced by bin-only (#2513) 2026-07-16 10:43:08 +02:00
priv_client.rs fix(#2733): write the agent pause marker via hive-priv 2026-07-27 09:42:31 +02:00
questions.rs delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +02:00
server.rs fix(#2733): write the agent pause marker via hive-priv 2026-07-27 09:42:31 +02:00
webhook_secret.rs chore(#2510): bump indicatif/tower-http/hmac/sha2 to latest majors 2026-07-16 10:42:30 +02:00