Repository navigation
Description
Spec unit 1.25 (Hierarchy exclusion) · parent #513
Dataset setting excludes Accounts in the same parent/child hierarchy; on by default; sibling accounts sharing a parent still detected; Include Parent/Child toggle.
What exists
MatchConstraints::exclude_when_equal (er-config/src/lib.rs:433) — "columns whose EQUALITY excludes a pair", documented as the relationship exclusion, for records sharing a household or parent account id. It compiles to a conjunct on every blocking rule, so an excluded pair is never generated as a candidate.
That covers the one-level case: two records with the same parent_account_id are not duplicates of each other. Note it also, correctly, leaves siblings detectable only if you do not list the parent column — which is the opposite of the spec's default.
The gap
- Multi-level traversal.
exclude_when_equalcompares a column for equality. A Salesforce Account hierarchy is a tree: a grandparent and a grandchild share no single column value, and the spec excludes the whole ancestor chain. - On by default, with an explicit Include Parent/Child toggle. Here the behaviour is opt-in by declaring a column.
- Siblings must still group while parent↔child never does — one mechanism has to do both, which
exclude_when_equalon a parent column cannot.
Scope note — read before picking this up
This is the most Salesforce-shaped item in the epic: it presupposes an object with a self-referential parent lookup. Nothing in entities/ models that today. It may belong behind the AppExchange work (#602) rather than in the MVP matcher, which is why it is filed P2 rather than inheriting the epic's P0. Re-rank if the Salesforce surface lands sooner.
Done when
- a hierarchy exclusion that walks an ancestor chain, not a single column equality
- parent and child never grouped; siblings sharing a parent still grouped — both as tests, since they pull in opposite directions
- default-on with an explicit opt-out, and the default stated in config docs
Split out of the parent epic on 2026-11-07 by reading the spec's pillar table against this repo, file by file. Every "what exists" line below was grepped, not inferred — the parent epic's own history includes a coverage figure that was wrong because a stale design doc was trusted. Spec unit numbers refer to the DataGroomr Feature Parity Spec pillar tables. Estimates are mine and independent of the epic's total.
Activity
athvin commentedon Nov 8, 2026
Claimed — working in #883 (draft). Closing that PR releases the claim.
feat(match): multi-level hierarchy exclusion that still groups siblin…