Skip to content

fix: use staging Worker account-specific workers.dev host - #51

Merged
zskbot merged 2 commits into
mainfrom
fix/control-api-staging-workers-dev-host
Nov 16, 2026
Merged

zskbot merged 2 commits into
mainfrom
fix/control-api-staging-workers-dev-host

Conversation

@zskbot

@zskbot zskbot commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Use the workers.dev hostname belonging to the Cloudflare account that actually owns the enabled ocodejs-server-api-staging Worker and its custom-domain binding.
  • Avoid the api-staging.ocodejs.co route, which is served through the zone's browser challenge and returns Cloudflare cf-mitigated: challenge (403) to non-browser CI clients.
  • Avoid the ocodejs-df1.workers.dev hostname, which belongs to a different Cloudflare account than the Worker currently bound to api-staging.ocodejs.co.

Safety

  • CI smoke-test URL only; no DNS, Cloudflare settings, Worker source/deployment, credentials, or production routes changed.
  • Keep unmerged until GitHub Actions proves DNS, health/readiness, API contract and CORS checks pass.

Summary by Sourcery

Bug Fixes:

  • Update the staging control API smoke test to use the account-specific workers.dev hostname for the enabled staging Worker, avoiding the challenged custom-domain route and an unrelated account hostname.

@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 9:43pm UTC
ocodejs.github.io Ready Ready Preview Nov 16, 2026 9:43pm UTC
pages.ocodejs.theme Ready Ready Preview Nov 16, 2026 9:43pm UTC

Request Review

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Tests

Point the staging control API smoke test at the account-specific workers.dev host so CI avoids the challenged custom-domain route.

  • scripts/check-control-api-staging.mjs L1

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

@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

@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-16T21:39:06.542866Z
We couldn’t complete this review. Comment @codex review to try again.
abc8a92 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.

@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="scripts/check-control-api-staging.mjs" line_range="1" />
<code_context>
-const BASE = (process.env.CONTROL_API_BASE || "https://api-staging.ocodejs.co/api/v1").replace(/\/$/, "");
+const BASE = (process.env.CONTROL_API_BASE || "https://ocodejs-server-api-staging.huynhthuongg2505-f9b.workers.dev/api/v1").replace(/\/$/, "");
 const ORIGIN = "https://ocodejs.co";
 const MAX_AGE_MS = 60_000;
</code_context>
<issue_to_address>
**Dashboard remains on unrelated API host**

When the new hostname resolves and passes the smoke test while the dashboard still uses its existing base URL, `index.html` still sends dashboard requests to `ocodejs-server-api-staging.ocodejs-df1.workers.dev`, while this smoke test now checks the `huynhthuongg2505-f9b` host. The check can pass while the dashboard still cannot reach the active Worker, so users continue to see API data as unavailable.

Update the dashboard endpoint and the staging endpoint references in the runbook to the verified host, or make the check explicitly report that the dashboard still targets a different host.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: scripts/check-control-api-staging.mjs:1


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

Comment thread scripts/check-control-api-staging.mjs Resolved
@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

@zskbot
zskbot merged commit 5dd4ed8 into main Nov 16, 2026
4 of 7 checks passed

This branch had an error being deployed

1 failed deployment
Preview – ocodejs-profile — 1249d8fb 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