You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDocumentInferrerService (2 impls), navigation tree interfaces (INavigationItem, ITableOfContentsItem, etc. — multiple impls)
How
For each interface: delete the interface declaration, update all constructor parameters and DI registrations to reference the concrete type directly. Update any services.AddScoped<IFoo, FooImpl>() to services.AddScoped<FooImpl>().
~180 lines removed across the batch.
Note
Re-audited 2026-07-07: six interfaces originally listed here (IGitHubReleaseService, IGitHubPrService, IGcpIdTokenProvider, IS3EtagCalculator, IRepositoryTracker, IParserResolvers) were false positives — mocked in tests or with a second implementation — and moved to the excluded list. Thirteen newly verified single-impl interfaces were added.
Part of the broader ponytail over-engineering audit tracked in #3574.
What
Remove interfaces that have exactly one implementation and no test mocks — they add indirection with no polymorphism benefit.
Interfaces to remove
IFormatterIrregularSpaceFormattersrc/authoring/Elastic.Documentation.Refactor/Formatters/IFormatter.csIPagesProviderLocalPagesProvidersrc/Elastic.Documentation.LegacyDocs/PagesProvider.csIHtmxAttributeProviderDefaultHtmxAttributeProvidersrc/Elastic.Documentation.Site/Htmx.csIDescriptionGeneratorDescriptionGenerator— every caller already passesnew DescriptionGenerator()src/Elastic.Markdown/DescriptionGenerator.csIDocumentationFileOutputProviderGlobalNavigationPathProvider— one optional ctor param consumersrc/Elastic.Markdown/DocumentationGenerator.csILinkIndexWriter+ILinkIndexReaderWriterAwsS3LinkIndexReaderWriter— keepILinkIndexReader(2 impls), foldSaveRegistryonto the concrete writersrc/Elastic.Documentation.LinkIndex/ILinkIndexWriter.csIChangesServiceChangesServicesrc/services/search/Elastic.Documentation.Search/IChangesService.csIDocumentGatewaysrc/api/Elastic.Documentation.Mcp.Remote/Gateways/IDocumentGateway.csIAskAiMessageFeedbackServicesrc/api/Elastic.Documentation.Api/AskAi/IAskAiMessageFeedbackGateway.csIGitRepositorySingleCommitOptimizedGitRepository— 9-method interface consumed only by same-file helpers that alreadynewthe concrete typesrc/services/Elastic.Documentation.Assembler/Sourcing/GitFacade.csIProductNameLookupProductsConfiguration— depend on the config record directlysrc/services/search/Elastic.Documentation.Search.Contract/Common/IProductNameLookup.csISitemapParser,IAdaptiveCrawler,IDocumentExporter<T>AddHttpClient<TConcrete>needs no interfacesrc/tooling/essc/LabsCrawl/IChangelogMarkdownRendererMarkdownRendererBase, which all 6 renderers derive from; type the list asList<MarkdownRendererBase>src/services/Elastic.Changelog/Rendering/Markdown/IChangelogMarkdownRenderer.csExcluded (correctly polymorphic or test-mocked — do NOT remove):
IDocsSyncPlanStrategy/IDocsSyncApplyStrategy— deliberate named strategy patternIGitHubReleaseService,IGitHubPrService,IGcpIdTokenProvider,IS3EtagCalculator— mocked viaA.Fake<>intests//tests-integration/IRepositoryTracker— 2 impls (IntegrationGitRepositoryTracker,LocalGitRepositoryTracker)IParserResolvers— 2 impls (ParserResolversrecord,ParserContext)IDocumentInferrerService(2 impls), navigation tree interfaces (INavigationItem,ITableOfContentsItem, etc. — multiple impls)How
For each interface: delete the interface declaration, update all constructor parameters and DI registrations to reference the concrete type directly. Update any
services.AddScoped<IFoo, FooImpl>()toservices.AddScoped<FooImpl>().~180 lines removed across the batch.
Note
Re-audited 2026-07-07: six interfaces originally listed here (
IGitHubReleaseService,IGitHubPrService,IGcpIdTokenProvider,IS3EtagCalculator,IRepositoryTracker,IParserResolvers) were false positives — mocked in tests or with a second implementation — and moved to the excluded list. Thirteen newly verified single-impl interfaces were added.Part of the broader ponytail over-engineering audit tracked in #3574.