Merge nucleic/lucid-river-toad-6efj into dev

This commit is contained in:
2026-07-29 04:04:16 -07:00
parent f5cd4a3023
commit 0f720d8328
5 changed files with 514 additions and 31 deletions
+17
View File
@@ -112,6 +112,23 @@ public sealed class BrokerServiceTests
Assert.Equal(new SessionSpec("nucleic-dev", @"C:\data", 4, 8192), wslc.LastSession);
}
/// <summary>
/// D13 Tier 1 (docs/WINDOWS_PORT.md §13.2): the facade auto-recovers a session orphaned by a
/// dead broker, but when the internal COM arm did not bind there is nothing it can do — and
/// hostd must be able to tell *that* apart from an ordinary start failure, because the remedy
/// is `wsl --shutdown` rather than a retry. This pins the kind the Swift side branches on.
/// </summary>
[Fact]
public async Task SessionEnsure_UnrecoverableConflict_SurfacesSessionExists()
{
wslc.NextError = new WslcError(WslcError.SessionExists, "already running, cannot re-adopt");
var lines = await RoundTrip(
"""{"jsonrpc":"2.0","id":9,"method":"session.ensure","params":{"name":"nucleic-dev","dataDir":"C:\\data"}}""");
var error = Assert.Single(lines).GetProperty("error");
Assert.Equal(Rpc.FacadeError, error.GetProperty("code").GetInt32());
Assert.Equal("session_exists", error.GetProperty("data").GetProperty("kind").GetString());
}
[Fact]
public async Task ImagePull_EmitsProgressNotificationsBeforeResult()
{