You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add opt-in shared / deduplicated identity for value nodes created by option D (ADR-0002). This is deliberately deferred — #6 ships with per-instance identity (each in-memory instance ⇒ its own node). This issue exists to track the follow-up so it is not lost.
Background
Under ADR-0002 option D, complex-object properties become first-class nodes ((:Person)-[:Home]->(:Address)). #6's default is per-instance value nodes: two owners referencing the same in-memory Address instance produce two distinct :Address nodes (preserves value-object semantics, matches prior behavior). Some domains instead want shared identity — one :Address node referenced by many owners (e.g. "everyone at this address"), with well-defined update/aliasing semantics.
Scope (to be designed when scheduled)
An opt-in mechanism to mark a value type (or property) as identity-bearing/shared — e.g. an attribute or a NodeWithIdentity-style base/marker. Decide the identity key (by value equality? explicit key members?).
Define write semantics: dedupe on write (MERGE by key) vs. explicit identity; and the update/aliasing contract (editing a shared node affects all referrers — must be intentional and documented).
Do not implement until scheduled. Keep #6 strictly per-instance. When scheduled, this becomes its own ADR addendum or a short design note before implementation.
Process
When picked up: fresh worktree off origin/main; codegraph init -i; writes via gh-app.
Parent: #84 · Depends on: #6 · Type: Task · Status: deferred (tracked, not scheduled)
Goal
Add opt-in shared / deduplicated identity for value nodes created by option D (ADR-0002). This is deliberately deferred — #6 ships with per-instance identity (each in-memory instance ⇒ its own node). This issue exists to track the follow-up so it is not lost.
Background
Under ADR-0002 option D, complex-object properties become first-class nodes (
(:Person)-[:Home]->(:Address)). #6's default is per-instance value nodes: two owners referencing the same in-memoryAddressinstance produce two distinct:Addressnodes (preserves value-object semantics, matches prior behavior). Some domains instead want shared identity — one:Addressnode referenced by many owners (e.g. "everyone at this address"), with well-defined update/aliasing semantics.Scope (to be designed when scheduled)
NodeWithIdentity-style base/marker. Decide the identity key (by value equality? explicit key members?).Not now
Do not implement until scheduled. Keep #6 strictly per-instance. When scheduled, this becomes its own ADR addendum or a short design note before implementation.
Process
When picked up: fresh worktree off
origin/main;codegraph init -i; writes viagh-app.