From 4b15168179d6c8ea70c3f8b31c48b988aeb1444c Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 28 Apr 2026 12:59:19 +0200 Subject: [PATCH] docs(stammbaum): explain MAX_DEPTH=8 rationale on RelationshipInferenceService MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8 hops covers great-grandparents ↔ great-great-grandchildren and second cousins — the practical horizon for a 1899–1950 archive. Prevents future blind tuning of the constant. Co-Authored-By: Claude Sonnet 4.6 --- .../relationship/RelationshipInferenceService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/java/org/raddatz/familienarchiv/relationship/RelationshipInferenceService.java b/backend/src/main/java/org/raddatz/familienarchiv/relationship/RelationshipInferenceService.java index bc820e6f..7191c222 100644 --- a/backend/src/main/java/org/raddatz/familienarchiv/relationship/RelationshipInferenceService.java +++ b/backend/src/main/java/org/raddatz/familienarchiv/relationship/RelationshipInferenceService.java @@ -20,6 +20,9 @@ import java.util.*; @RequiredArgsConstructor public class RelationshipInferenceService { + // 8 hops covers great-grandparents ↔ great-great-grandchildren and second cousins — + // the practical horizon for a 1899–1950 family archive. Paths longer than this are + // classified as LABEL_DISTANT and rarely carry meaningful relationship labels. static final int MAX_DEPTH = 8; /** "distant" is the catch-all label for paths that do not match the LABEL_MAP. */