From 9ce4eb8d06b02ee2074c2d73ea95c3097fd642ff Mon Sep 17 00:00:00 2001 From: Aqua Date: Sat, 7 Nov 2026 11:48:52 +0000 Subject: [PATCH] Host startup failure names the escaped exception type; test cleanup warns when it cannot delete Co-Authored-By: Claude Sonnet 5.5 --- src/Aquarium.Engine/AquariumHost.cs | 2 +- tests/Aquarium.Engine.Tests/ClientRuntimeLoaderTrustTests.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Aquarium.Engine/AquariumHost.cs b/src/Aquarium.Engine/AquariumHost.cs index 104af9e..f3c1864 100644 --- a/src/Aquarium.Engine/AquariumHost.cs +++ b/src/Aquarium.Engine/AquariumHost.cs @@ -28,7 +28,7 @@ public static class AquariumHost catch (Exception error) { // Startup refusals carry raw, attacker-writable paths; the console gets them escaped, once, here. - Console.Error.WriteLine($"Client runtime failed to start. {ClientRuntimeLoader.Printable(error.Message)}"); + Console.Error.WriteLine($"Client runtime failed to start ({ClientRuntimeLoader.Printable(error.GetType().FullName ?? error.GetType().Name)}). {ClientRuntimeLoader.Printable(error.Message)}"); loader?.Dispose(); return 1; } diff --git a/tests/Aquarium.Engine.Tests/ClientRuntimeLoaderTrustTests.cs b/tests/Aquarium.Engine.Tests/ClientRuntimeLoaderTrustTests.cs index f3a6b46..6ab1693 100644 --- a/tests/Aquarium.Engine.Tests/ClientRuntimeLoaderTrustTests.cs +++ b/tests/Aquarium.Engine.Tests/ClientRuntimeLoaderTrustTests.cs @@ -77,6 +77,8 @@ public sealed class ClientRuntimeLoaderTrustTests : IDisposable Thread.Sleep(100); } } + + Console.Error.WriteLine($"Warning: test cleanup could not delete (locked loaded assembly?): {ClientRuntimeLoader.Printable(work)}"); } // A real client assembly: the minimal sample, copied so its location is ours to choose. @@ -389,7 +391,7 @@ public sealed class ClientRuntimeLoaderTrustTests : IDisposable var errors = CaptureError(() => exit = AquariumHost.Run(["--headless", "--client-trusted-root", volumeRoot])); Assert.Equal(1, exit); - Assert.Contains("Client runtime failed to start.", errors); + Assert.Contains("Client runtime failed to start (System.ArgumentException).", errors); Assert.Contains("cannot be the client runtime trusted root", errors); }