[privacy-audit] Privacy-sensitive fields leak into main DB and PersonDetail metrics — link to Little Black Book #169
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
User directive: "tie any other private concerns back to it" (the Little Black Book vault). This is the audit. The LBB is the right architectural home for anything intimate or privacy-sensitive — it already exists (
src/vault/), is physically isolated (separate IndexedDB), is auto-lock gated, and architecturally separate from the main DB.What's NOT vault-bound but should be
Audited every privacy-sensitive field on
Person/Interaction/Gift/DateEvent. The following live in the main DB but are clearly intimate or private and should be vault-bound:pronounsPersonnicknamesPersonorientationrelationshipTagsintimacyLevel(1-5)Interactionmood("happy"/"excited"/"tired"/"neutral"/"loved"/"stressed")InteractionisConflictInteractionrepairAttempt(free text)InteractionconflictResolvedInteractionqualityRating(1-5)Interactionnotes(free text, person-level)Person,InteractionWhat's NOT vault-gated but should be
The vault lock (
vaultLockedfrom the store) is checked in only one place in PersonDetail (line 1912 — romantic partner sections like cadence/goals). The following surfaces on PersonDetail render regardless of vault state:moodAverage, 7-day mood trend (moodTrendInfo)intimacyLevelover timeThe vault UI itself (
src/pages/Vault.tsx) is gated, but the PersonDetail metrics panel reads from main DB and bypasses the lock. Privacy by design — broken in implementation.What's correctly vault-bound already
Personrecords (people markedinVault: true— stored only inkin_vault)Interaction,Gift,DateEventrecords (per-person vault storage)vaultNotestable — the explicit private-note surfaceArchitectural fix sketch
For each field above, the right move is:
src/vault/vault-db.tswithvaultSensitiveFields,vaultIntimacy,vaultMood,vaultConflictstablesvault-metrics-engine.tsthat reads only vault data and is gated byassertUnlocked()vaultLocked && person.relationshipType in [Romantic/Partner/Spouse](or any person with sensitive fields), show a "Unlock to see mood/intimacy/conflict patterns" placeholder instead of the dataintimacyLeveltruly opt-in per-person — currently it's a schema field with no toggle; should bevaultSettings.intimacyEnabled[personId]moodto a vault-only field — once user opts into mood tracking, it lives in vault; main DB strips it on importnotes— add anotesInVaulttoggle per person; vault notes live invaultNotes, main notes are summary onlySeverity
High — this is the kind of issue where a user thinks "I have the vault on, my partner's mood trend is hidden" and the actual code path renders it on the unlocked app home page regardless. The vault is currently a partial feature: it hides the things it owns, but not the things it should own.
Relationship to existing issues
Acceptance criteria
A future PR that closes this issue should:
pronouns,nicknames,orientation,intimacyLevel,mood,isConflict,repairAttempt,conflictResolved,qualityRating, person-levelnotesto vault tables (with backward-compat shim that migrates existing data)!vaultLockedvault-metrics-engine.tsfor vault-scoped analysisbehavior-pattern-engine.tswiring inPersonDetail.tsx:203to be vault-aware (only run when unlocked)