[Review] computeVaultConflictSummary always returns avgRepairDays = 0 — silent lie when no schema support exists #186
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#186
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/vault/vault-metrics-engine.ts:178-188:The function pushes a literal
0for every resolved conflict's "repair duration." Then takes the average. SoavgRepairDaysalways reports0days. The comment says "without resolution timing data on each entry we fall back to null" but the code falls back to0, notnull.The return type allows
number | null. The user sees "Average repair time: 0 days" which is either always-zero or always-a-lie.Suggested fix
Return
nullwhen no real repair-duration data is available:The
repairDurations.push(0)line should be removed entirely — pushing a constant provides no information. When the schema gainsresolvedAtonVaultConflictEntrylater, the real computation can be added back.Severity
Low. Cosmetic / honesty fix. No data is wrong; the displayed value is misleading.
Discovered by
Manual code review pass over #169, 2026-09-14.