Skip to content

zgx: the app starts its engine against the edge ZERON_EDGE_URL names - #1389

Draft
alexandre-vl wants to merge 1 commit into
zeronsh:zeron/zgxfrom
alexandre-vl:zgx-app-follows-engine-edge
Draft

alexandre-vl wants to merge 1 commit into
zeronsh:zeron/zgxfrom
alexandre-vl:zgx-app-follows-engine-edge

Conversation

@alexandre-vl

@alexandre-vl alexandre-vl commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The beta gave the engine it starts production's edge, sign-in client and callback port, whatever the environment said.
    • Take ZERON_EDGE_URL (and ZERON_WORKOS_CLIENT_ID, ZERON_CALLBACK_PORT) naming a self-hosted edge, as zeron itself reads them in crates/cli/src/env.rs.
    • An engine the app started on ~/.zeron loaded the session zeron login had kept there for that edge and handed it to production.
    • Production turned it down, and the engine signed out, deleting session.json.
    • So 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 the way env.rs does: 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.
  • Unchanged:
    • Nothing of staging's is built in.
    • The development variables (ZERON_ZGX_*) still reach nothing in the beta.
    • The manager still refuses an engine whose edge isn't the one the environment names.
  • auth::production() is now #[cfg(test)]: it has no non-test callers left.
  • Worth a close look: the beta now takes its edge from the process environment. That's the same trust zeron and 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:
    • New: a_beta_build_is_production_unless_the_engines_variables_say and a_beta_build_starts_the_engine_against_the_edge_zeron_s_variables_name. Both pass, and both fail with the beta's endpoint_with put back to production().
    • Existing: a_beta_build_manages_zeron_app_s_engine fails 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 for zeron-engine. CI runs apps/zgx's tests without beta, so it never runs there.
  • The same tests as a development build (no beta): 5 passed.
  • cargo clippy --locked --all-targets, with and without beta: no warnings in the files touched.
  • Not done: a packaged beta run end to end against a self-hosted edge.

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`.)
@alexandre-vl

alexandre-vl commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

The red checks come from zeron/zgx and GitHub's macOS runners, not this change.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant