Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Edges/deduplicate_edges

deduplicate_edges

Remove edge rows that record a relationship the graph already has. The repair half of `validate_graph`'s `duplicate_relationship_drift`. `kind: "exact"` (default) drops rows with an identical source, target and type, keeping the first; the rows are indistinguishable, so nothing is lost. `kind: "shadow"` drops the polymorphic `project_delivers_work_item` row where a pair also carries a `project_contains_*` edge, because the 0.41.0 ruling that created that shadow pair made containment the parent axis and the winner. `kind: "all"` does both. `dry_run` defaults to TRUE: preview, then pass false to commit. Deletes edges only; never touches a node.

Edgesatomic (all removals applied in one pass, or none when dry_run)

Arguments

kindstringoptional

Which duplicates to remove (default "exact").

exactshadowall
dry_runbooleanoptional

Preview without writing (default true). Pass false to commit.

Returns

Shape
{ removed_edges, exact, shadow, dry_run, removals[] }

, where each removal names the row dropped, the row kept, and why.

See Also