diff --git a/backend-tests/ToxiproxyAgentProvisioningIntegrationTests.cs b/backend-tests/ToxiproxyAgentProvisioningIntegrationTests.cs index 326ab83..9862405 100644 --- a/backend-tests/ToxiproxyAgentProvisioningIntegrationTests.cs +++ b/backend-tests/ToxiproxyAgentProvisioningIntegrationTests.cs @@ -132,7 +132,8 @@ public sealed class ToxiproxyAgentProvisioningIntegrationTests StringComparison.Ordinal), $"Expected ready after read-only reconciliation, got " + $"'{reconciled.Status}' ({reconciled.Error?.Code}: " - + $"{reconciled.Error?.Message})."); + + $"{reconciled.Error?.Message}). Last test inventory: " + + $"{gateway.LastAgentInventory ?? ""}"); Assert.Equal("release-analyst", reconciled.OpenClawAgentId); Assert.Equal(1, gateway.CreateCalls); } @@ -229,8 +230,10 @@ internal sealed class ToxiproxyHttpGatewayConnector(Uri endpoint) BaseAddress = endpoint }; private int createCalls; + private string? lastAgentInventory; public int CreateCalls => Volatile.Read(ref createCalls); + public string? LastAgentInventory => Volatile.Read(ref lastAgentInventory); public GatewayConnectionState ConnectionState => GatewayConnectionState.Connected; public string? GatewayVersion => "2026.7.1"; public string? RequiredVersion => "2026.7.1"; @@ -304,9 +307,11 @@ internal sealed class ToxiproxyHttpGatewayConnector(Uri endpoint) using (response) { response.EnsureSuccessStatusCode(); - return JsonNode.Parse( - await response.Content.ReadAsStringAsync( - timeoutSource.Token)); + var payload = await response.Content.ReadAsStringAsync( + timeoutSource.Token); + if (method == "agents.list") + Interlocked.Exchange(ref lastAgentInventory, payload); + return JsonNode.Parse(payload); } } catch (OperationCanceledException)