Skip to content

fix: follow redirects for internal CLI Auth probe - #54

Merged
zskbot merged 2 commits into
mainfrom
fix/cli-auth-service-binding-redirect-follow
Nov 16, 2026
Merged

zskbot merged 2 commits into
mainfrom
fix/cli-auth-service-binding-redirect-follow

Conversation

@zskbot

@zskbot zskbot commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Match the Auth service-binding probe redirect policy to the working MCP probe by using redirect: "follow".
  • The staging Worker with this change reports cli-auth: healthy via the internal ocodejs-auth service binding, with GitHub OAuth/PAT bindings configured.

Validation

  • Staging Control API /services: control-api, cli-auth, and mcp-server healthy.
  • Public auth.ocodejs.dev still returns Cloudflare challenge; this change does not alter public routing or security mode.
  • No secrets, DNS, or Production settings changed.

Keep unmerged pending review.

Summary by Sourcery

Fix the internal CLI Auth health probe to follow redirects and report service health correctly.

Bug Fixes:

  • Allow the internal CLI Auth health probe to follow redirects so service health checks succeed when the Auth endpoint redirects.

Tests:

  • Update the CLI Auth probe test to verify redirect-following behavior.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
ocodejs-profile Error Error Nov 16, 2026 10:09pm UTC

Request Review

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Configure the internal CLI Auth health probe to follow redirects, matching the MCP probe’s policy.

  • workers/control-api/worker.mjs L181

Tests

Update the probe test to expect redirects to be followed.

  • workers/control-api/worker.test.mjs L34

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T22:08:45.980863Z
We couldn’t complete this review. Comment @codex review to try again.
7a1ecce PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project ocodejs.github.io with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/ocodejs-co?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project pages.ocodejs.theme with the following error:

Resource is limited - try again in 1 day (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/ocodejs-co?upgradeToPro=build-rate-limit

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="workers/control-api/worker.mjs" line_range="181" />
<code_context>
       headers: { Accept: "application/json" },
       cache: "no-store",
-      redirect: "error",
+      redirect: "follow",
       signal: AbortSignal.timeout(4000)
     });
</code_context>
<issue_to_address>
**Healthy probe test fails**

When the service-registry test probes CLI Auth, the mocked `fetch` asserts `options.redirect === "error"`, but `probeCliAuth` passes `"follow"`; the assertion throws, the probe reports CLI Auth unavailable, and the healthy-state assertion fails.

Update the mocked `fetch` assertion to expect `redirect: "follow"`.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: workers/control-api/worker.mjs:181


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread workers/control-api/worker.mjs Resolved
@zskbot
zskbot merged commit 618c302 into main Nov 16, 2026
5 of 8 checks passed

This branch had an error being deployed

1 failed deployment
Preview – ocodejs-profile — 03750852 Deployed Nov 16, 2026 by vercel[bot]
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.

1 participant