Repository navigation
Tell why the Devolutions Agent broker cannot be reached - #5613
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits intoOct 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The shared transport references an exception excluded from the elevated helper’s compilation, blocking Windows builds and publishing.
1 open issue
What changed in this PR
This PR adds more specific Devolutions Agent broker diagnostics to package operations and the policy inspector, helping users distinguish setup problems from client rejection.
Changes:
- Detects missing broker pipes and connections closed before any response arrives.
- Adds targeted failure messages and separates authentication failures from policy-management access denials.
- Adds transport, service, operation, and view-model tests, plus English strings.
| File | Description |
|---|---|
src/UniGetUI.Tests/AgentPolicyInspectorViewModelTests.cs |
Tests the new inspector status titles. |
src/UniGetUI.PackageEngine.Tests/PackageOperationsTests.cs |
Tests operation failure messages for each diagnosis. |
src/UniGetUI.PackageEngine.Tests/BrokerPolicyTransportTests.cs |
Tests disconnect classification and missing-pipe detection. |
src/UniGetUI.PackageEngine.Tests/BrokerPolicyManagementServiceTests.cs |
Tests authentication and reachability status mapping. |
src/UniGetUI.PackageEngine.Tests/BrokerFailureDescriberTests.cs |
Tests descriptions for diagnosed failures. |
src/UniGetUI.PackageEngine.Operations/PackageOperations.cs |
Diagnoses broker failures before notifying users. |
src/UniGetUI.PackageEngine.AgentBroker/PolicyWriteElevation/Shared/BoundedNamedPipeBrokerTransport.cs |
Marks connections closed before a response arrives. |
src/UniGetUI.PackageEngine.AgentBroker/PolicyManagement/BrokerPolicyManagementService.cs |
Maps transport and authentication failures to specific statuses. |
src/UniGetUI.PackageEngine.AgentBroker/PolicyManagement/BrokerPolicyManagementModels.cs |
Adds diagnostic status values. |
src/UniGetUI.PackageEngine.AgentBroker/BrokerReachability.cs |
Adds pipe detection and diagnostic health requests. |
src/UniGetUI.PackageEngine.AgentBroker/BrokerPolicyFailure.cs |
Centralizes authentication-failure detection. |
src/UniGetUI.PackageEngine.AgentBroker/BrokerFailureDescriber.cs |
Provides actionable broker failure descriptions. |
src/UniGetUI.Avalonia/ViewModels/Pages/SettingsPages/AgentPolicyInspectorViewModel.cs |
Displays the new inspector messages. |
src/Languages/lang_en.json |
Adds English diagnostic strings. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "ddc5b1a0-d230-11f1-9624-87480a80b3bf",
"headSha": "69ae32e7345def1cf9d6eda3a45fb448cc03ade4",
"reviewer": "copilot-pull-request-reviewer[bot]"
}
Gabriel Dufresne (GabrielDuf)
deleted the
fix/broker-unreachable-diagnosis
branch
October 27, 2026 18:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
When UniGetUI cannot reach the Devolutions Agent package broker, the policy inspector and brokered package operations show the same generic message ("Devolutions Agent is unavailable" / "Agent broker unavailable") no matter why. While setting the broker up on a test machine, three different problems all looked identical:
"PackageBroker":{"Enabled":false}inagent.json), so its pipe never exists.Each needs a different fix, and the message pointed at none of them.
Change
When the broker cannot be reached, UniGetUI now narrows down the cause:
PackageBrokerdisabled\\.\pipe\Devolutions.Now.PackageBroker.v1is absent (checked by listing the pipe namespace, which does not connect)Unauthorized/UnauthenticatedA truncated response (at least one byte received) still counts as unavailable, so a broken reply is not reported as a rejection.
BoundedNamedPipeBrokerTransportmarks a connection closed before any response byte, whether the request write fails or the first read hits EOF.lang_en.jsononly.Testing
UniGetUI.Windows.slnxtest suite passes (x64), including TUI tests. Bothdotnet format whitespaceanddotnet format stylegates are clean.ConnectionClosed/ClientRejected, matching the Agent's own log (failed trusted-writer security validation … is not a trusted principal).Not covered: the request-write-failure path has no deterministic unit test, because a test pipe can't reliably close before the client writes. The live check exercises it. The inspector page was not checked visually.
🤖 Generated with Claude Code