[Review] BehaviorPatternInsight.category union and PersonDetail SENSITIVE_CATEGORIES set can drift — no shared constant #183
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#183
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
Two parallel lists must stay in sync:
InsightCategoryunion insrc/lib/types.ts:902-912:PersonDetail.tsx SENSITIVE_CATEGORIES set (around line 3042):
The vault-gate filter at PersonDetail.tsx removes insights whose
categoryis in this set whenvaultLocked === true. If a future contributor adds"intimacy"to the union, they must remember to also add it to PersonDetail's set — and there's nothing in the type system or build that enforces this.intimate-state-engine.tsis@ts-nocheck'd, so the producers (lines 265, 277, 287, 367, 463, 491, etc.) silently accept any category string. Once #176 removes the pragma, the producer-side typing should help, but the consumer side (PersonDetail) is still free to drift.Suggested fix
Export a single
SENSITIVE_CATEGORIES: readonly InsightCategory[]fromsrc/lib/types.tsand import it in PersonDetail.tsx. Then add a comment onInsightCategoryinstructing future contributors to update the constant when adding a new sensitive category.Severity
Medium. Drift hazard, not a current bug. Becomes a bug the moment someone adds a new category.
Discovered by
Manual code review pass over #168/#169, 2026-09-14.
Closing as already-fixed.
Commit
4d07260(fix(#183): share SENSITIVE_CATEGORIES constant between types and PersonDetail) landed onmainat 2026-09-14 (today, before this triage session reviewed the file).The chat-agent code review read against a stale HEAD and reported this issue as open. The fix was already in place when the review started — the agent failed to re-check HEAD between reads.
No work to do.