Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src/lifecycle
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 7135931722 lifecycle: make the agent-uid lookup say which failure it hit
`agent_uid_gid` returns `None` for all 13 agents on every sync, and the
tmpfiles caller answers that `None` by writing `d /run/hive-agent/<name>
0777 root root` instead of `0751 <uid> <gid>` — a world-writable socket
dir, which docs/trust-boundary/boundary.md spells out as letting anything
that can reach the path unlink an agent's socket and bind its own.

Which failure fires could not be determined, because the read used
`.ok()?` and collapsed every io::Error into the same `None` a missing
user produces. None of the three causes the doc comment enumerated (not
built yet, unparseable, missing user) fits 13 long-lived containers whose
agent user demonstrably exists — from inside one:

    srw-rw-rw- atlas atlas /run/hive-agent/atlas/agent.sock

So the live cause was outside the documented set and unidentifiable. Both
`None` arms now log, with the path and the error.

Splitting the pure parser out to make it testable surfaced a second,
narrower bug. The old scan used `?` on the field reads, and those are
only reached once the name matches — so an unusable row *for the wanted
user* returned `None` from the whole function instead of skipping, hiding
a usable entry below it. (Rows for other users were always skipped fine:
`split(':')` always yields at least one item, so the first `?` could not
fire.) It now skips unusable rows and keeps looking.

Does not pre-empt #3047, which removes the lookup entirely and stays
blocked on #3998; this only makes the lookup honest about failing while
it exists.

Closes #4197.
2026-09-11 15:02:55 +02:00
..
git.rs fix(#2911): keep the forge token out of argv 2026-08-02 13:21:42 +02:00
host_config.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
mod.rs lifecycle: make the agent-uid lookup say which failure it hit 2026-09-11 15:02:55 +02:00
setup.rs hive-c0re: seed an agent's proposed config from the forge when it exists 2026-08-31 00:17:41 +02:00
tests.rs lifecycle: make the agent-uid lookup say which failure it hit 2026-09-11 15:02:55 +02:00