xUnit v3 migration, source-generated logging, scoped Copilot instructions & dependency bumps#34
Merged
Conversation
Replace ConcurrentQueue+SemaphoreSlim with Channel<ReplyRequest> to align with the SignalCli JSON-RPC client pattern. Add CommunicationsBgService.Logging.cs with [LoggerMessage]-attributed static partial methods for all hot-path log calls in the Stream and Messaging partials, eliminating params boxing allocations in the poll loop, stream consumer, and reply queue drain.
…artHaus into f2calv/2026-06-updates
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.
Overview
A maintenance/modernisation pass on SmartHaus covering the test stack, structured logging, repository conventions and dependency updates. No functional behaviour changes to the running application beyond richer log output and event environment tagging.
Changes
Testing — migrate to xUnit v3
xunit2.9.3withxunit.v33.2.2(keepingxunit.runner.visualstudio) inDirectory.Packages.props, updated across all*.Tests.csprojprojects.IAsyncLifetimeimplementations to the v3 signature (Task→ValueTask) inWebApiTestBase.TestContext.Current.CancellationTokenthrough async HTTP/assertion calls (HealthTests,SystemControllerTests,SignalCli*tests, etc.).global using Xunit;from per-projectGlobalUsings.cs.Source-generated logging in
CommunicationsBgServiceCommunicationsBgService.Logging.cspartial holding[LoggerMessage]definitions for the stream, polling, inbound-processing and reply-queue paths._logger.LogXxx(...)calls in the.Messaging,.Streamand main partials with the generated strongly-typed methods.global using System.Threading.Channels;to the project'sGlobalUsings.cs.Event environment tagging (
HostEnvironmentfixes)IHostEnvironmentand stampEnvironment = env.GetAcronym()onto emittedCommsEvents acrossDDnsBgService,MediaBgServiceand the*SinkCommsStreamServicecomms-stream sinks (Buderus, DoorBird, EdgeHardware, Fronius, Knx, Miele, Shelly, Sicce, Ubiquiti, Wiz).Repository conventions — scoped Copilot instructions
.github/copilot-instructions.mddown to a synced overview..github/instructions/*.instructions.mdfiles (csharp,csharp.testing,csharp.mcp,csharp.azure,dotnet,github-actions,documentation,configuration) auto-applied by file type.Dependency bumps (
Directory.Packages.props)CasCap.Common.*4.11.9→4.12.0CasCap.Api.Azure.*1.4.13→1.5.0OpenTelemetry/OpenTelemetry.Extensions.Hosting1.15.3→1.16.0Spectre.Console*0.56.0→0.57.0Testing
dotnet build SmartHaus.Debug.slnxsucceeds.dotnet testreports 490 passed / 10 skipped; the remaining failures are integration tests requiring external infrastructure not available locally (Buderus KM200 device, local Ollama/LLM endpoint, and theWebApplicationFactory-hosted health probes).