Backport DAT-Acquisition components + upgrade to .NET 10 / Akka 1.5#13
Open
SchroterQuentin wants to merge 9 commits intomainfrom
Open
Backport DAT-Acquisition components + upgrade to .NET 10 / Akka 1.5#13SchroterQuentin wants to merge 9 commits intomainfrom
SchroterQuentin wants to merge 9 commits intomainfrom
Conversation
Bones.Akka: - Add InitializeActor (async init with stash + linear backoff retry) - Add BaseManager<TMessage, TChildActor> (dynamic child routing pattern) - Add DebouncedActor (timer-based message debouncing) - Add RestartException, DisableMessage, RestartMessage singleton - Creator<T>: add covariance (out T), keep IActorContext - DependencyInjector: add dual registration in AddCreator<TInterface, TActor> - Upgrade Akka 1.4.27 -> 1.5.14 (min), use Akka.DependencyInjection Bones.Akka.Tests (src/ library): - Add AkkaTestClass, AkkaActorWrapper, ProxyNodeActor test helpers Bones.Converters: - Add ToFloat(), ToHalf() (IEEE 754 float16), StringConverter - Add ToInt()/ToUInt() overloads without startIndex + odd byte sizes (3,5,6,7) Bones.Flow: - Add ResponsibilityChain pattern (3 impls + 4 interfaces) - Add ServiceProviderExtensions for chain factory resolution Bones.Grpc: - Add DI/DependencyInjector, DeadlineInterceptor, StreamDeadlineInterceptor - Add AddGrpcClientWithInterceptors extension, ByteStringExtensions - Move NotFoundInterceptor to Interceptors/ subfolder Bones.Selectors (new project): - JSON dot-path selector + XML XPath selector TFM: net7.0 -> net10.0 (apps/tests), keep netstandard2.0/2.1 (libraries) Dependencies: minimum compatible versions for libraries, latest for tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR backports several DAT-Acquisition utility components into the Bones codebase while upgrading the solution to .NET 10 and updating key dependencies (notably Akka.NET 1.5.x).
Changes:
- Upgraded multiple projects (including tests, demos, and benchmarks) to
net10.0and refreshed testing/infrastructure package versions. - Added new reusable components across Bones.*: gRPC interceptors/extensions, JSON/XML selectors, Akka actor base utilities, and a Flow “ResponsibilityChain” implementation.
- Extended converter utilities (hex string conversion, flexible int/uint parsing, float/half support).
Reviewed changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Bones.X509.Tests/Bones.X509.Tests.csproj | Upgrade test TFM to net10 and refresh xUnit/test SDK/coverlet refs |
| tests/Bones.Tests/Bones.Tests.csproj | Upgrade test TFM to net10 and refresh DI/test package refs |
| tests/Bones.Flow.Tests/Bones.Flow.Tests.csproj | Upgrade test TFM to net10 and refresh test package refs |
| tests/Bones.Converters.Tests/Bones.Converters.Tests.csproj | Upgrade test TFM to net10 and refresh test package refs |
| tests/Bones.Akka.Tests/Bones.Akka.Tests.csproj | Upgrade test TFM to net10 and refresh test package refs |
| src/Bones/Bones.csproj | Update core Microsoft.Extensions.* and System.Text.Json package versions |
| src/Bones.X509/Bones.X509.csproj | Upgrade library TFM to net10 |
| src/Bones.Tests/Bones.Tests.csproj | Update logging package version |
| src/Bones.Selectors/Selectors/XmlSelector.cs | Add XPath-based XML selector |
| src/Bones.Selectors/Selectors/JsonSelector.cs | Add dot-path JSON selector |
| src/Bones.Selectors/SelectorException.cs | Add dedicated exception type for selector failures |
| src/Bones.Selectors/Interfaces/IXmlSelector.cs | Add XML selector interface |
| src/Bones.Selectors/Interfaces/IJsonSelector.cs | Add JSON selector interface |
| src/Bones.Selectors/DI/DependencyInjector.cs | Add DI registration helpers for selectors |
| src/Bones.Selectors/Bones.Selectors.csproj | New selectors project definition |
| src/Bones.Monitoring/Bones.Monitoring.csproj | Upgrade TFM to net10 and refresh telemetry/dependency versions |
| src/Bones.Grpc/Interceptors/StreamDeadlineInterceptor.cs | Add server-streaming deadline interceptor |
| src/Bones.Grpc/Interceptors/NotFoundInterceptor.cs | Minor formatting update |
| src/Bones.Grpc/Interceptors/DeadlineInterceptor.cs | Add unary call deadline interceptor |
| src/Bones.Grpc/Extensions/ByteStringExtensions.cs | Add byte[] → ByteString helper |
| src/Bones.Grpc/Extensions/AddGrpcClientWithInterceptorsExtensions.cs | Add DI extension for gRPC client + interceptors |
| src/Bones.Grpc/DI/DependencyInjector.cs | Add DI registration for gRPC interceptors |
| src/Bones.Grpc/Bones.Grpc.csproj | Refresh gRPC/Protobuf dependencies and add DI package ref |
| src/Bones.Flow/Interfaces/IResponsibilityChainLink.cs | Add ResponsibilityChain link interface |
| src/Bones.Flow/Interfaces/IResponsibilityChainHandler.cs | Add ResponsibilityChain handler interface |
| src/Bones.Flow/Interfaces/IResponsibilityChainFactory.cs | Add ResponsibilityChain factory interface |
| src/Bones.Flow/Interfaces/IResponsibilityChain.cs | Add ResponsibilityChain interface |
| src/Bones.Flow/Extensions/ServiceProviderExtensions.cs | Add service provider helpers for ResponsibilityChain |
| src/Bones.Flow/Core/ResponsibilityChain/ResponsibilityChainLink.cs | Implement chain link execution logic |
| src/Bones.Flow/Core/ResponsibilityChain/ResponsibilityChainFactory.cs | Implement chain builder/factory |
| src/Bones.Flow/Core/ResponsibilityChain/ResponsibilityChain.cs | Implement chain execution + error logging |
| src/Bones.Flow/Bones.Flow.csproj | Upgrade TFM to net10 and refresh Microsoft.Extensions.* refs |
| src/Bones.Converters/StringConverter.cs | Add hex string ↔ byte[] conversions |
| src/Bones.Converters/EndianBitConverter.cs | Add flexible ToInt/ToUInt and float/half helpers |
| src/Bones.Converters/Bones.Converters.csproj | Update Unsafe package version |
| src/Bones.AspNetCore/Bones.AspNetCore.csproj | Upgrade TFM to net10 |
| src/Bones.Akka/Messages/RestartMessage.cs | Convert restart message to singleton pattern |
| src/Bones.Akka/Messages/DisableMessage.cs | Add singleton disable message |
| src/Bones.Akka/InitializeActor.cs | Add async-initialization Akka actor base class |
| src/Bones.Akka/Exceptions/RestartException.cs | Add marker exception for supervision/restart patterns |
| src/Bones.Akka/DI/DependencyInjector.cs | Extend creator registration to support concrete actor creators |
| src/Bones.Akka/DebouncedActor.cs | Add base actor with timer-based debouncing helper |
| src/Bones.Akka/Creator.cs | Add covariance to Creator delegate |
| src/Bones.Akka/Bones.Akka.csproj | Upgrade Akka packages and Microsoft.Extensions.* refs |
| src/Bones.Akka/BaseManager.cs | Add manager actor for dynamic child routing/creation |
| src/Bones.Akka.Tests/ProxyNodeActor.cs | Add test proxy actor helper |
| src/Bones.Akka.Tests/Bones.Akka.Tests.csproj | Add Akka test helper library project |
| src/Bones.Akka.Tests/AkkaTestClass.cs | Add shared Akka TestKit base class and helpers |
| src/Bones.Akka.Tests/AkkaActorWrapper.cs | Add actor helper wrapper for existence/child checks |
| src/Bones.Akka.Monitoring/Bones.Akka.Monitoring.csproj | Upgrade TFM to net10 and Akka/dependency versions |
| src/Bones.Akka.Monitoring.Weaver/Bones.Akka.Monitoring.Weaver.csproj | Upgrade TFM to net10 and Fody package versions |
| src/Bones.Akka.Monitoring.Weaver.Fody/Bones.Akka.Monitoring.Weaver.Fody.csproj | Upgrade FodyHelpers version |
| dev/demo.weaving/shared/Demo.Domain/Demo.Domain.csproj | Upgrade demo TFM to net10 and Akka version |
| dev/demo.weaving/app/Demo.Runtime/Demo.Runtime.csproj | Upgrade demo TFM to net10 and update hosting/OTel/Akka deps |
| dev/demo.weaving/app/Demo.Core/Demo.Core.csproj | Upgrade demo TFM to net10 and update DI/logging/Akka deps |
| dev/demo.flow/Demo.Flow.Console/Demo.Flow.Console.csproj | Upgrade demo TFM to net10 and update hosting/OTel deps |
| dev/demo.akka.monitoring/Demo.Akka.Monitoring.Console/Demo.Akka.Monitoring.Console.csproj | Upgrade demo TFM to net10 and update hosting/OTel/Akka deps |
| benchmarks/Bones.Converters.Benchmarks/Bones.Converters.Benchmarks.csproj | Upgrade benchmark TFM to net10 and update BenchmarkDotNet |
| BACKPORT.md | Add backport rationale and inventory of introduced components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Bones.Grpc/Extensions/AddGrpcClientWithInterceptorsExtensions.cs
Outdated
Show resolved
Hide resolved
- Add Version/Authors/Company metadata to new project csproj files - Add Bones.Selectors and Bones.Akka.Tests to publish-to-nuget.yml matrix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- InitializeActor: auto-call Stash.UnstashAll() after successful Initialize() - EndianBitConverter: fix ToInt/ToUInt crash for odd byte lengths (1/3/5/6/7) by padding to correct width with endianness-aware sign extension - EndianBitConverter: add startIndex validation in ToInt/ToUInt - EndianBitConverter: rename ToFloat to ToFloatingPoint, keep ToFloat as [Obsolete] - StringConverter: add null/empty/odd-length validation on hex input - XmlSelector: add null guards for DocumentElement and SelectNodes - Remove AddGrpcClientWithInterceptorsExtensions (each app defines its own) - Remove unused using directives and Microsoft.Extensions.Configuration reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace old ResponsibilityChain (7 files) with new ChainOfResponsibility - Two variants: <TRequest> (no result) and <TRequest, TResult> (with result) - Implements IMiddleware so it composes with Pipeline via .With(cor) / .Add(cor) - Also implements ICommandHandler for standalone usage - Simple list iteration instead of linked-list Link abstraction - Factory pattern with fluent .Add<T>() builder, DI-integrated - Add instance overloads .With(instance) and .Add(instance) on IPipelineFactory<T,R> - Make monitoring optional: TraceFactory tolerates missing IOptionsMonitor - 7 new tests covering standalone and pipeline-composed scenarios Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 63 out of 64 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Bones.Flow/Core/ChainOfResponsibility/ResultChainOfResponsibility.cs
Show resolved
Hide resolved
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bump Docker test image from sdk:7.0 to sdk:10.0 - Add setup-dotnet step in publish-to-nuget workflow - Update BACKPORT.md: ChainOfResponsibility rewrite, removed gRPC extension Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Creators are pure delegates that don't capture scope state. Aligns with RootCreator which was already Singleton. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
No description provided.