[2/5] VSA: Collapse Gateway+Usecase into *Service per feature#3335
Merged
Mpdreamz merged 2 commits intoMay 19, 2026
Merged
Conversation
Removes the ports-and-adapters boilerplate that required three types (interface + gateway impl + usecase orchestrator) for each feature. Each feature now has a single interface and implementation: - IFullSearchService / FullSearchService (was IGateway + Gateway + Usecase) - INavigationSearchService / NavigationSearchService - IChangesService / ChangesService - IOtlpService / AdotOtlpService IAskAiService/IAskAiMessageFeedbackService renamed from Gateway variants; AddElasticDocsApiUsecases → AddElasticDocsApiServices throughout. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
d0b8b56 to
709b247
Compare
This was referenced May 19, 2026
…3345) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Mpdreamz
added a commit
that referenced
this pull request
May 19, 2026
* Merge Elastic.Documentation.Api.* into single project Three projects (Api.Core, Api.Infrastructure, Api.App) collapsed into Elastic.Documentation.Api. Mcp.Remote no longer references any Api.* project — its only deps are ServiceDefaults, services/Search, and services/Assembler. Key moves: - EuidSpanProcessor + EuidLogProcessor → ServiceDefaults (shared) - AddEuidEnrichment helper added to ServiceDefaults - Search gateway interfaces (IFullSearchGateway, INavigationSearchGateway, IChangesGateway) → services/Elastic.Documentation.Search - McpToolSourceName constant inlined into Mcp.Remote Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix C# import ordering and name simplification after Api merge Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix Dockerfile publish RID to use TARGETARCH/TARGETOS instead of linux-x64 Enables arm64 image builds to publish and copy the correct architecture artifact rather than always using the amd64 binary. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Address PR review: OTel source registration, assembly version, env var key - Register McpTools ActivitySource in Mcp.Remote TracerProvider so MCP spans are captured - Use GetEntryAssembly() over GetCallingAssembly() for service.version so the host service's version is reported rather than ServiceDefaults - OtlpProxyOptions now checks OTEL_EXPORTER_OTLP_ENDPOINT first then OTLP_PROXY_ENDPOINT as backward-compatible fallback, matching the documented priority order Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix import ordering in Mcp.Remote Program.cs Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * [2/5] VSA: Collapse Gateway+Usecase into *Service per feature (#3335) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
groman92
pushed a commit
that referenced
this pull request
May 20, 2026
* Merge Elastic.Documentation.Api.* into single project Three projects (Api.Core, Api.Infrastructure, Api.App) collapsed into Elastic.Documentation.Api. Mcp.Remote no longer references any Api.* project — its only deps are ServiceDefaults, services/Search, and services/Assembler. Key moves: - EuidSpanProcessor + EuidLogProcessor → ServiceDefaults (shared) - AddEuidEnrichment helper added to ServiceDefaults - Search gateway interfaces (IFullSearchGateway, INavigationSearchGateway, IChangesGateway) → services/Elastic.Documentation.Search - McpToolSourceName constant inlined into Mcp.Remote Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix C# import ordering and name simplification after Api merge Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix Dockerfile publish RID to use TARGETARCH/TARGETOS instead of linux-x64 Enables arm64 image builds to publish and copy the correct architecture artifact rather than always using the amd64 binary. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Address PR review: OTel source registration, assembly version, env var key - Register McpTools ActivitySource in Mcp.Remote TracerProvider so MCP spans are captured - Use GetEntryAssembly() over GetCallingAssembly() for service.version so the host service's version is reported rather than ServiceDefaults - OtlpProxyOptions now checks OTEL_EXPORTER_OTLP_ENDPOINT first then OTLP_PROXY_ENDPOINT as backward-compatible fallback, matching the documented priority order Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix import ordering in Mcp.Remote Program.cs Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * [2/5] VSA: Collapse Gateway+Usecase into *Service per feature (#3335) Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 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.
Why
The ports-and-adapters split required three types per feature (interface, gateway impl, usecase orchestrator) where the usecase added only ~5 lines of logging and DTO mapping over a single implementation. This made every feature harder to navigate and contributed no reuse benefit since all three layers lived in the same project.
What
Each feature now has a single interface and implementation that owns the full request/response flow — logging, Elasticsearch calls, response mapping, and cursor encode/decode where applicable:
IFullSearchService/FullSearchService(wasIFullSearchGateway+FullSearchGateway+FullSearchUsecase)INavigationSearchService/NavigationSearchServiceIChangesService/ChangesServiceIOtlpService/AdotOtlpServiceIAskAiService/IAskAiMessageFeedbackService(renamed from Gateway variants)AddElasticDocsApiUsecasesis renamed toAddElasticDocsApiServicesthroughout. Interfaces are kept for test seams (mocks updated toMockSearchService).Part of a move to vertical slice architecture to be able to cleanly lift search contract: