Skip to content

fix(runframe): use the embedded eval worker in CLI standalone mode#3752

Draft
addibble wants to merge 1 commit into
tscircuit:mainfrom
addibble:fix/cli-standalone-embedded-eval-worker
Draft

fix(runframe): use the embedded eval worker in CLI standalone mode#3752
addibble wants to merge 1 commit into
tscircuit:mainfrom
addibble:fix/cli-standalone-embedded-eval-worker

Conversation

@addibble

Copy link
Copy Markdown

Problem

The CLI branch in standalone.tsx rendered <RunFrameForCli {...runframeStandaloneProps} />. runframeStandaloneProps carries the embedded eval-worker blob under evalWebWorkerBlobUrl, but RunFrameForCli reads workerBlobUrl — a different name — so the blob was silently dropped. RunFrameForCli then computes:

forceLatestEvalVersion={!props.workerBlobUrl && shouldLoadLatestEval}  // -> true

and fetches eval from the CDN instead of using the embedded worker.

Whenever an eval worker is embedded into the standalone (the tscircuit umbrella build fills that placeholder), CLI mode ignored it and silently downloaded a different eval from the network. This breaks offline / air-gapped / pinned-eval / locally-built-eval usage of tsci dev — the embedded worker should be authoritative.

Fix

Forward the blob explicitly under the name RunFrameForCli actually reads, and pass enableFetchProxy:

root.render(
  <RunFrameForCli
    workerBlobUrl={runframeStandaloneProps.evalWebWorkerBlobUrl}
    enableFetchProxy={runframeStandaloneProps.enableFetchProxy}
  />,
)

Forwarding by name (rather than spreading runframeStandaloneProps, typed as ComponentProps<typeof RunFrameWithApi>) also avoids passing RunFrameForCli an evalWebWorkerBlobUrl prop it does not accept. A comment documents that new standalone props must be added here explicitly.

Risk

Low, no regression for normal users: when no worker is embedded, evalWebWorkerBlobUrl is undefined, so behavior is unchanged and it still loads the latest eval from the CDN. Behavior only changes when a worker blob is actually embedded — the case this is meant to handle.


Draft: opening for review before merge. (package.json is intentionally excluded — local yalc artifacts only.)

The CLI branch rendered <RunFrameForCli {...runframeStandaloneProps} />.
runframeStandaloneProps carries the embedded eval-worker blob under
evalWebWorkerBlobUrl, but RunFrameForCli reads workerBlobUrl, so the blob
was silently dropped. RunFrameForCli then computed
forceLatestEvalVersion={!props.workerBlobUrl && shouldLoadLatestEval} -> true
and fetched eval from the CDN instead of using the embedded worker.

Forward the blob explicitly as workerBlobUrl (and pass enableFetchProxy).
No-op for the default flow (no embedded worker -> evalWebWorkerBlobUrl is
undefined -> still loads latest eval from CDN); only changes behavior when a
worker is actually embedded, which is the case this is meant to handle
(offline / air-gapped / pinned-eval / locally-built-eval tsci dev).
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
runframe Ready Ready Preview, Comment Jun 23, 2026 12:53am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant