Skip to content

fix(BUY-63030): route MCP catalog reads through primary db + fix list_categories unavailable flag#232

Open
BuyWhere wants to merge 1 commit into
mainfrom
fix/buy-63030-catalog-reads
Open

fix(BUY-63030): route MCP catalog reads through primary db + fix list_categories unavailable flag#232
BuyWhere wants to merge 1 commit into
mainfrom
fix/buy-63030-catalog-reads

Conversation

@BuyWhere

Copy link
Copy Markdown
Owner

Context

Parent BUY-63027 is a SEV-1 MCP regression: search/deals/categories returned fabricated or empty catalog data.

Changes

  1. Route MCP catalog reads (search_products, get_product, compare_products, get_deals, list_categories, find_best_price, discount-column probe) through primary db pool
  2. Fix list_categories meta.unavailable: set true when all rows are zero-count static fallback
  3. 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 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

… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant