Repository navigation
zgx: the app starts its engine against the edge ZERON_EDGE_URL names - #1389
Open
alexandre-vl wants to merge 3 commits into
Open
alexandre-vl wants to merge 3 commits into
alexandre-vl wants to merge 3 commits into
Conversation
The beta gave the engine it starts production's edge, sign-in client and callback port whatever the environment said. With ZERON_EDGE_URL (and ZERON_WORKOS_CLIENT_ID, ZERON_CALLBACK_PORT) naming a self-hosted edge, as `zeron` itself reads them, an engine the app started on ~/.zeron loaded the session `zeron login` had kept there for that edge, handed it to production, which turned it down, and signed out, deleting it: Zeron 0.3.0 signed a self-hosting user out each time it started the engine. The beta now reads the engine's own variables as crates/cli's env.rs does: production's unless they name another edge, client or port (an edge alone keeps production's client and port), and starts Zeron.app's engine with those. Nothing of staging's is built in, and the development variables (ZERON_ZGX_*) still reach nothing. The manager still refuses an engine whose edge isn't the one the environment names. a_beta_build_is_production_unless_the_engines_variables_say and a_beta_build_starts_the_engine_against_the_edge_zeron_s_variables_name fail without it. (a_beta_build_manages_zeron_app_s_engine fails on Linux before and after: it writes macOS's engine name, `Zeron Engine`, beside the executable; CI runs apps/zgx's tests without `beta`.)
3 of 4 tasks
Contributor
Author
|
The red checks come from
|
An app opened from the Dock or Finder gets launchd's environment, not the shell's, so ZERON_EDGE_URL alone left a self-hosted session `zeron login` kept meeting production's edge. With no variable naming an edge, the app now takes the one session.json says issued it (edgeUrl, workosClientId, which the engine writes since zeronsh#1390), else production's. - Production's edge and client are zeron_cli's defaults, not a copy. - The manager checks against the same resolution, in its data dir. - a_beta_build_manages_zeron_app_s_engine writes this platform's engine name, so it passes on Linux. - CI runs apps/zgx's unit tests with --features beta too (scripts/ci/test-zgx.sh rust-beta): the build every package makes.
jsgrrchg
reviewed
Nov 26, 2026
jsgrrchg
left a comment
Contributor
There was a problem hiding this comment.
@SinaKhalili @wingleeio could one of you review this? It needs a code owner since c98b4ef touches CI, and someone other than me for the last push.
On top of the original fix (the app starts its engine against the edge ZERON_EDGE_URL names), c98b4ef adds:
- With no variable set (the app opened from the Dock/Finder, which doesn't get the shell's env), the app follows the edge/client that issued the kept session (
edgeUrl/workosClientIdinsession.json, written since #1390), else production. - Production's edge/client come from
zeron_cli's defaults instead of a copy. - The manager's check uses the same resolution, against its data dir.
a_beta_build_manages_zeron_app_s_engineuses the platform's engine name, so it passes on Linux.- CI (your part):
zgx-tests.ymlruns apps/zgx's unit tests with--features betatoo, via a newscripts/ci/test-zgx.sh rust-beta. That's the build every package makes, and its tests never ran in CI.
Full beta suite passes on Linux (737/0); macOS is still untested, so a macOS run would be welcome.
This branch has not been deployed
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.
Summary
ZERON_EDGE_URL(andZERON_WORKOS_CLIENT_ID,ZERON_CALLBACK_PORT) naming a self-hosted edge, aszeronitself reads them incrates/cli/src/env.rs.~/.zeronloaded the sessionzeron loginhad kept there for that edge and handed it to production.session.json.env.rsdoes: production's, unless they name another edge, client or port. An edge alone keeps production's client and port. Zeron.app's engine is started with those.ZERON_ZGX_*) still reach nothing in the beta.auth::production()is now#[cfg(test)]: it has no non-test callers left.zeronand the engine already place in these variables. The engine-side change, a session used only by the edge that issued it, is engine: a saved session is used only by the edge and client that issued it #1390.Test plan
cargo test --locked --features beta --bin zeron-zgx -- endpoint_tests engine::manager::tests(apps/zgx) on Linux:a_beta_build_is_production_unless_the_engines_variables_sayanda_beta_build_starts_the_engine_against_the_edge_zeron_s_variables_name. Both pass, and both fail with the beta'sendpoint_withput back toproduction().a_beta_build_manages_zeron_app_s_enginefails on Linux both before and after this change (manager.rs:482). It writes macOS's engine name,Zeron Engine, beside the executable, while Linux looks forzeron-engine. CI runs apps/zgx's tests withoutbeta, so it never runs there.beta): 5 passed.cargo clippy --locked --all-targets, with and withoutbeta: no warnings in the files touched.