fix(#977): add MANAGER_CONTAINER=h-root, migrate root container name

This commit is contained in:
damocles 2026-06-01 18:27:11 +02:00 committed by mara
commit 68cc433ac9
5 changed files with 115 additions and 29 deletions

View file

@ -104,13 +104,15 @@ which axis the post-milestone version reads each special-case along:
### A — naming + bootstrap
- `MANAGER_AGENT = "root"` (broker recipient name) and
`MANAGER_NAME = "root"` (container name). Both now `"root"`;
renamed from `"manager"`/`"hm1nd"` via the migration script in
`migrate.rs` (idempotent, marker-guarded).
- `MANAGER_AGENT = "root"` (broker recipient name),
`MANAGER_NAME = "root"` (logical name, state-dir key), and
`MANAGER_CONTAINER = "h-root"` (nixos-container name). The `h-`
prefix makes the manager consistent with all sub-agents and lets
`lifecycle::list()` use a single `starts_with("h-")` 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
`root` if missing. Becomes "ensure the root agent exists" once any
agent can be at the root. **Topology**: root has no parent, so
`h-root` if missing. **Topology**: root has no parent, so
hive-c0re itself owns its lifecycle (no parent to delegate to).
### B — wire-protocol privileges
@ -236,8 +238,9 @@ repos they're working on.
meta-flake's per-agent flake.nix wrapper). For the manager unit
that means a hardcoded `HIVE_LABEL` env value:
- `HIVE_LABEL = "root"` — container name; matches what `meta.rs`
injects at deploy time.
- `HIVE_LABEL = "root"` — logical agent name; matches what `meta.rs`
injects at deploy time. (The nixos-container is `h-root`, but the
harness identifies itself by logical name.)
Real deploys never read these — `meta::render_flake` overrides them
via the generated wrapper. They exist so the manager