[Review] detectConflictPrecursors / detectExcitementCycles length filters (3/4) interact badly with vault-locked scrubbed interactions #180
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#180
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?
Finding
src/lib/intimate-state-engine.ts:308(detectExcitementCycles) returns[]for fewer than 3 interactions.:394(detectConflictPrecursors) returnsnullfor fewer than 4. These filters exist for noise reduction.When the vault is locked, the store scrubs
safeInteractions(removesmood,intimacyLevel,isConflict,repairAttempt,conflictResolved,qualityRating) before passing them to the engines. The engines then run against scrubbed interactions and may return fewer insights not because they respect the privacy boundary, but because most real users have 0-2 interactions with any given person, so the length filter naturally drops them when the vault is locked.This produces a UX surprise: users see fewer pattern insights overall when the vault is locked. Not a leak (the gate is correct on the data side), but the engines do too much filtering at the wrong layer.
Suggested fix
Two options:
A. Lower the length thresholds inside the engines when sensitive fields are unavailable — but that complicates the pure-function contract.
B. Document the behavior with a comment in
intimate-state-engine.ts:308and:394noting that the length filters bias against small histories, and that the vault gate exacerbates this. Then accept it as the design tradeoff (privacy > insights for small histories).Severity
Low. Documentation / commentary. Pick option B unless a future user reports the surprise.
Discovered by
Manual code review pass over #168/#169, 2026-09-14.
Closed by watcher recovery: option-B doc comments landed on origin/main in commit
ccc9ce4(Apply changes from kilo-gsd.py run — note: commit message references #188 but the diff is the #180 patch). The local kilo-gsd runner commit01d7aae(docs(#180): document vault-locked + small-history interaction at length filters) carries the same tree changes, so rebase detected it as already-applied and skipped; local and origin/main are now in sync at4d07260.