mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4111] [CLOSED] [GUI] the App Host's source-checkout mode no longer passes an empty STRATA_API_KEY #4902
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4902
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4111
Author: @demetree
Created: 10/25/2026
Status: ❌ Closed
Base:
main← Head:fix-app-source-key📝 Commits (1)
ec91003host: the source-checkout server gets no STRATA_API_KEY instead of an empty one📊 Changes
2 files changed (+38 additions, -1 deletions)
View changed files
📝
apps/host/server/native-control.mjs(+7 -1)➕
apps/host/tests/source-server-env.test.mjs(+31 -0)📄 Description
Fixes #3851.
Problem
From a source checkout, loading a model in the app always ends with
Engine stopped (exit 2), and the app's log says[strata] an API key was given but it is empty: set a key, or leave it out.The host started the server with
STRATA_API_KEYset to the empty string.serve/server.pyreads that variable asthe default for
--api-keyand refuses a key that is present but empty (the #213 rule), before it reads the config. Sothe model never loads.
Result
The variable is removed from the child environment instead, so the run config's own key is used. With this change the
same load starts the engine: 262,144-token context, 12,288 experts filled (23.42 GiB VRAM), and the app's own benchmark
returned 200 tokens at 60.2 tok/s on an Arc Pro B70. (One measurement on one machine, not a benchmark.)
Approach
The environment is built by
sourceServerEnvironment(), exported fromnative-control.mjsand used at the spawn, sothe rule can be tested without starting a server. It keeps the process environment, sets the three Python UTF-8
variables, and deletes
STRATA_API_KEY.This is what
strata_controlalready does on the packaged path (control-runtime.mjsdeletes the variable), so the twopaths now agree. The intent of the empty string was right - the run config carries the instance's key, and an inherited
variable must not override it - but an empty string is refused rather than read as "no key".
Validation
Passed
node --test apps/host/tests/source-server-env.test.mjs- 4 tests: an inherited key is removed (not blanked), theUTF-8 settings and the rest of the environment are kept, the input environment is not mutated, and a process without
the variable gets the same result.
node --check apps/host/server/native-control.mjs.Not run
apps/hostsuite (npm test): the change is one environment builder and its test, and the branch wasworked on in a worktree without
node_modules.tree:
Engine stopped (exit 2)with the message above, then a successful start once the variable was deleted.Limits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.