From 30c9eed56258710140476e6a6fc1636a0c6996fb Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 29 May 2026 20:47:24 +0200 Subject: [PATCH] matrix-mcp: drop dual-line PathExists, trim watcher comments (mara nag) --- nix/templates/harness-base.nix | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index 6a7630d6..468b04e2 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -839,21 +839,11 @@ # without the trigger the daemon would exit 0 quietly and the # MCP would have no backend until next restart. With the watcher # the daemon comes alive in the same boot cycle as provisioning. - # - # `PathExists=` fires at activation if the file is already there - # (covers re-deploys + restarts after first provisioning); the - # underlying inotify watch picks up subsequent creates (covers - # first-boot race). matrix-token can live at one of two paths - # depending on whether the container is the manager (legacy - # `/state/` mount, pending removal in #604) or a sub-agent - # (`/agents//state/` per lifecycle.rs's `notes_mount`). - # `PathExistsGlob=` matches the sub-agent shape without baking - # the agent name into module-eval; once #604 lands the manager - # will use the same shape and the explicit `PathExists=` line drops. + # The glob matches every agent (manager sees its own state at + # `/agents/hm1nd/state/` via the `/agents` bind). systemd.paths.hive-matrix-daemon = lib.mkIf config.hyperhive.matrix.enable { description = "trigger hive-matrix-daemon when matrix-token appears"; wantedBy = [ "multi-user.target" ]; - pathConfig.PathExists = "/state/matrix-token"; pathConfig.PathExistsGlob = "/agents/*/state/matrix-token"; }; @@ -865,22 +855,12 @@ # token didn't exist yet, and avatar would only land on the next # restart. With the path watcher the appearance of the token # triggers a re-fire of the service so the avatar is set in the - # same boot cycle as provisioning completes. - # - # `PathExists=` fires at activation if the file is already there - # (covers re-deploys + restarts after first provisioning); the - # underlying inotify watch picks up subsequent creates (covers - # first-boot race). matrix-token can live at one of two paths - # depending on whether the container is the manager (legacy - # `/state/` mount, pending removal in #604) or a sub-agent - # (`/agents//state/` per lifecycle.rs's `notes_mount`). - # `PathExistsGlob=` matches the sub-agent shape without baking - # the agent name into module-eval; once #604 lands the manager - # will use the same shape and the explicit `PathExists=` line drops. + # same boot cycle as provisioning completes. The glob matches + # every agent (manager sees its own state at `/agents/hm1nd/state/` + # via the `/agents` bind). systemd.paths.matrix-avatar-sync = { description = "trigger matrix-avatar-sync when matrix-token appears"; wantedBy = [ "multi-user.target" ]; - pathConfig.PathExists = "/state/matrix-token"; pathConfig.PathExistsGlob = "/agents/*/state/matrix-token"; };