omnigraph/crates
devin-ai-integration[bot] b7f5276ab5
fix(loader): enforce composite @unique(a, b) as a true composite key (#133)
* fix(loader): enforce composite @unique(a, b) as a true composite key

Node/edge composite uniqueness constraints were flattened into a single
list of property names, so @unique(a, b) was enforced as independent
single-field checks @unique(a) AND @unique(b) at intake. Preserve the
constraint grouping and check each group as a composite key, mirroring
the merge-path enforcement. Error messages now name the full composite.

MR-983

* docs: clarify unit-separator comment in composite unique check

* docs: fix separator reference in composite unique comment (merge.rs also uses U+001F)

* fix(merge): align composite @unique key separator with intake (U+001F)

The branch-merge path (update_unique_constraints) joined composite key
columns with '|', while intake joins with U+001F. The same @unique(a, b)
was keyed two different ways, and '|'-join can raise phantom merge
conflicts for values containing '|' (e.g. ('x|y','z') vs ('x','y|z')).

Factor the tuple-join into one shared helper (loader::composite_unique_key)
so the intake and merge paths cannot drift again. Add branching regression
tests for edge @unique(src, dst) on the merge path.

Refs MR-983.

---------

Co-authored-by: Ragnor Comerford <ragnor.comerford@gmail.com>
Co-authored-by: Andrew Altshuler <andrew@collectivelab.io>
2026-06-09 17:17:31 +03:00
..
omnigraph fix(loader): enforce composite @unique(a, b) as a true composite key (#133) 2026-06-09 17:17:31 +03:00
omnigraph-cli release: v0.6.2 2026-06-09 15:59:59 +02:00
omnigraph-compiler release: v0.6.2 2026-06-09 15:59:59 +02:00
omnigraph-policy release: v0.6.2 2026-06-09 15:59:59 +02:00
omnigraph-server release: v0.6.2 2026-06-09 15:59:59 +02:00