ADR 0120: Person attributes: manual birth-year & gender overrides, inferred gender consensus, gendered relation labels
Status: accepted Date: 2026-10-31
Context
CONTEXT: Spec 068 / ADR 0118 persist per-FACE age & gender estimates (male|female, model-inferred) inside discovery_results payloads, and PersonBirthYearProfileService derives per-person birth-year profiles on demand (median over accepted+tentative faces, MIN_PROFILE_FACES=3). None of this is exposed on the person level, users cannot correct the model, and relation labels are gender-neutral tokens (GRANDPARENT renders as neutral wording although German/Danish distinguish Groszvater/Groszmutter, Onkel/Tante, ...). Users must be able to set birth year and gender manually; manual values must win over inference; relation labels should adapt to the opposite person's gender.
DECISION:
- Storage — new table person_attributes, one optional row per people-domain person instance (class_instances id, FK ON DELETE CASCADE, owner_id for tenant scoping): gender VARCHAR NULLABLE CHECK (gender IN ('male','female','divers')), birth_year INT NULLABLE CHECK (birth_year BETWEEN 1850 AND 2100), updated_at. Absence of row or NULL column = not manually set. PUT is idempotent (upsert); clearing a value sets the column NULL / deletes the row. 'divers' is manual-only: the ML model never infers it.
- Effective value resolution (read-side, no caching): manual attribute wins. Otherwise inferred: birth year from PersonBirthYearProfileService (existing median + quorum rules, source 'inferred' only when profile status is OK); gender = majority vote over the person's accepted+tentative face annotations' spec-068 gender fields — quorum 3 gendered faces, top share >= 60%, otherwise null (unknown). No materialized consensus: faces change through backfills/merges constantly, on-demand keeps one write path (the worker's) and can never go stale.
- API — GET /api/persons/{instanceId}/attributes returns { gender: {value, source: 'manual'|'inferred'|null}, birthYear: {value, source} } (null value = unknown); PUT accepts partial {gender?, birthYear?} with explicit null to clear. Session-authenticated + tenant-scoped like PersonRelationController. GET /api/persons/{instanceId}/relations rows gain oppositePerson.oppositeGender (effective gender male|female|divers|null of the opposite person) so the web can gender labels without N extra requests.
- Relation label rendering (web): where the locale distinguishes, pick the variant by the OPPOSITE person's effective gender: PARENT (Vater/Mutter), CHILD (Sohn/Tochter), SIBLING (Bruder/Schwester), GRANDPARENT (Groszvater/Groszmutter, bedstefar/bedstemor), GRANDCHILD (Enkel/Enkelin), GREAT_* and GREAT_GREAT_* grandparents/grandchildren (Ur- prefixes / olde- forms), PARENT_IN_LAW (Schwieger(vater|mutter), sviger(far|mor)), CHILD_IN_LAW (Schwieger(sohn|tochter), svigersoen/svigerdatter), SIBLING_IN_LAW (Schwager/Schwaegerin, svoger/svigerinde), UNCLE_OR_AUNT (Onkel/Tante), NEPHEW_OR_NIECE (Neffe/Nichte, nevoe/niece), GRAND_UNCLE_OR_AUNT (Groszonkel/Grosztante), GRAND_NEPHEW_OR_NIECE (Groszneffe/Grosznichte), COUSIN (Cousin/Cousine, faetter/kusine). Danish keeps GENERIC gendered forms (bedstefar/bedstemor) — the paternal/maternal variants (farmor/mormor/...) encode lineage side we do not model. male/female resolve the binary pair; divers or null fall back to the existing neutral label (no invented forms). PARTNER and SPOUSE stay neutral in all locales.
- Person metadata panel (web): compact metadata table at the top of the person detail view showing effective birth year (rendered as birth year, with current-age figure), effective gender, each with a provenance marker when the value is inferred (model-estimated, not user-set) and an edit affordance that writes manual values (gender: male/female/divers; birth year: 4-digit). No value shown when neither manual nor inference exists.
HONEST LIMITS: gender consensus inherits the model's binary world and its bias; manual override is the correction path, not re-training. The 60%/3-face quorum is a starting point, deliberately conservative; recalibration follows the same CV discipline as the spec-068 gate. Relation labels only gender what the locale actually distinguishes — no synthetic forms for COUSIN etc.
Memories Wiki
Using Memories
- Accounts, the Library Hub, and Data Export
- Albums and Automatic Suggestions
- Explore and Discovery Domains
- The Media Viewer
- People and Faces
- Places and Map
- Plants (In Development)
- Datenschutzerklärung (Privacy Policy)
- Fast, Progressive Image Loading
- Search
- Sharing and Households
- Timeline and Photos
- Uploading and Import
Self-Hosting
- Backup and Restore
- CLI Password Reset
- Deployment Architecture
- Known Issues and Operator Diagnostics
- Map Tiles and Place Data Privacy
- Storage Layout
- Upgrades and Versioning
- Workers
Reference