From f53508cb2b8ccc12df2b75d4a938c4cb9b48e81b Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 23 Sep 2026 16:27:40 +0200 Subject: [PATCH 1/4] docs, hive-c0re: retire prose describing the removed get_loose_ends target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to 729c5b4f42ab95a1bb854da73766a6d0fe66e915, which dropped the `agent` parameter from get_loose_ends and deleted Capability::QueryAgentState with it. Three prose sites still describe the interface that commit removed: - socket_server/mod.rs's module doc claimed authority on this socket derives from "capabilities for the hive-wide queries and tool-group membership for the orchestration verbs". There are no capability-gated queries left — `git grep -n has_cap -- hive-c0re/src/socket_server/` returns nothing, and require_group("scheduling") is the only gate in dispatch_orchestration. - agent-hierarchy.md listed loose-ends visibility ("manager sees hive-wide, sub-agents only their own") as one of the manager-only overrides that "exist across hive-c0re today". It doesn't, and the sentence pointed a reader at loose_ends.rs for owner-check logic that is no longer there. - conventions.md's Loose-ends wire shape still spoke of "the agent-flavour and manager-flavour requests" and "the agent-flavour list". There is one request shape. No behaviour change: prose only. Refs #4480 --- docs/agent-lifecycle/agent-hierarchy.md | 12 +++++++----- docs/process/conventions.md | 6 +++--- hive-c0re/src/socket_server/mod.rs | 5 +++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/agent-lifecycle/agent-hierarchy.md b/docs/agent-lifecycle/agent-hierarchy.md index aeddb0fd..0ddc0bc5 100644 --- a/docs/agent-lifecycle/agent-hierarchy.md +++ b/docs/agent-lifecycle/agent-hierarchy.md @@ -132,15 +132,17 @@ Manager}` switch picks the MCP tool allow-list claude sees. Both are container including the manager, so all token/state paths resolve through it the same way everywhere. - **Scattered ownership checks** — a handful of independent -manager-only overrides exist across `hive-c0re` today: loose-ends -visibility (manager sees hive-wide, sub-agents only their own), -`destroy` refusing to act on the manager, and crash-watch skipping +manager-only overrides exist across `hive-c0re` today: `destroy` +refusing to act on the manager, and crash-watch skipping the manager (it autorestarts via systemd instead of going through the crash-watch loop). Each is planned to become a capability check instead of a manager-name check — see the -module docs for `loose_ends.rs`, `stores/broker.rs`, `actions.rs`, +module docs for `stores/broker.rs`, `actions.rs`, and `workers/crash_watch.rs` for the current owner-check logic in -each. (The harness handles reminder cancellation fully in-agent — see +each. Loose-ends visibility used to be on this list; it isn't a +manager override any more — `GetLooseEnds` takes no target and every +agent, `ruth` included, sees only its own rows. +(The harness handles reminder cancellation fully in-agent — see the note on `CancelLooseEndKind::Reminder` in `hive-c0re/src/socket_server/mod.rs`.) diff --git a/docs/process/conventions.md b/docs/process/conventions.md index cdc6d558..efd6bf10 100644 --- a/docs/process/conventions.md +++ b/docs/process/conventions.md @@ -165,8 +165,8 @@ the dashboard's "mark all read" (unbounded, per-agent). ### Loose-ends wire shape -`LooseEnd` is the per-row response shape for `GetLooseEnds` (both -the agent-flavour and manager-flavour requests). Tagged enum so +`LooseEnd` is the per-row response shape for `GetLooseEnds` — one +request shape, no per-socket flavours. Tagged enum so new thread kinds (forge PRs, long-running approvals from a privileged bot, etc.) can land later without breaking existing handlers. Each row carries enough context that the caller renders @@ -194,7 +194,7 @@ Per-variant fields: - `PendingMessages { count }` — undelivered inbox messages the agent still owes itself a `recv` for. Informational + not cancellable (drain with `recv`); only emitted when `count > 0`, - and surfaced first in the agent-flavour list as the most + and surfaced first in the list as the most actionable signal. Counted host-side from the broker (`count_pending`), so it reflects what's genuinely still queued — the wake-message that drove the current turn is already delivered diff --git a/hive-c0re/src/socket_server/mod.rs b/hive-c0re/src/socket_server/mod.rs index 85ed2523..158c908f 100644 --- a/hive-c0re/src/socket_server/mod.rs +++ b/hive-c0re/src/socket_server/mod.rs @@ -4,8 +4,9 @@ //! you are `foo`; the manager socket simply serves as `ruth`. There is no //! privilege flag — both transports run the same [`serve`] / [`dispatch`] //! code, and authority derives uniformly from the caller's identity: -//! capabilities for the hive-wide queries and tool-group membership for the -//! orchestration verbs. An agent-targeting verb may name any agent, so `ruth` +//! tool-group membership for the orchestration verbs, and nothing else — +//! the queries are all self-scoped, so no capability is consulted here at +//! all. An agent-targeting verb may name any agent, so `ruth` //! reaches every agent exactly the way every other agent does, not via any //! hardcoded name match. From d2c4c8d4a3eb740f455273257225824d4ff1f4f8 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 23 Sep 2026 17:11:45 +0200 Subject: [PATCH 2/4] docs: drop dead-claim narration for the retired loose-ends override The PR retiring loose-ends' manager-only visibility replaced the false claim with prose narrating its retirement, which still adds lines for a removal. Delete the dead claim outright instead of documenting that it used to be true: drop the three added sentences in agent-hierarchy.md, and shorten socket_server/mod.rs's authority comment to state only what's true now (tool-group membership for the orchestration verbs) rather than adding an explanatory clause for the removed capability check. --- docs/agent-lifecycle/agent-hierarchy.md | 5 +---- hive-c0re/src/socket_server/mod.rs | 8 +++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/agent-lifecycle/agent-hierarchy.md b/docs/agent-lifecycle/agent-hierarchy.md index 0ddc0bc5..e3b484d3 100644 --- a/docs/agent-lifecycle/agent-hierarchy.md +++ b/docs/agent-lifecycle/agent-hierarchy.md @@ -139,10 +139,7 @@ the crash-watch loop). Each is planned to become a capability check instead of a manager-name check — see the module docs for `stores/broker.rs`, `actions.rs`, and `workers/crash_watch.rs` for the current owner-check logic in -each. Loose-ends visibility used to be on this list; it isn't a -manager override any more — `GetLooseEnds` takes no target and every -agent, `ruth` included, sees only its own rows. -(The harness handles reminder cancellation fully in-agent — see +each. (The harness handles reminder cancellation fully in-agent — see the note on `CancelLooseEndKind::Reminder` in `hive-c0re/src/socket_server/mod.rs`.) diff --git a/hive-c0re/src/socket_server/mod.rs b/hive-c0re/src/socket_server/mod.rs index 158c908f..9b6c84b4 100644 --- a/hive-c0re/src/socket_server/mod.rs +++ b/hive-c0re/src/socket_server/mod.rs @@ -4,11 +4,9 @@ //! you are `foo`; the manager socket simply serves as `ruth`. There is no //! privilege flag — both transports run the same [`serve`] / [`dispatch`] //! code, and authority derives uniformly from the caller's identity: -//! tool-group membership for the orchestration verbs, and nothing else — -//! the queries are all self-scoped, so no capability is consulted here at -//! all. An agent-targeting verb may name any agent, so `ruth` -//! reaches every agent exactly the way every other agent does, not via any -//! hardcoded name match. +//! tool-group membership for the orchestration verbs. An agent-targeting +//! verb may name any agent, so `ruth` reaches every agent exactly the way +//! every other agent does, not via any hardcoded name match. use std::path::{Path, PathBuf}; use std::sync::Arc; From a65dbee98256ecaa82e453acc5cb05f80213d22d Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 23 Sep 2026 17:50:33 +0200 Subject: [PATCH 3/4] docs: delete two more stale manager-override claims MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit destroy has no manager-name check (actions.rs:837 says the root container is 'destroyable like any other'), and crash-watch has no name check at all (polls every managed container uniformly). The pointer to broker.rs/actions.rs/crash_watch.rs for 'owner-check logic' is also stale — none of the three hold any. --- docs/agent-lifecycle/agent-hierarchy.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/agent-lifecycle/agent-hierarchy.md b/docs/agent-lifecycle/agent-hierarchy.md index e3b484d3..e9d7d7c6 100644 --- a/docs/agent-lifecycle/agent-hierarchy.md +++ b/docs/agent-lifecycle/agent-hierarchy.md @@ -131,17 +131,6 @@ Manager}` switch picks the MCP tool allow-list claude sees. Both are injected uniformly via `systemd.globalEnvironment` for every container including the manager, so all token/state paths resolve through it the same way everywhere. -- **Scattered ownership checks** — a handful of independent -manager-only overrides exist across `hive-c0re` today: `destroy` -refusing to act on the manager, and crash-watch skipping -the manager (it autorestarts via systemd instead of going through -the crash-watch loop). Each is planned to become a capability -check instead of a manager-name check — see the -module docs for `stores/broker.rs`, `actions.rs`, -and `workers/crash_watch.rs` for the current owner-check logic in -each. (The harness handles reminder cancellation fully in-agent — see -the note on `CancelLooseEndKind::Reminder` in -`hive-c0re/src/socket_server/mod.rs`.) None of the above is a stable interface — treat the module doc From e3fefb8c5f92ab4ab17d355cd705d4e091e0ff49 Mon Sep 17 00:00:00 2001 From: atlas Date: Wed, 23 Sep 2026 18:42:13 +0200 Subject: [PATCH 4/4] docs: fix markdown indent treefmt wants after removing the ownership-checks bullet --- docs/agent-lifecycle/agent-hierarchy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/agent-lifecycle/agent-hierarchy.md b/docs/agent-lifecycle/agent-hierarchy.md index e9d7d7c6..7da5b2bb 100644 --- a/docs/agent-lifecycle/agent-hierarchy.md +++ b/docs/agent-lifecycle/agent-hierarchy.md @@ -128,9 +128,9 @@ Manager}` switch picks the MCP tool allow-list claude sees. Both are per-capability-group version (`cap:` prompt blocks + a matching tool allow-list) is additive rather than a rewrite. - **State dirs** — _not_ special-cased: `HYPERHIVE_STATE_DIR` is - injected uniformly via `systemd.globalEnvironment` for every - container including the manager, so all token/state paths resolve - through it the same way everywhere. +injected uniformly via `systemd.globalEnvironment` for every +container including the manager, so all token/state paths resolve +through it the same way everywhere. None of the above is a stable interface — treat the module doc