refactor(core): generalize the dependent-node resolver out of uniqueness - #10246
Draft
polmichel wants to merge 1 commit into
Draft
Conversation
The reverse "which nodes reference these changed peers through a relationship" traversal is generic and lived in validators/uniqueness only because that was its first caller. Move it to its domain so post-merge selective regeneration depends on a neutral component instead of the uniqueness validators: - DependentNodeResolver (+ interface) -> core/relationship - DependentNodesQuery -> core/query - uniqueness callers repointed; behavior unchanged. Moving the resolver into core/relationship exposed a latent import cycle in that package. Its root: relationship_schema imported the Relationship class only to read Relationship.rel_type via a get_class() that nothing else calls. Drop the dead get_class() and read the edge type from DatabaseEdgeType.IS_RELATED, which removes relationship_schema's dependency on the relationship package. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
No issues found across 9 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. Pure refactor: renames and relocates a resolver/query, removes dead get_class(), and breaks an import cycle; behavior is unchanged and existing tests cover the moved component.
Re-trigger cubic
polmichel
marked this pull request as draft
August 13, 2026 13:42
polmichel
force-pushed
the
pmi-ifc-2946-generalize-dependent-resolver
branch
from
August 13, 2026 15:28
d6ce2cc to
e5a2eed
Compare
polmichel
force-pushed
the
pmi-ifc-2946-generalize-dependent-resolver
branch
from
August 14, 2026 10:12
e5a2eed to
3b2ee04
Compare
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.
Stacked on #10262.
What
The reverse "which nodes reference these changed peers through a relationship" traversal is generic; it lived in
validators/uniqueness/only because that was its first caller. This moves it to a neutral home so the selective-regeneration narrowing depends on a general component rather than the uniqueness validators.DependentNodeResolver(+ interface) →core/relationship/(its domain).DependentNodesQuery→core/query/(it is a query, alongside the existing relationship queries).The import cycle
Moving the resolver into
core/relationship/surfaced a latent import cycle in that package. Its root:relationship_schemaimported theRelationshipclass only to readRelationship.rel_typethrough aget_class()that nothing else calls. Dropping the deadget_class()and reading the edge type fromDatabaseEdgeType.IS_RELATEDremovesrelationship_schema's dependency on therelationshippackage and breaks the cycle at its root.Tests
Uniqueness scope/determiner and the relocated resolver component tests stay green; the resolver imports in isolation without triggering the cycle.
🤖 Generated with Claude Code