Port vector property dimension validator from UPX (IMP-1270) - #83
Open
paven wants to merge 5 commits into
Open
Conversation
paven
added a commit
that referenced
this pull request
Sep 2, 2026
Exercises the nodes/relationships threading through the path field, not just the issue code. Addresses review finding on PR #83.
paven
force-pushed
the
imp-1270-vector-property-dimension
branch
6 times, most recently
from
September 4, 2026 14:41
22f9edc to
28cf0bf
Compare
paven
marked this pull request as ready for review
September 4, 2026 16:46
Port UPX rule 8 (getVectorDimensionPropertyErrors, errors.ts lines 124-130) to graph-spec. Flags a property when its type is a VECTOR variant and dimension is null. - PropertyVectorDimension.kt: shared helper (vectorDimensionIssue) - NodePropertyVectorDimension: NodeValidation, overrides validateProperty - RelationshipPropertyVectorDimension: RelationshipValidation, overrides validateProperty - Issue code: missing_vector_dimension - Registered both in importReady group in Validations.kt
Exercises the nodes/relationships threading through the path field, not just the issue code. Addresses review finding on PR #83.
isVectorType is now a predicate in validate/property/PropertyVector.kt, matching the Compositeness.kt precedent. Each validator builds its own Issue and owns its path - no ownerKind string parameter threading nodes./relationships. prefixes through the helper.
- isVectorType: drop else->false, list all non-vector variants so the when is exhaustive (matches Neo4jType.toString precedent) - the compiler now forces an explicit decision for future variants - Message: 'Missing dimension for vector property X on node Y' to match the repo's greppable Missing-prefix message family - Tests: assert issue.message, add dimension=0 boundary pass-case (0 counts as set, matching UPX isNullish)
UPX enforced MIN_DIMENSION=1/MAX_DIMENSION=4096 only in the UI input cell (commons/ui details-panel constants); graph-spec now makes it a data invariant. Split into independent validators per the series convention (one validator per error): - NodePropertyVectorDimensionBounds / RelationshipPropertyVectorDimension Bounds: flags dimension outside 1-4096 as invalid_vector_dimension - NodePropertyVectorDimension / RelationshipPropertyVectorDimension: unchanged, presence-only missing_vector_dimension (UPX rule 8)
paven
force-pushed
the
imp-1270-vector-property-dimension
branch
from
September 7, 2026 07:37
28cf0bf to
db7ac0a
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.
Ports rule 8 from UPX
getVectorDimensionPropertyErrors(errors.ts#L124-L130, called for nodes at L522 and relationships at L708) asNodePropertyVectorDimensionandRelationshipPropertyVectorDimensionvalidators in theimportReadygroup.Call site
Single shared call site:
getDataModelErrors(errors.ts#L781), consumed from 3 places - gates Run Import in both import and kg-builder.Code remap
The issue code is
missing_vector_dimension(snake_case, per the graph-spec port convention set in #75), while UPX keys onMISSING_VECTOR_DIMENSION. JS consumers matching on the uppercase string need remapping when they adopt graph-spec validations.Refs: IMP-1270