Skip to content

Hierarchical ancestry changes in one branch affecting other branches and causing duplicate parents #8395

@minitriga

Description

@minitriga

Description

A bug has been reported where changing hierarchical ancestry in one branch appears to affect other branches, and in some cases results in nodes showing multiple parents simultaneously.

Environment

  • Version: v1.7.4
  • Affected Feature: Hierarchical nodes with parent/child relationships

Symptoms

  1. Cross-branch ancestry contamination: When changing the parent of a hierarchical node in one branch, the change may leak into other branches
  2. Duplicate parents: After changing ancestry and reverting it back, nodes can end up with two parents at the same time
  3. UI vs Data discrepancy: The UI may show the correct single parent, but querying the data returns multiple parents
  4. Persistent corruption: The only known workaround is to delete the affected node and recreate it

Reproduction Attempt

Wim tested with a simplified schema on v1.7.4 and could not reproduce the issue:

---
version: "1.0"
generics:
  - name: Generic
    namespace: Location
    hierarchical: true
    attributes:
      - name: name
        kind: Text
        optional: false
nodes:
  - name: Region
    namespace: Location
    inherit_from:
      - LocationGeneric
    display_label: "{{ name__value }}"
    parent: ""
    children: LocationCountry
  - name: Country
    namespace: Location
    inherit_from:
      - LocationGeneric
    display_label: "{{ name__value }}"
    parent: LocationRegion 
    children: ""

Test steps that worked correctly:

  1. In main branch: Created regions "Europe" and "Americas"
  2. In main branch: Created country "Belgium" with parent set to "Europe"
  3. Created a new branch
  4. In new branch: Changed parent of "Belgium" to "Americas"
  5. Switched back to main branch
  6. Expected: Belgium's parent should still be "Europe" in main
  7. Actual: Belgium's parent was correctly still "Europe" in main ✓

However, the original reporter is experiencing issues with a more complex hierarchy:
rack -> room -> site -> metro -> country -> region -> global

Additional Context

  • No branch-agnostic nodes are used in the affected setup
  • Hierarchical tree UI issue: Wim noted that the hierarchical tree does not properly update when changing hierarchy, which may be a separate but related issue
  • Possible relation to old bug: Reporter suspects this might be a remnant of an old ancestry issue that was fixed in earlier releases
  • Data level issue confirmed: This is not just a UI bug - querying the data shows multiple parents

Workaround

Delete the affected node and recreate it with the correct parent relationship.

Next Steps

  • Obtain a backup from the affected environment for investigation
  • Test with the complex hierarchy schema (7 levels: rack -> room -> site -> metro -> country -> region -> global)
  • Test the specific sequence: change ancestry -> revert ancestry -> observe duplicate parents
  • Investigate Neo4j relationships for affected nodes
  • Check if this is related to previous ancestry bugs that were fixed

Reporter

Discord user: overloadbit
Thread date: 2026-02-07

Metadata

Metadata

Assignees

Labels

group/backendIssue related to the backend (API Server, Git Agent)group/schemaIssue related to some schemasstate/need-more-infoThis issue needs more informationtype/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions