docs(#1014): update stale root→ruth references in conventions, approvals, agent-hierarchy
This commit is contained in:
parent
0bec3af933
commit
a8ffdf31e0
3 changed files with 20 additions and 25 deletions
|
|
@ -104,16 +104,14 @@ which axis the post-milestone version reads each special-case along:
|
||||||
|
|
||||||
### A — naming + bootstrap
|
### A — naming + bootstrap
|
||||||
|
|
||||||
- `MANAGER_AGENT = "root"` (broker recipient name),
|
- `MANAGER_AGENT = "ruth"` (broker recipient name),
|
||||||
`MANAGER_NAME = "root"` (logical name, state-dir key), and
|
`MANAGER_NAME = "ruth"` (logical name, state-dir key), and
|
||||||
`MANAGER_CONTAINER = "h-root"` (nixos-container name). The `h-`
|
`MANAGER_CONTAINER = "h-ruth"` (nixos-container name); the `h-`
|
||||||
prefix makes the manager consistent with all sub-agents and lets
|
prefix lets `lifecycle::list()` use a single `starts_with("h-")`
|
||||||
`lifecycle::list()` use a single `starts_with("h-")` filter.
|
filter.
|
||||||
Existing `root` containers are renamed to `h-root` by migration
|
|
||||||
phase 5 in `migrate.rs` (idempotent, marker-guarded).
|
|
||||||
- `auto_update::ensure_manager` runs at hive-c0re boot and spawns
|
- `auto_update::ensure_manager` runs at hive-c0re boot and spawns
|
||||||
`h-root` if missing. **Topology**: root has no parent, so
|
`h-ruth` if missing. **Topology**: ruth defaults to root-level (no
|
||||||
hive-c0re itself owns its lifecycle (no parent to delegate to).
|
parent); hive-c0re handles the bootstrap lifecycle directly.
|
||||||
|
|
||||||
### B — wire-protocol privileges
|
### B — wire-protocol privileges
|
||||||
|
|
||||||
|
|
@ -175,7 +173,6 @@ read.
|
||||||
|
|
||||||
### F — drive-by checks across c0re
|
### F — drive-by checks across c0re
|
||||||
|
|
||||||
(`grep -n MANAGER_AGENT` produced ~28 hits)
|
|
||||||
|
|
||||||
- `loose_ends.rs`: manager sees hive-wide loose-ends, sub-agents only
|
- `loose_ends.rs`: manager sees hive-wide loose-ends, sub-agents only
|
||||||
their own. **Topology** — every agent sees its own + its
|
their own. **Topology** — every agent sees its own + its
|
||||||
|
|
@ -238,9 +235,8 @@ repos they're working on.
|
||||||
meta-flake's per-agent flake.nix wrapper). For the manager unit
|
meta-flake's per-agent flake.nix wrapper). For the manager unit
|
||||||
that means a hardcoded `HIVE_LABEL` env value:
|
that means a hardcoded `HIVE_LABEL` env value:
|
||||||
|
|
||||||
- `HIVE_LABEL = "root"` — logical agent name; matches what `meta.rs`
|
- `HIVE_LABEL = "ruth"` — logical agent name; matches what `meta.rs`
|
||||||
injects at deploy time. (The nixos-container is `h-root`, but the
|
injects at deploy time.
|
||||||
harness identifies itself by logical name.)
|
|
||||||
|
|
||||||
Real deploys never read these — `meta::render_flake` overrides them
|
Real deploys never read these — `meta::render_flake` overrides them
|
||||||
via the generated wrapper. They exist so the manager
|
via the generated wrapper. They exist so the manager
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
The approval queue is hyperhive's pivot: nothing that changes the
|
The approval queue is hyperhive's pivot: nothing that changes the
|
||||||
shape of an agent (its config, whether it exists) happens without an
|
shape of an agent (its config, whether it exists) happens without an
|
||||||
operator click. The manager (`root`) is the policy gate in front of
|
operator click. The manager (`ruth`) is the policy gate in front of
|
||||||
that queue; helper events are how it stays informed about what
|
that queue; helper events are how it stays informed about what
|
||||||
happens after a decision lands.
|
happens after a decision lands.
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ kind-specific payload carrier.
|
||||||
operator approval. Step 1 of the two-step spawn flow above.
|
operator approval. Step 1 of the two-step spawn flow above.
|
||||||
- `UpdateMetaInputs` — `commit_ref` stores the JSON-encoded inputs
|
- `UpdateMetaInputs` — `commit_ref` stores the JSON-encoded inputs
|
||||||
array (`"[]"` = all inputs, `"[\"nixpkgs\"]"` = just nixpkgs,
|
array (`"[]"` = all inputs, `"[\"nixpkgs\"]"` = just nixpkgs,
|
||||||
etc.). `agent` field is set to `root` (the requesting manager).
|
etc.). `agent` field is set to `ruth` (the requesting manager).
|
||||||
On approve hive-c0re runs `nix flake update [inputs...]` on the
|
On approve hive-c0re runs `nix flake update [inputs...]` on the
|
||||||
meta flake and commits the resulting lock changes.
|
meta flake and commits the resulting lock changes.
|
||||||
- `SchedulePrompt` — `commit_ref` stores the JSON-encoded
|
- `SchedulePrompt` — `commit_ref` stores the JSON-encoded
|
||||||
|
|
@ -438,23 +438,22 @@ notes, the events DB, proposed history, and applied history
|
||||||
all survive. The manager keeps its session; sub-agents stay
|
all survive. The manager keeps its session; sub-agents stay
|
||||||
logged in.
|
logged in.
|
||||||
|
|
||||||
## Manager (`root`) is hive-c0re-managed
|
## Manager (`ruth`) is hive-c0re-managed
|
||||||
|
|
||||||
The manager container runs through the **same lifecycle as
|
The manager container runs through the **same lifecycle as
|
||||||
sub-agents**. On `hive-c0re serve` startup, if `root` is missing,
|
sub-agents**. On `hive-c0re serve` startup, if `ruth` is missing,
|
||||||
hive-c0re creates it. The manager's flake lives at
|
hive-c0re creates it. The manager's flake lives at
|
||||||
`/var/lib/hyperhive/applied/root/`; its proposed config at
|
`/var/lib/hyperhive/applied/ruth/`; its proposed config at
|
||||||
`/var/lib/hyperhive/agents/root/config/`. Manager can edit its own
|
`/var/lib/hyperhive/agents/ruth/config/`. Manager can edit its own
|
||||||
`agent.nix` (visible inside the container at `/agents/root/config/`)
|
`agent.nix` (visible inside the container at `/agents/ruth/config/`)
|
||||||
and submit `request_apply_commit("root", <sha>)` for operator
|
and submit `request_apply_commit("ruth", <sha>)` for operator
|
||||||
approval.
|
approval.
|
||||||
|
|
||||||
Differences from sub-agents:
|
Differences from sub-agents:
|
||||||
|
|
||||||
- `flake.nix` extends `hyperhive.nixosConfigurations.manager`
|
- `flake.nix` extends `hyperhive.nixosConfigurations.manager`
|
||||||
(vs `agent-base`).
|
(vs `agent-base`).
|
||||||
- Container name is `root` (no `h-` prefix).
|
- Web UI port via `lifecycle::agent_web_port("ruth")` — same
|
||||||
- Web UI port via `lifecycle::agent_web_port("root")` — same
|
|
||||||
FNV-1a hash as every other agent (8100..8999 range).
|
FNV-1a hash as every other agent (8100..8999 range).
|
||||||
- `set_nspawn_flags` adds two extra binds: `/var/lib/hyperhive/agents`
|
- `set_nspawn_flags` adds two extra binds: `/var/lib/hyperhive/agents`
|
||||||
→ `/agents` (RW) so the manager can edit per-agent proposed repos,
|
→ `/agents` (RW) so the manager can edit per-agent proposed repos,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ exist because something already went wrong without them.
|
||||||
|
|
||||||
- Containers are length-bounded by `nixos-container` (≤ 11 chars).
|
- Containers are length-bounded by `nixos-container` (≤ 11 chars).
|
||||||
- Sub-agents are `h-<name>` with `<name>` ≤ 9 chars.
|
- Sub-agents are `h-<name>` with `<name>` ≤ 9 chars.
|
||||||
- The manager is `root` (no `h-` prefix, fixed name).
|
- The manager is `ruth` (fixed name).
|
||||||
- `MAX_AGENT_NAME` in `lifecycle.rs` enforces the cap.
|
- `MAX_AGENT_NAME` in `lifecycle.rs` enforces the cap.
|
||||||
- Per-agent web UI port = `WEB_PORT_BASE + FNV1a(name) % WEB_PORT_RANGE`
|
- Per-agent web UI port = `WEB_PORT_BASE + FNV1a(name) % WEB_PORT_RANGE`
|
||||||
(8100..8999) for every agent including the manager; dashboard
|
(8100..8999) for every agent including the manager; dashboard
|
||||||
|
|
@ -331,7 +331,7 @@ that allows the underlying resource access.
|
||||||
|
|
||||||
**Config storage** — per-agent capabilities live in
|
**Config storage** — per-agent capabilities live in
|
||||||
`/var/lib/hyperhive/meta/capabilities.json` alongside `tool-groups.json`.
|
`/var/lib/hyperhive/meta/capabilities.json` alongside `tool-groups.json`.
|
||||||
Format: `{ "atlas": ["read_host_journal"], "root": ["manage_root_agent"] }`.
|
Format: `{ "atlas": ["read_host_journal"], "ruth": ["manage_root_agent"] }`.
|
||||||
An absent entry means "no extra capabilities". `render_flake` in `meta.rs`
|
An absent entry means "no extra capabilities". `render_flake` in `meta.rs`
|
||||||
reads this file and injects `HIVE_CAPABILITIES` (comma-separated
|
reads this file and injects `HIVE_CAPABILITIES` (comma-separated
|
||||||
`snake_case` names) into each agent's systemd service env; absent entries emit
|
`snake_case` names) into each agent's systemd service env; absent entries emit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue