feat: implement AirAppRuntimeBridge for managing runtime lifecycle and add corresponding unit tests for launcher window and runtime orchestration

This commit is contained in:
lincube
2026-07-14 01:41:01 +09:00
parent a858860b3f
commit 611d03b828
14 changed files with 852 additions and 382 deletions

View File

@@ -7,7 +7,7 @@ public sealed class LauncherArchitectureTests
[Fact]
public void CoreLauncherFolders_DoNotUseAvaloniaNamespaces()
{
var forbidden = new[] { "Deployment", "Update", "Startup", "Infrastructure" };
var forbidden = new[] { "Deployment", "Startup", "Infrastructure" };
foreach (var folder in forbidden.Select(folder => Path.Combine(LauncherProjectRoot, folder)))
{
var offenders = Directory
@@ -142,6 +142,20 @@ public sealed class LauncherArchitectureTests
AssertFileLineCountAtMost(Path.Combine(LauncherProjectRoot, "Shell", "LauncherCompositionRoot.cs"), 80);
}
[Fact]
public void SuccessfulLauncherHandoff_DoesNotWaitForHostProcessExit()
{
var coordinator = File.ReadAllText(Path.Combine(
LauncherProjectRoot,
"Shell",
"LauncherGuiCoordinator.cs"));
Assert.Contains("AttachHostAsync(hostPid)", coordinator, StringComparison.Ordinal);
Assert.Contains("desktop.Shutdown(Environment.ExitCode)", coordinator, StringComparison.Ordinal);
Assert.DoesNotContain("WaitForHostProcessToExit", coordinator, StringComparison.Ordinal);
Assert.DoesNotContain("Launcher entering host background lifetime", coordinator, StringComparison.Ordinal);
}
private static string LauncherProjectRoot => Path.Combine(RepoRoot, "LanMountainDesktop.Launcher");
private static string RepoRoot