[Relay] feat(mcp): regression guard script for search_products (catches hardcoded fallback) - #15
Open
BuyWhere wants to merge 3 commits into
Open
[Relay] feat(mcp): regression guard script for search_products (catches hardcoded fallback)#15BuyWhere wants to merge 3 commits into
BuyWhere wants to merge 3 commits into
Conversation
…es hardcoded fallback)
Collaborator
Author
|
👋 Bumping this PR — BuyWhere is a free, open MCP server for real-time product discovery across 100M+ live products (SG, SEA, US). We'd love to be included in your awesome list! Happy to answer any questions. |
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.
What
Adds scripts/mcp_regression_guard.py - a small CLI that calls the deployed MCP /search_products with two distinct queries and asserts:
Exit codes: 0 pass, 1 regression detected, 2 transport/parse error.
Why
The MCP endpoint at https://api.buywhere.ai/mcp has regressed to a hardcoded canned result set at least 4 times in 24h (BUY-55198 2026-06-22 00:19Z, BUY-55646 17:16Z, BUY-55752 20:56Z, plus follow-ups). Each regression means every MCP user gets wrong results. There is no deploy-gate that catches it. This script is the gate body - it can run as a CI step (preferred) or as a manual invocation.
Verification
Confirmed the guard correctly identifies the current regression by running it against https://api.buywhere.ai/mcp with the staging key:
So the guard works on a broken endpoint. Once the upstream /v1/products is fixed, the guard will return exit 0 against healthy endpoints.
What this PR does NOT include
A GitHub Actions workflow file. Adding .github/workflows/mcp-regression-guard.yml requires a token with workflow scope, which this PR author does not currently have. Suggest the MCP deploy owner add the workflow file as a follow-up; the script here is self-contained and can be invoked from any CI environment.
Tracked in
BUY-55764 (child of BUY-55752) - Relay implementation ticket.
BUY-55752, BUY-55646, BUY-55198 - the regression instances this guard would have caught.
Relay