module-eval: agent-user test asserts the heal_own_dir form
This commit is contained in:
parent
6e1d72bfdb
commit
252b893bbb
1 changed files with 12 additions and 1 deletions
|
|
@ -32,7 +32,18 @@ let
|
|||
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 ''chown -hR "$userName:$userName" "/agents/$userName/work"'' 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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue