refactor: split AbstractGraphBuilder into clean class hierarchy#38
Merged
refactor: split AbstractGraphBuilder into clean class hierarchy#38
Conversation
a868531 to
bebb435
Compare
7518ed6 to
450216b
Compare
📊 Test Coverage
|
d05bbad to
13848e2
Compare
Extract registry logic (CallbackRegistry, EndpointRegistry) into new ExternalGraphBuilder subclass, keeping AbstractGraphBuilder as a pure base class without registry dependencies. - AbstractGraphBuilder: manifest, config, version validation only - ExternalGraphBuilder: adds required registries + auto-registration - VersionRouter: stays on plain AbstractGraphBuilder (pure router) - All example builders updated to extend ExternalGraphBuilder Closes flutchai/flutch#566 (SDK part) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13848e2 to
0f6f3b3
Compare
Co-Authored-By: Claude Opus 4.5 <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.
Summary
ExternalGraphBuildersubclass, keepingAbstractGraphBuilderas a pure base classAbstractGraphBuilder— no registries, no registration logic (manifest, config, version validation only)ExternalGraphBuilder extends AbstractGraphBuilder— adds requiredCallbackRegistry+EndpointRegistrywith auto-registrationAbstractGraphBuilder(pure router, no registries needed)extends ExternalGraphBuilderContext
Part of flutchai/flutch#566 — migrating backend graph builders from
implements IGraphBuilder<T>toextends AbstractGraphBuilder.Replaces the initial
@Optional()approach with proper class hierarchy for clean separation of concerns.Changes
src/graph/external-graph.builder.tsExternalGraphBuilderwith required registries and registration logicsrc/graph/abstract-graph.builder.ts@Optional(),setImmediateblock, and 3 registration methodssrc/graph/index.tsExternalGraphBuilderexportsrc/core/universal-graph.module.tscreateMetaBuilder()and VersionRouterexamples/*/src/graph.builder.tsextends ExternalGraphBuilder(8 files)Test plan
npm run build)npm test)ExternalGraphBuilder)AbstractGraphBuilderwithout registries🤖 Generated with Claude Code