fix: serve OpenAI domain verification challenge - #119
Conversation
|
| routes = [ | ||
| Route( | ||
| "/.well-known/openai-apps-challenge", | ||
| endpoint=openai_apps_challenge_endpoint, | ||
| methods=["GET"], | ||
| ), |
There was a problem hiding this comment.
This public verification route has no committed behavioral test. Add an unauthenticated ASGI request test that checks the successful status, exact token body, and text/plain content type. Without it, a later authentication, routing, or response change could silently break domain verification. These assertions cover the observable HTTP contract rather than implementation details.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/mcp_server_appwrite/http_app.py
Line: 485-490
Comment:
**Missing HTTP contract test**
This public verification route has no committed behavioral test. Add an unauthenticated ASGI request test that checks the successful status, exact token body, and `text/plain` content type. Without it, a later authentication, routing, or response change could silently break domain verification. These assertions cover the observable HTTP contract rather than implementation details.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
This is fixed, isn't it?
There was a problem hiding this comment.
Yes, this is fixed. The PR now includes an unauthenticated TestClient test covering the route's 200 status, exact token body, and text/plain content type. The missing-test finding is resolved.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
OpenAI domain verification currently has no challenge endpoint on the hosted MCP server. Serve the supplied public verification token at
GET /.well-known/openai-apps-challengeas plain text without requiring bearer authentication, allowing verification after deployment tomcp.appwrite.io.Validation:
srcandtests.--pythonplatform Linux(the CI target).text/plain.fcntland one system CPU gauge failure. Native Windows Pyright also reports Unix-only API errors.