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

This commit is contained in:
2026-07-29 02:52:41 -07:00
parent c755e9dee3
commit 57fd65bfe1
9 changed files with 686 additions and 151 deletions
+25
View File
@@ -51,6 +51,31 @@ public sealed class BrokerServiceTests
var caps = result.GetProperty("capabilities").EnumerateArray().Select(c => c.GetString()).ToList();
Assert.Contains("proc", caps);
Assert.DoesNotContain("ai", caps); // UnavailableAiProvider
// The facade's own capabilities ride the same list as the RPC families, because hostd
// needs both to decide what to attempt (docs/WINDOWS_PORT.md D13).
Assert.Contains("tty", caps);
Assert.Contains("reattach", caps);
}
/// <summary>
/// A compat-SDK-only facade reports no `tty`/`reattach`/`enumerate`, and that MUST reach
/// hostd through `hello` — it is the whole degradation mechanism D13 relies on, and the
/// difference between the Terminal panel being disabled and it failing in the user's face.
/// </summary>
[Fact]
public async Task Hello_OmitsCapabilitiesTheFacadeCannotServe()
{
wslc.CapabilityList = ["stats"]; // what WslcFacade reports with only the compat SDK
var result = Result(Assert.Single(await RoundTrip("""{"jsonrpc":"2.0","id":1,"method":"hello"}""")));
var caps = result.GetProperty("capabilities").EnumerateArray().Select(c => c.GetString()).ToList();
Assert.Contains("stats", caps);
Assert.DoesNotContain("tty", caps);
Assert.DoesNotContain("reattach", caps);
Assert.DoesNotContain("enumerate", caps);
// The RPC families are still advertised: the methods exist and answer, they just answer
// `unsupported` for the parts the surface cannot do.
Assert.Contains("container", caps);
Assert.Contains("proc", caps);
}
[Fact]