refactor: graph pkg - Service reshape + ListNodes#491
Merged
mfiedorowicz merged 5 commits intodevelopfrom Feb 13, 2026
Merged
Conversation
…hema versioning Remove dead schema versioning code (matching_schema_version column, CurrentSchemaVersion constant, MigrateNodesToCurrentSchema, FindNodesNeedingSchemaUpdate) and merge Builder+Reader into a single Service type with clean public API (UpsertEntity, ListEntities, GetCompleteNodeData, GetSnapshots). Rename files (builder.go → service.go, builder_*.go → topic-based names), update receiver from gb to s, rename BuilderOption → Option and NewBuilder → NewService, and update all callers in reconciler and cmd packages.
Add full stack for listing graph nodes with optional filtering by node type and metadata: SQL query with JSONB containment and array filters, SQLC codegen, adapter with DRY toNodeWithLatestSnapshot helper, domain interface, and Service.ListEntities wiring.
|
Go test coverage
Total coverage: 57.0% |
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
Builder+Reader→Servicewith split files (edge.go, lookup.go, matching.go, metadata.go, propagate.go), removes schema versioningListNodesstack: SQL query with optional node type array and JSONB metadata filters, SQLC codegen, postgres adapter with DRYtoNodeWithLatestSnapshothelper, domain interface, andService.ListEntitieswiringEntityStoreinterface for consumers to mock the service in testsListEntitiesTest plan
go build ./...passesgo test ./graph/... ./reconciler/... ./entitymatcher/...passesgo vet ./...passes