Skip to content

fix(mcp): serve hosted directory domain verification - #500

Merged
imshashank merged 2 commits into
mainfrom
feat/mcp-directory-domain-verification
Sep 24, 2026
Merged

imshashank merged 2 commits into
mainfrom
feat/mcp-directory-domain-verification

Conversation

@imshashank

@imshashank imshashank commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

OpenAI directory verification requires a public challenge at /.well-known/openai-apps-challenge. Serve that proof only when both the configured application origin and the request origin are https://orbit.noveum.ai. Self-hosted instances, preview URLs and mismatched origins return 404; the successful response is plain text and non-cacheable.

The change is limited to the route and its regression coverage. Four fixtures cover hosted, preview, self-hosted and mismatched-host requests. There are no database changes or authentication relaxations.

Validation: focused tests pass with 34 assertions. The combined tree containing this change and merged deployment work passed bun run verify on a clean GitHub runner: 6,242 passed, five skips and zero failures. Build, schema validation and both end-to-end suites also passed: https://github.com/Noveum/orbit/actions/runs/35977237394. Current main including #493 is merged into the branch; latest-head CI must finish before merge.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Noveum/orbit/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fece2217-5097-4d7b-a065-834931f088c2

📥 Commits

Reviewing files that changed from the base of the PR and between e151c1e and bd2ff2f.

📒 Files selected for processing (2)
  • apps/web/src/app/.well-known/openai-apps-challenge/route.ts
  • apps/web/tests/app/well-known/registry-discovery.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Adds an OpenAI Apps Challenge route that returns a verification token for matching hosted origins. Extends registry discovery tests to check the route’s status, body, content type, and cache control.

Changes

OpenAI Apps Challenge route

Layer / File(s) Summary
Origin-checked challenge response
apps/web/src/app/.well-known/openai-apps-challenge/route.ts
Adds a dynamic Node.js GET route. It returns a 404 if the configured app URL or request origin differs from https://orbit.noveum.ai. Otherwise, it returns the plain-text token with no-store caching.
Directory claim test coverage
apps/web/tests/app/well-known/registry-discovery.test.ts
Extends the test evaluation and assertions to check the claim status and response details. Adds a fixture that expects a 404 when the app URL does not match the hosted origin.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to bd2ff

The hosted-only challenge response has no identified merge-blocking issue; normal checks remain appropriate.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the main change: serving hosted directory domain verification for the MCP integration.
Description check ✅ Passed The description directly explains the new challenge endpoint, its origin checks, response behavior, test coverage, and validation results.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added tests Test coverage and test infrastructure area: web The Next.js app and its UI area: mcp The MCP server, its tools and its OAuth labels Sep 24, 2026
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
orbit Ready Ready Preview Sep 24, 2026 9:14am UTC

Request Review

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@imshashank
imshashank merged commit fb17c33 into main Sep 24, 2026
15 checks passed
@imshashank
imshashank deleted the feat/mcp-directory-domain-verification branch September 24, 2026 09:15

This branch was successfully deployed

1 active deployment
Preview — db6ec33b Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp The MCP server, its tools and its OAuth area: web The Next.js app and its UI tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant