fix(BUY-63030): route MCP catalog reads through primary db + fix list_categories unavailable flag#232
Open
BuyWhere wants to merge 1 commit into
Open
fix(BUY-63030): route MCP catalog reads through primary db + fix list_categories unavailable flag#232BuyWhere wants to merge 1 commit into
BuyWhere wants to merge 1 commit into
Conversation
… list_categories unavailable flag Parent BUY-63027 is a SEV-1: MCP returned fabricated or empty catalog data. Changes: - Route MCP catalog reads (search_products, get_product, compare_products, get_deals, list_categories, find_best_price, discount-column probe) through primary db pool. - Fix list_categories meta.unavailable: set true when all rows are zero-count static fallback. - Cache-hit path recomputes unavailable from cached rows so callers always get corrected flag. Note: catalogDb routing was attempted but CATALOG_DATABASE_URL is not set on MCP service, causing catalogDb pool to fall back to wrong connection. Route reads through primary db. Refs: BUY-63027 BUY-63030
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.
Context
Parent BUY-63027 is a SEV-1 MCP regression: search/deals/categories returned fabricated or empty catalog data.
Changes
Note
catalogDb routing was attempted but CATALOG_DATABASE_URL is not set on the MCP service, causing catalogDb to fall back to non-existent connection. Reads route through primary db pool.
Refs: BUY-63027 BUY-63030
🤖 Generated with Claude Code