Merge builtin decorators into core; align assembly layout with Brighter (#321)#326
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…or Brighter (#321) Tidy First (structural-only): move `QueryHandlerAttribute*` to root namespace `Paramore.Darker`, and `FallbackPolicy*` (attributes + decorators) into `Policies/{Attributes,Handlers}/` feature folders. Update production-code + side-package `using`s for the namespace moves. Test-file usings are swept in Step 5. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tidy First (structural-only): relocate Retryable* attributes and decorators,
Constants, and Polly-based builder extensions from the side package
`Paramore.Darker.Policies` into core under `src/Paramore.Darker/Policies/
{Attributes,Handlers}/`. Side-package csproj left empty pending Step 9
cleanup.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
#321) Tidy First (structural-only): add the `Newtonsoft.Json` package reference in preparation for Step 4 (move QueryLogging sources into core). CPM in `Directory.Packages.props` pins the version (13.0.4) — no version on the reference itself. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tidy First (structural-only): relocate QueryLogging attributes and
decorators, Constants, and the Newtonsoft.Json-based builder extensions
from the side package `Paramore.Darker.QueryLogging` into core under
`src/Paramore.Darker/Logging/{Attributes,Handlers}/`. Type names keep the
`QueryLogging` prefix; only folders and namespaces rename to `Logging`.
The pre-existing `Logging/ApplicationLogging.cs` is unchanged. Side-package
csproj left empty pending Step 9 cleanup.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…321) Tidy First (structural-only): update all consumers of the moved namespaces (`Paramore.Darker.Attributes`, `Paramore.Darker.Decorators`, `Paramore.Darker.QueryLogging`) to use the new `Paramore.Darker.Policies. {Attributes,Handlers}` and `Paramore.Darker.Logging.{Attributes,Handlers}` layout. `Paramore.Darker.Policies` namespace stays valid (Constants and the builder extensions live there). Filter build + tests pass on net8.0 and net9.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tidy First (structural-only): relocate `SampleMauiTestApp/` to `samples/SampleMauiTestApp/`. Update `Darker.slnx` Path attribute, preserving `Type=\"Classic C#\"` and the nested `<Configuration>` mappings. Adjust the moved csproj's `<ProjectReference>` paths (`..\src\` → `..\..\src\`) and drop the side-package references to `Paramore.Darker.Policies` and `Paramore.Darker.QueryLogging`. MAUI sample stays excluded from `Darker.Filter.slnf` per existing convention. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tidy First (structural-only): fold the 5 source files from `test/Paramore.Darker.Testing.Ports/` into `test/Paramore.Darker.Tests/Exported/` with namespace `Paramore.Darker.Core.Tests.Exported` (the post-Step-8 target). Flip the 14 public class declarations in `TestDoubles/*.cs` to `internal`, plus the 4 nested public test handlers in `Decorators/FallbackPolicyTests.cs` that were polluting `AddHandlersFromAssemblies` scans. Retarget the AOT csproj's `<ProjectReference>` to `Paramore.Darker.Tests.csproj` with `<PrivateAssets>all</PrivateAssets>`. Drop Tests's reference to `Paramore.Darker.Testing.Ports`. Update 9 `using` statements. AOT test count is AOT-only (6 tests on net8.0 and net9.0); full filter suite passes (77 + 77 + 6 + 6 = 166 tests). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…sts (#321) Tidy First (structural-only): rename `test/Paramore.Darker.Tests/` to `test/Paramore.Darker.Core.Tests/` (folder + csproj). Rewrite all 43 `namespace Paramore.Darker.Tests` declarations to `namespace Paramore.Darker.Core.Tests`, plus matching `using` statements for the Decorators/Integrations/TestDoubles sub-namespaces. Create the new `test/Paramore.Darker.Extensions.Tests/` project mirroring Brighter's layout; move 4 Integrations test files into it with namespace `Paramore.Darker.Extensions.Tests` (drop the Integrations sub-folder). Add `<InternalsVisibleTo Include="Paramore.Darker.Extensions.Tests" />` to Core.Tests so Extensions.Tests can use the internal TestDoubles. Retarget the AOT csproj `<ProjectReference>` to Core.Tests. Update `Darker.slnx` and `Darker.Filter.slnf`. Add load-bearing `ExportedTypes` comments in both registries per ADR Risks-table. Test counts: Core.Tests 69, Extensions.Tests 8, Tests.AOT 6 per TFM, all passing on net8.0 and net9.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…#321) Tidy First (structural-only): delete the now-empty side packages `src/Paramore.Darker.Policies/`, `src/Paramore.Darker.QueryLogging/`, `test/Paramore.Darker.Testing.Ports/` (folders + csprojs + bin/obj), the empty `src/Paramore.Darker/{Attributes,Decorators}/` folders, and the leftover `test/Paramore.Darker.Tests/obj`. Drop the four `<ProjectReference>` entries to deleted side packages from SampleMinimalApi, Tests.AOT, Core.Tests, and Extensions.DependencyInjection csprojs. Prune `Darker.slnx` and `Darker.Filter.slnf`. Authoritative grep safety net (per ADR §5) returns 0 results. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tidy First (structural-only): replace the placeholder `<Description>Darker Query Processor</Description>` with the merged-scope wording that reflects the now-bundled Policies and QueryLogging features. Verified the new description embeds in the produced .nuspec. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ACs verified locally: AC1 build, AC2 tests (166 total: 138 Core.Tests + 16 Extensions.Tests + 12 AOT across net8.0/net9.0), AC3 AOT count is AOT-only (6 per TFM), AC4 SampleMinimalApi serves /people and /people/2 with merged Logging.Handlers decorators running, AC6 source-tree shape matches, AC7 namespace sweep + stale csproj-ref grep return 0, AC8 solution files reference exactly the post-merge project set, AC9 Description matches. AC5 (full Darker.slnx build with MAUI) deferred to a MAUI-workload-capable machine — local SDK does not have `maui-android` installed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
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.
Summary
Tidy First (structural-only) refactor that folds
Paramore.Darker.PoliciesandParamore.Darker.QueryLogginginto core, mirroring Brighter's assembly layout. No new behaviour — the existing test suite is the verification.Paramore.Darker+Paramore.Darker.Extensions.DependencyInjection+Paramore.Darker.Testing. New in-core layout:Policies/{Attributes,Handlers}/,Logging/{Attributes,Handlers}/, root-levelQueryHandlerAttribute*.Paramore.Darker.Tests→Paramore.Darker.Core.Tests; newParamore.Darker.Extensions.Tests(4 Integrations files); foldedParamore.Darker.Testing.PortsintoCore.Tests/Exported/with visibility split —Exported/public,TestDoubles/internal — to ring-fenceAssembly.ExportedTypes-based handler scanning. AOT csproj retargeted with<PrivateAssets>all</PrivateAssets>.SampleMauiTestApp/moved undersamples/.Darker.slnxandDarker.Filter.slnfpruned; deleted side-package csprojs + emptysrc/Paramore.Darker/{Attributes,Decorators}/. Core<Description>updated to reflect merged scope.Each step is its own commit per ADR 0011 §Implementation Approach.
Closes #321.
ADR
ADR 0011 — Merge Builtin Decorators (Accepted).
Test plan
dotnet build Darker.Filter.slnf -c Releasesucceeds (0 warnings, 0 errors).dotnet test Darker.Filter.slnf -c Release --no-buildpasses: Core.Tests 69, Extensions.Tests 8, AOT 6 per TFM (net8.0 + net9.0) — 166 total.<PrivateAssets>all</PrivateAssets>.dotnet run --project samples/SampleMinimalApiservesGET /people(8-person JSON) andGET /people/{id}(fallback returns "Linus Torvalds" on broken circuit). Logger output confirmsParamore.Darker.Logging.Handlers.QueryLoggingDecoratorAsyncruns from the merged core assembly.Exported/has 5 public test doubles;TestDoubles/has 0 public classes;Extensions.Tests/has the 4 moved Integrations files.grep -rln 'namespace Paramore.Darker.Tests\b' test/Paramore.Darker.Core.Tests/returns 0. Stale csproj-ref grep (Paramore.Darker.Policies.csproj | Paramore.Darker.QueryLogging.csproj | Paramore.Darker.Testing.Ports.csproj) returns 0.Darker.slnxandDarker.Filter.slnfreference exactly the post-merge project set; no orphaned entries.<Description>matches the new merged-scope wording (verified embedded in produced.nuspec).dotnet build Darker.slnx -c Release(full solution with MAUI sample) — deferred to amaui-android-workload-capable reviewer machine before merge.🤖 Generated with Claude Code