fix(search): fake commit to trigger linked deployment#7228
Open
fix(search): fake commit to trigger linked deployment#7228
Conversation
revu-bot
reviewed
Apr 10, 2026
Collaborator
revu-bot
left a comment
There was a problem hiding this comment.
Review Summary
This PR contains two changes: a default parameter bump (size: 5 → 8) and a debug console.log left in production code. The PR title ("fake commit to trigger linked deployment") is itself a red flag — it signals the change was not made for a legitimate functional reason.
| File | Lines | Severity | Issue |
|---|---|---|---|
src/api/modules/suggest/service.ts |
14 | CRITICAL | console.log debug statement left in production code |
src/api/modules/suggest/service.ts |
6 | IMPORTANT | Undocumented/unjustified default size change (5 → 8) |
revu-bot
reviewed
Apr 10, 2026
Comment on lines
+13
to
16
|
|
||
| console.log(JSON.stringify(body, null, 2)); | ||
|
|
||
| return response.hits.hits.map((t) => t._source.title); |
Collaborator
There was a problem hiding this comment.
[CRITICAL] Debug console.log must not reach production
- Why it matters: This logs the full Elasticsearch query body on every suggestion request. In production this will:
- Flood server logs with high-volume noise (one log per keystroke per user).
- Potentially expose internal query structure / index configuration in log aggregation systems.
- Degrade performance under load due to
JSON.stringifyon every call.
- Fix: Remove the statement entirely before merging.
Suggested change
| console.log(JSON.stringify(body, null, 2)); | |
| return response.hits.hits.map((t) => t._source.title); | |
| return response.hits.hits.map((t) => t._source.title); |
revu-bot
reviewed
Apr 10, 2026
| const minQueryLength = 2; | ||
|
|
||
| export const getSuggestions = async (q: string, size = 5) => { | ||
| export const getSuggestions = async (q: string, size = 8) => { |
Collaborator
There was a problem hiding this comment.
[IMPORTANT] Undocumented change to default size (5 → 8)
- Why it matters: The default suggestion count is a product/UX decision that affects perceived search quality and Elasticsearch load. Changing it silently (and in a commit explicitly described as a "fake commit") makes it impossible to audit or revert intentionally.
- Actions required:
- If this change is intentional, document the rationale in a code comment or PR description and add/update tests that assert the new default.
- If it was accidental, revert to
5.
Suggested change
| export const getSuggestions = async (q: string, size = 8) => { | |
| export const getSuggestions = async (q: string, size = 5) => { |
|
|
🎉 Deployment for commit fe7b84b : Docker images
|
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.



No description provided.