scope uniqueness constraints to specific objects
combines two previous reviewed PRs
Only these commits (the final 3) are unreviewed
Each of these is self-contained and can be reviewed on its own:
-
671b39c— reject a non-positivechunked()size
chunked()letsize=0surfacerange()'s own opaqueValueErrorand silently yielded nothing for a negative size. Adds an explicit guard and replaces the single test with rejection cases for zero/negative plus round-trip cases (empty, exact multiple, trailing partial, oversized size, tuple-in/tuple-out). Defensive only — every current caller passes a positive size. -
dbbcad4— moveget_query_arrows()fromRelationshipSchematoQuery
Mapping a relationship direction to Cypher arrows is a database concern, not a schema one.QueryArrow/QueryArrowsand the mapping now live ininfrahub.core.queryasQuery.get_query_arrows(direction); all nine call sites were already insideQuerysubclasses, andQueryArrow*had no consumers outsiderelationship_schema.py. Pure refactor — the arrows rendered per direction are unchanged. -
abcd7e7— traverse the relationship in its own direction when resolving dependents
AffectedUniquenessDependentsQuerymatchedIS_RELATEDundirected, so for a kind whose relationship peer is its own kind (parent/childrensharing one identifier) resolving the dependents of a changed peer returned nodes on both sides, over-scoping validation. ThreadsRelationshipDirectionthrough the scoper and resolver so the path is traversed node→Relationship→peer, matching how the edges are created and how the sibling uniqueness queries already read them. Currently latent — a peer-attribute constraint element still falls back to full-population validation — but it matters as soon as targeted validation covers those paths. Adds self-referential coverage that fails against the undirected query.