From 996dcd4cf2648126271a310190eb009ac1029956 Mon Sep 17 00:00:00 2001 From: Peter Drier Date: Wed, 15 Jul 2026 16:45:41 +0200 Subject: [PATCH] feat(architecture): add Humans.Interfaces project as marker-only seam Phase 1 of the per-section project split (nobodies-collective/Humans#866): new lowest-level src/Humans.Interfaces project with zero ProjectReferences, holding the system marker interfaces (IApplicationService, IOrchestrator, IInvalidator, IFanout, IRepository) and architecture attributes (Grandfathered, DontFix, SurfaceBudget). Namespaces are preserved exactly (namespace != assembly), so no using changes and the Humans.Analyzers full-name constants keep resolving. Only non-mechanical change: two test reflection anchors that used typeof(IApplicationService).Assembly to mean "the Humans.Application assembly" are re-anchored to types that stay in that assembly. Left behind on purpose: IRecurringJob (has a member, not a pure marker) and ExpiresOnAttribute (lives in Humans.Domain, untouched in phase 1). Co-Authored-By: Claude Fable 5 --- Humans.slnx | 1 + src/Humans.Application/Humans.Application.csproj | 1 + .../Architecture/DontFixAttribute.cs | 0 .../Architecture/GrandfatheredAttribute.cs | 0 .../Architecture/SurfaceBudgetAttribute.cs | 0 src/Humans.Interfaces/Humans.Interfaces.csproj | 10 ++++++++++ .../Interfaces/IApplicationService.cs | 0 .../Interfaces/IFanout.cs | 0 .../Interfaces/IInvalidator.cs | 0 .../Interfaces/IOrchestrator.cs | 0 .../Interfaces/Repositories/IRepository.cs | 0 .../Architecture/ServiceBoundaryArchitectureTests.cs | 5 ++++- .../Services/DependencyCycleResolutionTests.cs | 2 +- 13 files changed, 17 insertions(+), 2 deletions(-) rename src/{Humans.Application => Humans.Interfaces}/Architecture/DontFixAttribute.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Architecture/GrandfatheredAttribute.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Architecture/SurfaceBudgetAttribute.cs (100%) create mode 100644 src/Humans.Interfaces/Humans.Interfaces.csproj rename src/{Humans.Application => Humans.Interfaces}/Interfaces/IApplicationService.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Interfaces/IFanout.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Interfaces/IInvalidator.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Interfaces/IOrchestrator.cs (100%) rename src/{Humans.Application => Humans.Interfaces}/Interfaces/Repositories/IRepository.cs (100%) diff --git a/Humans.slnx b/Humans.slnx index 5de636feae..6c3d9286d9 100644 --- a/Humans.slnx +++ b/Humans.slnx @@ -2,6 +2,7 @@ + diff --git a/src/Humans.Application/Humans.Application.csproj b/src/Humans.Application/Humans.Application.csproj index c8cd9fe352..f0cb8851ef 100644 --- a/src/Humans.Application/Humans.Application.csproj +++ b/src/Humans.Application/Humans.Application.csproj @@ -6,6 +6,7 @@ + diff --git a/src/Humans.Application/Architecture/DontFixAttribute.cs b/src/Humans.Interfaces/Architecture/DontFixAttribute.cs similarity index 100% rename from src/Humans.Application/Architecture/DontFixAttribute.cs rename to src/Humans.Interfaces/Architecture/DontFixAttribute.cs diff --git a/src/Humans.Application/Architecture/GrandfatheredAttribute.cs b/src/Humans.Interfaces/Architecture/GrandfatheredAttribute.cs similarity index 100% rename from src/Humans.Application/Architecture/GrandfatheredAttribute.cs rename to src/Humans.Interfaces/Architecture/GrandfatheredAttribute.cs diff --git a/src/Humans.Application/Architecture/SurfaceBudgetAttribute.cs b/src/Humans.Interfaces/Architecture/SurfaceBudgetAttribute.cs similarity index 100% rename from src/Humans.Application/Architecture/SurfaceBudgetAttribute.cs rename to src/Humans.Interfaces/Architecture/SurfaceBudgetAttribute.cs diff --git a/src/Humans.Interfaces/Humans.Interfaces.csproj b/src/Humans.Interfaces/Humans.Interfaces.csproj new file mode 100644 index 0000000000..3c9b59ea03 --- /dev/null +++ b/src/Humans.Interfaces/Humans.Interfaces.csproj @@ -0,0 +1,10 @@ + + + + + diff --git a/src/Humans.Application/Interfaces/IApplicationService.cs b/src/Humans.Interfaces/Interfaces/IApplicationService.cs similarity index 100% rename from src/Humans.Application/Interfaces/IApplicationService.cs rename to src/Humans.Interfaces/Interfaces/IApplicationService.cs diff --git a/src/Humans.Application/Interfaces/IFanout.cs b/src/Humans.Interfaces/Interfaces/IFanout.cs similarity index 100% rename from src/Humans.Application/Interfaces/IFanout.cs rename to src/Humans.Interfaces/Interfaces/IFanout.cs diff --git a/src/Humans.Application/Interfaces/IInvalidator.cs b/src/Humans.Interfaces/Interfaces/IInvalidator.cs similarity index 100% rename from src/Humans.Application/Interfaces/IInvalidator.cs rename to src/Humans.Interfaces/Interfaces/IInvalidator.cs diff --git a/src/Humans.Application/Interfaces/IOrchestrator.cs b/src/Humans.Interfaces/Interfaces/IOrchestrator.cs similarity index 100% rename from src/Humans.Application/Interfaces/IOrchestrator.cs rename to src/Humans.Interfaces/Interfaces/IOrchestrator.cs diff --git a/src/Humans.Application/Interfaces/Repositories/IRepository.cs b/src/Humans.Interfaces/Interfaces/Repositories/IRepository.cs similarity index 100% rename from src/Humans.Application/Interfaces/Repositories/IRepository.cs rename to src/Humans.Interfaces/Interfaces/Repositories/IRepository.cs diff --git a/tests/Humans.Application.Tests/Architecture/ServiceBoundaryArchitectureTests.cs b/tests/Humans.Application.Tests/Architecture/ServiceBoundaryArchitectureTests.cs index a99daf81ab..9857fe3d58 100644 --- a/tests/Humans.Application.Tests/Architecture/ServiceBoundaryArchitectureTests.cs +++ b/tests/Humans.Application.Tests/Architecture/ServiceBoundaryArchitectureTests.cs @@ -138,8 +138,11 @@ internal static IEnumerable ScanApplicationServiceEntityReadReturns() } } + // Anchored to a type that lives in Humans.Application — the marker + // interfaces (IApplicationService, IRepository, …) moved to the + // Humans.Interfaces assembly, keeping their namespaces. private static IEnumerable ApplicationInterfaceTypes() => - typeof(IApplicationService).Assembly.GetTypes() + typeof(IUserRepository).Assembly.GetTypes() .Where(t => t.IsInterface) .Where(t => t.Namespace?.StartsWith("Humans.Application.Interfaces", StringComparison.Ordinal) == true); diff --git a/tests/Humans.Application.Tests/Services/DependencyCycleResolutionTests.cs b/tests/Humans.Application.Tests/Services/DependencyCycleResolutionTests.cs index eeb4ce82c1..a82fbef389 100644 --- a/tests/Humans.Application.Tests/Services/DependencyCycleResolutionTests.cs +++ b/tests/Humans.Application.Tests/Services/DependencyCycleResolutionTests.cs @@ -176,7 +176,7 @@ public void NoCircularConstructorDependencies_AcrossApplicationServices() { var assemblies = new[] { - typeof(IApplicationService).Assembly, + typeof(UserService).Assembly, typeof(HumansDbContext).Assembly, typeof(Humans.Web.Controllers.HomeController).Assembly, };