Repository navigation
feat(research): learn privacy-gated question autosuggestions - #162
Merged
Merged
Conversation
p3t3r67x0
force-pushed
the
feat/research-learning-suggestions
branch
2 times, most recently
from
October 1, 2026 22:30
673946b to
7e11215
Compare
p3t3r67x0
force-pushed
the
feat/research-learning-suggestions
branch
from
October 1, 2026 23:38
c8af923 to
ee6f7cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Research questions now learn immediately from successful executions and explicitly rendered/selected suggestions, with PostgreSQL-only retrieval. A query needs three successful uses plus a conservative privacy gate before it can appear. Typing does not train or call an LLM, encoder or Qdrant; no static catalogue or user profiles are introduced.
The question-only execution body remains unchanged. A validated, ten-minute selection receipt travels in an explicitly allowlisted header; only successful execution of the matching query earns conversion credit, once per request/suggestion pair. Failed/unsupported/clarification responses do not learn. Sensitive rejected text is not stored; only a redacted successful observation remains. Learning writes are transactional and best effort with a one-second budget.
0018and admin tablesresearch_query_history,research_query_suggestion,research_query_suggestion_eventwith indexes and event/conversion uniqueness.Validation: backend targeted suite 283 passed, 27 database-dependent skips; focused final suggestions 42 passed, with six PostgreSQL tests excluded locally; offline migration checks 3 passed; release-manifest packaging unit 1 passed. Frontend full unit suite 995 passed, final affected subset 79 passed. Ruff check/format and configured mypy pass; frontend lint/typecheck pass (four existing lint warnings);
git diff --checkpasses. Local.envloading was disabled for backend tests; API tests ran outside the sandbox after sandbox event-loop stalls. No local Docker/container/database tests were run. PostgreSQL migration/counter/concurrency/privilege and production browser coverage are left to GitHub CI. CI will not be awaited or polled to completion.Deployment impact for a future authorized release: migrate as the explicit migrator, then provision SELECT/INSERT on history/events and SELECT/INSERT/UPDATE on suggestions. Readiness and the release manifest require the new head/grants. Upgrade contracts cover the supported earlier heads, including verified
0017inventory. Downgrade removes only the new learning tables/data. Deploy compatible backend/frontend together. This PR does not deploy or merge.Follow-ups: compact operator diagnostics/moderation, retention tooling and verified language metadata (
undfor now). The privacy gate is conservative heuristic filtering, not a guarantee that every sensitive phrase is detected. Semantic suggestion retrieval is out of scope.Base: freshly fetched
mainat2f0f6349a94d90e613dd1728371fedcec3ac4fb7.