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/