Files
orca/cloud/apps/sandbox-control
Neil dca419d3fd fix(cloud): CODEX-EGRESS-BLOCKED say so when chatgpt.com refuses the egress proxy
chatgpt.com answers every request from Cloudflare Workers' egress IPs with a 403 "Unable to load
site" HTML page, whatever the token (verified from a throwaway Worker; the same request from
elsewhere gets a normal 401). Codex via the Orca account goes through the Worker egress proxy, so
it got that page on /responses and /wham/usage: "Working…" without an answer, and /status had no
limits.

The proxy now recognises a provider edge's own refusal (403, text/html, server: cloudflare) on
routes that define an answer for it, logs egress_upstream_blocked, and answers Codex in ChatGPT's
error shape so Codex prints a plain message. The block says nothing about the credential: no
status hook, so no refresh and no revoke. This doesn't make Codex work; routing chatgpt.com around
the Worker is a separate decision.
2026-11-15 00:09:55 -08:00
..

sandbox-control

The Orca Cloud control plane Worker: workspace lifecycle, the egress credential proxy, environment builds and the golden image. Its routes are listed at the top of src/index.ts.

Typecheck

pnpm typecheck runs scripts/typecheck.mjs. It fails on any TypeScript diagnostic in this package's own files, and on any diagnostic without a file (a config error).

Why a raw tsc --noEmit shows about 247 diagnostics. The Worker imports desktop code from src/shared (wire types, parsers), so tsc checks those files under this package's options:

  • noUncheckedIndexedAccess, which the desktop doesn't use, accounts for about 239;
  • the Workers globals, which lack the desktop's window and MessageChannel, account for the rest.

TypeScript can't apply options per file. Those files are type-checked by the root (desktop) typecheck under their own config. So the script counts them, and prints the count on every run so a jump is visible, but doesn't fail on them.

Why there's an xterm stub. Desktop settings types import ITheme from @xterm/xterm, whose typings pull in the DOM library. DOM's Headers, streams and crypto clash with @cloudflare/workers-types. tsconfig.json paths maps that import to types/xterm-theme.d.ts, the theme shape only.