Watch
0
0
Fork
You've already forked hyperhive
0

module-eval: drop 18 redundant cases and merge assertion-only hosts

Refs #5379
This commit is contained in:
atlas 2026-10-16 19:58:10 +02:00 • committed by mara
commit 2ff253e520
15 changed files with 122 additions and 359 deletions

View file

@ -26,25 +26,6 @@ let
(agentWith { services.hyperhive.agent.user.name = "iris"; })
.system.activationScripts.hive-agent-user-migrate.text;
cases = [
{
# hive-c0re creates the host work dir as hive-core; this activation is
# the only thing that lets the agent write to it.
name = "the agent's activation hands its own work dir to the agent user";
ok =
lib.hasInfix ''if [ "$(stat -c %U "/agents/$userName/work")" != "$userName" ]; then'' migrate
&& lib.hasInfix ''heal_own_dir "/agents/$userName/work"'' migrate;
}
{
# The helper is the only recursive chown of these dirs; it must hand the
# tree to the agent user and log a failure rather than discard it.
name = "the agent's activation hands state, harness and .claude to the agent user, logging failures";
ok =
lib.hasInfix ''chown -hR "$userName:$userName" "$1" 2>&1'' migrate
&& lib.hasInfix "could not chown $1 to $userName" migrate
&& lib.hasInfix ''heal_own_dir "/agents/$userName/state"'' migrate
&& lib.hasInfix ''heal_own_dir "/agents/$userName/harness"'' migrate
&& lib.hasInfix ''heal_own_dir "$homeDir/.claude"'' migrate;
}
{
# hive-priv creates the host socket dir `0751 root` and never chowns it,
# so this activation is the only thing that lets the harness bind there.