ci: assert WorkOS OAuth refresh metadata - #339
Conversation
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Akshay Dodeja <dodeja@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de7aa90170
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CI follows the preview deployment's authorization-server metadata redirect and | ||
| fails if `grant_types_supported` omits `refresh_token` or `scopes_supported` |
There was a problem hiding this comment.
Correct the claim that CI checks the preview redirect
The workflow does not follow the preview deployment’s metadata redirect: .github/workflows/ci.yml hard-codes https://mcp.terminal49.com/.well-known/oauth-authorization-server. Consequently, a preview with a broken redirect or incorrect WorkOS issuer can still pass while production remains healthy, so this operational guide gives maintainers false assurance about what CI validates; describe this as a production metadata check or change the workflow to query the resolved preview origin.
Useful? React with 👍 / 👎.
| CI follows the preview deployment's authorization-server metadata redirect and | ||
| fails if `grant_types_supported` omits `refresh_token` or `scopes_supported` |
There was a problem hiding this comment.
Correct the validated environment
This text says CI follows the preview deployment’s authorization-server redirect, but the workflow requests the fixed production mcp.terminal49.com URL. Maintainers can therefore mistake successful CI for evidence that preview-specific OAuth configuration advertises refresh support.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/mcp/WORKOS_MCP_SETUP.md
Line: 98-99
Comment:
**Correct the validated environment**
This text says CI follows the preview deployment’s authorization-server redirect, but the workflow requests the fixed production `mcp.terminal49.com` URL. Maintainers can therefore mistake successful CI for evidence that preview-specific OAuth configuration advertises refresh support.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Summary
Reviewed — found 2 issues in the CI workflow and WorkOS setup runbook. The new assertion correctly checks refresh-token metadata, but the workflow now makes secretless runs depend on unrelated Vercel preview steps, and the runbook describes the check as preview-specific even though it targets production.
Findings
.github/workflows/ci.yml
- Restore the credential guard around preview-only deployment discovery and validation steps.
packages/mcp/WORKOS_MCP_SETUP.md
- Describe the refresh metadata assertion as a production check rather than a preview redirect check.
Verdict
| @@ -193,7 +192,6 @@ jobs: | |||
| if: steps.credential.outputs.available == 'true' | |||
| run: npm ci | |||
| - name: Wait for this commit's Vercel preview | |||
There was a problem hiding this comment.
Restore the credential guard around preview-only steps. The metadata assertion requests the fixed production URL in AUTHORIZATION_SERVER_METADATA_URL and does not consume either the Vercel deployment or steps.preview.outputs.endpoint. However, this change also removes if: steps.credential.outputs.available == 'true' from Wait for this commit's Vercel preview, Resolve Vercel preview endpoint, and Verify preview still belongs to this commit. When MCP_EVAL_TOKEN is unavailable, both matrix jobs now wait for and validate a Vercel preview even though the authenticated preview smoke is skipped; only the 2026-07-28 job then performs the independent production metadata check. A delayed deployment, missing Vercel status, or missing/churned bot comment can therefore fail CI for reasons unrelated to this assertion. Please restore the credential guard on those three preview-only steps so the production metadata assertion can run independently. Alternatively, if the preview is intended to be tested, use the resolved preview origin in the assertion.
| # aud == https://mcp.terminal49.com | ||
| ``` | ||
|
|
||
| CI follows the preview deployment's authorization-server metadata redirect and |
There was a problem hiding this comment.
Describe this as a production metadata check. CI no longer follows the preview deployment's metadata redirect: the workflow hard-codes https://mcp.terminal49.com/.well-known/oauth-authorization-server, so it follows the production deployment's redirect instead. Please describe this as a live/production metadata check, or change the workflow to request the resolved preview origin. As written, maintainers may incorrectly assume a PR's redirect handler and preview environment configuration are covered.
Summary
refresh_tokenandoffline_accessVerification
git diff --checkNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
This PR adds an independent live assertion that production WorkOS metadata advertises refresh-token support and expands the OAuth setup runbook with automated and human refresh smoke procedures.
refresh_tokenandoffline_access.Confidence Score: 4/5
The PR appears safe to merge, with a non-blocking documentation correction needed so the runbook accurately identifies production as the environment validated by CI.
The workflow’s live metadata check is consistent with the stated production-smoke intent, but the accompanying runbook incorrectly claims that the check follows the preview deployment’s redirect.
Files Needing Attention: packages/mcp/WORKOS_MCP_SETUP.md
Important Files Changed
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: check live oauth metadata in previe..." | Re-trigger Greptile