From 4a554fd6bf2a037eea4d172c788c40d8ffadcdd0 Mon Sep 17 00:00:00 2001 From: atlas Date: Sat, 21 Nov 2026 12:29:38 +0100 Subject: [PATCH] full-setup vm test: wait for the last created agent in the meta flake --- nix/vm-tests/full-setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/vm-tests/full-setup.py b/nix/vm-tests/full-setup.py index 7d305a368..cea42e501 100644 --- a/nix/vm-tests/full-setup.py +++ b/nix/vm-tests/full-setup.py @@ -257,9 +257,11 @@ with subtest("step 9: the first agent"): create_agent({"name": "iris", "hive": HIVE, "archetype": ARCHETYPE}) with subtest("internal/meta holds the flake the toplevels were built from"): + # The controller commits the flake after it accepts a create, so the file can exist + # holding only the earlier agents; wait for the last one created. settle( f"curl --fail --silent --insecure -H @{FORGE_AUTH} {FORGE}/api/v1/repos/internal/meta/raw/flake.nix " - ">/root/meta-flake.nix", + ">/root/meta-flake.nix && grep -qF 'iris = mkAgent' /root/meta-flake.nix", 1800, "swarm-controller", )