Skip to content

fix/4305-gateway-federation-prompts - #4864

Closed
Nayana-R-Gowda wants to merge 1 commit into
mainfrom
fix/4305-gateway-federation-prompts
Closed

Nayana-R-Gowda wants to merge 1 commit into
mainfrom
fix/4305-gateway-federation-prompts

Conversation

@Nayana-R-Gowda

@Nayana-R-Gowda Nayana-R-Gowda commented May 22, 2026 •

Copy link
Copy Markdown
Collaborator

Signed-off-by: NAYANA.R nayana.r7813@gmail.com

closes #4305

What Was Fixed

  1. Test infrastructure: Created resolve_prompt() helper in
    tests/live_gateway/protocol_compliance/helpers/compliance.py to handle both bare and slug-prefixed prompt names
  2. Test expectations: Updated test_prompts.py to use the resolver instead of expecting only bare names
  3. Virtual server fixture: Added prompt composition to upstream_registration.py so virtual servers include federated
    prompts
  • Gateway federation correctly surfaces upstream prompts with slug-prefixed names (per spec)
  • Virtual servers now compose and expose prompts from their upstream gateways
  • Test harness properly validates both bare and federated prompt names
  • The XPASS result confirms the compliance gap is closed for gateway_virtual target

code changes

  1. fixtures/upstream_registration.py :white_check_mark

Line 129-130: Fetches prompts via GET /prompts?gateway_id=... — this calls the REST API which calls prompt_service.list_prompts() with a gateway_id filter. Since gateway registration already syncs prompts into the DB (via _update_or_create_prompts() at gateway_service.py:4924), this will return the federated prompts.

Line 141: Adds associated_prompts to the server creation payload — this populates the server_prompt_association table so list_server_prompts() finds them.

  1. helpers/compliance.py :white_check_mark

resolve_prompt() mirrors resolve_tool() exactly — checks for bare name "greet" first (reference target), then slug-prefixed "compliance-reference-greet" (gateway targets). This is needed because the test was previously checking for a hardcoded "greet" name.

  1. test_prompts.py :white_check_mark

test_prompt_listed: Removed gateway_proxy from xfail (it should now pass via DB cache mode for the global /mcp/ path → prompt_service.list_prompts()). Uses resolve_prompt() for slug-agnostic matching.

test_prompt_renders_argument: Same xfail narrowing. Added resolve_prompt() + graceful skip. The get_prompt handler at streamablehttp_transport.py:2325 already calls prompt_service.get_prompt() which handles federated prompts with gateway_id set (it delegates to _fetch_gateway_prompt_result() at prompt_service.py:2070).

Signed-off-by: NAYANA.R <nayana.r7813@gmail.com>
@jonpspri

Copy link
Copy Markdown
Collaborator

Closing this PR. Issue #4305 was closed as NOT_PLANNED, and the compliance test suite this PR modifies (tests/live_gateway/) has since been removed from the repository by PR #5935 ("chore: remove outdated tests/compliance suite"). The target files no longer exist in main, so this PR cannot be applied as-is.

@jonpspri jonpspri closed this Aug 20, 2026
@jonpspri
jonpspri deleted the fix/4305-gateway-federation-prompts branch October 21, 2026 12:34
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.

[BUG][MCP-PROTOCOL]: Gateway federation does not surface upstream prompts

2 participants