Skip to content

feat(memories): Tier 2 — people_together memory type (pair co-occurrence)#792

Open
Deeds67 wants to merge 7 commits into
feat/memory-types-tier1from
feat/memory-types-tier2
Open

feat(memories): Tier 2 — people_together memory type (pair co-occurrence)#792
Deeds67 wants to merge 7 commits into
feat/memory-types-tier1from
feat/memory-types-tier2

Conversation

@Deeds67

@Deeds67 Deeds67 commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the first Tier 2 memory type — people_together: a pair of people (or pets) who were photographed together a lot in the current calendar month of a past year. Titled "Anna & Ben", subtitled "18 photos together · June 2023".

Reframed from the roadmap's "You & [person]" (#5) to a pair memory — the schema has no reliable account-owner→person mapping, so "You & X" would need a fragile heuristic. Date-anchored like month_recap: fires on day 20 with a 7-day visibility window.

Spec: docs/plans/2026-07-16-memory-types-tier2-people-together-spec.md

How — 4 TDD slices

  1. pairCounts curation helper — pure pair co-occurrence (dedupes a person's multiple faces per asset, no self-pairs), distinct-day counting, deterministic ordering.
  2. getMemoryFacesForPeriod repository query — flat face rows for named, non-hidden people and pets; @GenerateSql snapshot regenerated.
  3. people_together rule (end-to-end) — rule + registry + metadata + admin toggle + 4 en.json keys.
  4. End-to-end generation medium test (positive + negative) + roadmap status.

Key decisions

  • Pair, not "You & X" — no owner→person heuristic needed.
  • Fires day 20 / 7-day window — staggered after month_recap (day 1) and favorites_throwback (day 15) so it never starves month_recap's single day-1 slot. Zero engine change — reuses the visibleForDays machinery shipped in Tier 1.
  • Thresholds: ≥ 6 co-occurring photos across ≥ 2 distinct days (a single event doesn't qualify a "relationship").
  • Pets includedAnna & Rex and Rex & Whiskers both possible.
  • Title ordered by person id — deterministic; two people can share a name.

Tests

  • Unit: pairCounts (9 cases), rule spec (13 cases, exact score pinned), metadata/registry — all green.
  • Medium (real DB): 5 getMemoryFacesForPeriod filter tests + 2 end-to-end generation tests (positive/negative, non-tautology verified).
  • tsc / eslint --max-warnings 0 / prettier clean; SQL snapshot regenerated (clean diff); mobile parity N/A (renders rule memories generically — verified).

Stacked on #789

Based on feat/memory-types-tier1 (Tier 1, PR #789). GitHub will auto-retarget this to main once #789 merges.

@Deeds67 Deeds67 added the changelog:feat Feature change for changelog label Jul 17, 2026
@github-actions github-actions Bot added 🗄️server 🖥️web and removed changelog:feat Feature change for changelog labels Jul 17, 2026
@Deeds67 Deeds67 added the changelog:feat Feature change for changelog label Jul 17, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 17, 2026
@Deeds67
Deeds67 force-pushed the feat/memory-types-tier1 branch from 28f317c to 5dfcbb9 Compare July 21, 2026 20:27
@Deeds67
Deeds67 force-pushed the feat/memory-types-tier2 branch from 06f2cf0 to e05a6f9 Compare July 21, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:feat Feature change for changelog documentation Improvements or additions to documentation 🗄️server 🖥️web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant