Skip to content

Agent Mesh

e2e: retry the admitted labelled send, the gate fail-closes slow handshakes

Antonio Ojea0fa2aae9baec
diff --git a/tests/e2e/a2a_mesh.bats b/tests/e2e/a2a_mesh.bats
index 6f17f8fd..e7d3d6cb 100644
--- a/tests/e2e/a2a_mesh.bats
+++ b/tests/e2e/a2a_mesh.bats
@@ -81,16 +81,22 @@ teardown() {
# The label the provider attests (region=eu) is admitted end to end over
# the real attestation chain — same stock client, labels via header.
+ # Retried: the gate fail-closes a slow biscuit-fetch handshake into the
+ # same 403 as a denial ("labels unverifiable: ... context deadline
+ # exceeded", seen under CI load); a genuine denial fails all attempts.
echo "[$(date +%T)] Labelled send (region=eu) must be admitted"
- run docker run --rm --network "${MESH_NETWORK}" \
- -e SAM_API_TOKEN="secret-token" \
- -e SAM_REQUIRED_LABELS="region=eu" \
- "${A2A_ECHO_IMAGE}" python3 /workspace/client.py "${mesh_base}" "hello eu"
- echo "labelled client output: $output"
- if [[ "$status" -ne 0 ]]; then
- echo "node-1 label gate verdicts:"
+ local attempt
+ for attempt in 1 2 3; do
+ run docker run --rm --network "${MESH_NETWORK}" \
+ -e SAM_API_TOKEN="secret-token" \
+ -e SAM_REQUIRED_LABELS="region=eu" \
+ "${A2A_ECHO_IMAGE}" python3 /workspace/client.py "${mesh_base}" "hello eu"
+ [[ "$status" -eq 0 ]] && break
+ echo "labelled attempt ${attempt} failed, node-1 label gate verdicts:"
docker logs "${MESH_PREFIX}-node-1" 2>&1 | grep -F '[A2A]' || true
- fi
+ sleep 2
+ done
+ echo "labelled client output: $output"
[[ "$status" -eq 0 ]]
[[ "$output" == *"agent> echo: hello eu"* ]]