fix(search): zero configured indexers returned five fake mock releases into the real grab pipeline#756
Open
t3chnaztea wants to merge 1 commit into
Open
Conversation
…s into the real grab pipeline When no indexers were configured/enabled, SearchIndexersAsync returned GenerateMockIndexerResults: five synthetic releases (fabricated titles, sizes, and magnet/NZB URLs) that flowed into real scoring and the automatic-grab decision and could be handed to a download client. Return an empty result set with a clear warning instead, and remove the now-dead GenerateMockIndexerResults helpers. Nothing in the frontend or tests depended on them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The bug
With zero indexers configured/enabled,
IndexerSearchWorkflow.SearchIndexersAsynclogged a warning and then returnedGenerateMockIndexerResults(query): five synthetic releases with fabricated titles, sizes, and URLs. Because this method also serves the automatic-search path, those fake releases flowed into real scoring and the grab decision, where one could be selected and handed to a download client.The fix
Zero indexers now returns an empty result set with a clear warning ("No indexers configured or enabled; search returned no results"). Both
GenerateMockIndexerResultsoverloads are deleted — a repo-wide search (backend, tests,fe/) found no other consumers, and no dev/debug flag gated them.Tests
SearchIndexers_NoIndexersConfigured_ReturnsEmptyWithoutSyntheticResultsFull suite green: 1190 passed / 0 failed;
dotnet format --verify-no-changesclean.🤖 Generated with Claude Code