diff --git a/skills/central-auto-updates/SKILL.md b/skills/central-auto-updates/SKILL.md index 1106849..f6706d3 100644 --- a/skills/central-auto-updates/SKILL.md +++ b/skills/central-auto-updates/SKILL.md @@ -45,7 +45,7 @@ For installer, Compose, image, and documentation work that can proceed independe ## Acceptance -Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data. +Run `bash -n install/install-server.sh`, validate PowerShell syntax when `pwsh` is available, and run `docker compose config --quiet` for both the installer output and `docker/docker-compose.prod.yml`. Exercise a first install and a second run against an isolated temporary directory: confirm secrets and nondefault `.env` values are byte-for-byte unchanged, the old Compose is backed up, missing new variables are added once, and no volume removal command appears. For the Site Install UI, assert generated CPU/GPU Compose and `docker run` references use the signed `image@sha256:` digest, mount `/var/run/docker.sock`, and pass the socket group to the non-root Agent (`DOCKER_GID` in Compose; detected socket GID for Linux `docker run`). Then follow `skills/compose-disposable-recipe/SKILL.md` with a unique project, generated credentials, isolated ports/volumes, and an EXIT cleanup trap installed before build/start. Never connect the recipe to a deployed Docker daemon or production data. When a runtime Dockerfile changes for OS security updates, source-build and health-check the corresponding Central/Agent image, then scan its saved image archive with the pinned Trivy version and the same `HIGH,CRITICAL` severities used by CI. Record the finding IDs and fixed package versions; do not hide a nonzero scan behind application acceptance. diff --git a/tests/Heimdall.Web.Tests/Components/Pages/SiteDetailTests.cs b/tests/Heimdall.Web.Tests/Components/Pages/SiteDetailTests.cs index 39f256c..687ee20 100644 --- a/tests/Heimdall.Web.Tests/Components/Pages/SiteDetailTests.cs +++ b/tests/Heimdall.Web.Tests/Components/Pages/SiteDetailTests.cs @@ -93,6 +93,12 @@ public class SiteDetailTests : PageTestBase compose.ShouldNotContain("ollama"); var agent = GetAgentService(ParseCompose(compose)); agent.Children.ShouldNotContainKey(new YamlScalarNode("deploy")); + var volumes = (YamlSequenceNode)agent.Children[new YamlScalarNode("volumes")]; + volumes.Children.Select(node => ((YamlScalarNode)node).Value) + .ShouldContain("/var/run/docker.sock:/var/run/docker.sock"); + var groups = (YamlSequenceNode)agent.Children[new YamlScalarNode("group_add")]; + groups.Children.Select(node => ((YamlScalarNode)node).Value) + .ShouldContain("${DOCKER_GID:-0}"); var environment = (YamlMappingNode)agent.Children[new YamlScalarNode("environment")]; ((YamlScalarNode)environment.Children[new YamlScalarNode("Agent__InferenceExecutionProvider")]).Value.ShouldBe("CPU"); }); @@ -160,6 +166,8 @@ public class SiteDetailTests : PageTestBase run.ShouldContain("--gpus all"); run.ShouldContain("Agent__InferenceExecutionProvider=CUDA"); run.ShouldContain("registry.example/heimdall-agent-gpu@sha256:" + new string('b', 64)); + run.ShouldContain("--group-add \"$(stat -c '%g' /var/run/docker.sock)\""); + run.ShouldContain("-v /var/run/docker.sock:/var/run/docker.sock"); }); }