Stop sending hashed search queries to legacy /v1/events#464
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (3)
WalkthroughThe changes remove query-derived data from the telemetry system. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Drops the
queryHashfield from the legacy/v1/eventstelemetry pipeline.recordSearchPerformedwas sendinghashQuery(query)— a SHA-256 of the lowercased+trimmed query truncated to 16 hex chars — every time a user submitted a search and had the legacy "Help improve search" toggle enabled. For low-entropy inputs (repo names, app names, English words) a 16-hex SHA-256 prefix is rainbow-table-trivial; effectively the query.This PR removes that field at the client. The backend column can stay (older clients still write it); newer clients omit it. The signal that survives is
result_count— the count-only ranking-miss tracker stays intact.Changes
TelemetryRepository.recordSearchPerformed(query, resultCount)→recordSearchPerformed(resultCount)TelemetryRepositoryImpl: drop thehashQueryimport and thequeryHashargument toenqueue(...); same signature change.EventRequest: drop thequeryHashfield (it had no other producers after this change).core/data/utils/QueryHash.kt: deleted — only caller was the legacyrecordSearchPerformed.SearchViewModel: updated to the new signature.Test plan
./gradlew :composeApp:compileKotlinJvm :composeApp:compileDebugKotlinAndroid(will run in CI)/v1/eventsno longer contains aqueryHashfield. Backend continues to accept (the field isString? = nullserver-side).Notes
SearchRepositoryImplstill hashes the query for local cache key construction — that hash never leaves the device. Untouched.ea71b5ed. No other E6 work is included.Summary by CodeRabbit