From 558511827c9d4b2d012f86a2b7350462870a5b17 Mon Sep 17 00:00:00 2001 From: damocles Date: Fri, 29 May 2026 16:35:33 +0200 Subject: [PATCH] harness-base: systemd.paths trigger for matrix-avatar-sync (closes #571) --- nix/templates/harness-base.nix | 36 +++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/nix/templates/harness-base.nix b/nix/templates/harness-base.nix index 274c5346..3a8eb1f5 100644 --- a/nix/templates/harness-base.nix +++ b/nix/templates/harness-base.nix @@ -745,6 +745,30 @@ ''; }; + # Path-trigger sibling so matrix-avatar-sync fires the moment + # `/matrix-token` appears (#571 closes argus's first-boot + # ordering nag on #567). On a clean boot hive-c0re's matrix + # provisioning runs concurrently with the agent container coming + # up; without this the oneshot would skip silently because the + # 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). Manager mounts state at `/state` (legacy + # path), sub-agents at `/agents/