fix(runframe): use the embedded eval worker in CLI standalone mode#3752
Draft
addibble wants to merge 1 commit into
Draft
fix(runframe): use the embedded eval worker in CLI standalone mode#3752addibble wants to merge 1 commit into
addibble wants to merge 1 commit into
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The CLI branch in
standalone.tsxrendered<RunFrameForCli {...runframeStandaloneProps} />.runframeStandalonePropscarries the embedded eval-worker blob underevalWebWorkerBlobUrl, butRunFrameForClireadsworkerBlobUrl— a different name — so the blob was silently dropped.RunFrameForClithen computes: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
RunFrameForCliactually reads, and passenableFetchProxy:Forwarding by name (rather than spreading
runframeStandaloneProps, typed asComponentProps<typeof RunFrameWithApi>) also avoids passingRunFrameForClianevalWebWorkerBlobUrlprop 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,
evalWebWorkerBlobUrlisundefined, 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.jsonis intentionally excluded — local yalc artifacts only.)