@@ -90,9 +90,8 @@ const DESKTOP_BACKEND_ENV_NAMES = [
9090] as const ;
9191
9292// Env vars that the WSL backend needs but Windows process.env won't forward
93- // across the wsl.exe boundary without WSLENV. The dev-server URL is handled
94- // separately via a `--dev-url` CLI flag because WSLENV translation of
95- // URL-shaped values (colons / slashes) is unreliable.
93+ // across the wsl.exe boundary without WSLENV. The dev-server URL travels as
94+ // the `--dev-url` CLI flag instead.
9695const WSL_FORWARDED_ENV_NAMES = [
9796 "OPENAI_API_KEY" ,
9897 "ANTHROPIC_API_KEY" ,
@@ -239,12 +238,11 @@ const readPersistedBackendObservabilitySettings = Effect.gen(function* () {
239238 } ;
240239} ) ;
241240
242- // The bootstrap is the only channel that carries an OTLP endpoint to every
243- // backend. A Windows-native child inherits the desktop process's env, but a
244- // WSL child gets nothing across wsl.exe that WSLENV does not declare, and
245- // WSLENV translation of URL-shaped values is unreliable, so the endpoints are
246- // deliberately not forwarded that way. Env beats the persisted settings file,
247- // matching the precedence resolveServerConfig and DesktopObservability apply.
241+ // The bootstrap carries the OTLP endpoints to every backend, including a WSL
242+ // child that lacks the variables. The T3 URLs also travel as variables in
243+ // WSL_FORWARDED_ENV_NAMES so they outrank a forwarded OTEL endpoint. Env beats
244+ // the persisted settings file, matching the precedence resolveServerConfig and
245+ // DesktopObservability apply.
248246const readBackendObservabilitySettings = Effect . gen ( function * ( ) {
249247 const environment = yield * DesktopEnvironment . DesktopEnvironment ;
250248 const persisted = yield * readPersistedBackendObservabilitySettings ;
@@ -760,10 +758,8 @@ const resolveWslStartConfig = Effect.fn("desktop.backendConfiguration.resolveWsl
760758 } ;
761759
762760 // Forward the dev-server URL as an explicit CLI flag so the WSL backend's
763- // config resolution lands in dev/ instead of userdata/. Inheriting through
764- // WSLENV is unreliable in practice (URL-shaped values with colons /
765- // slashes get translated unpredictably depending on flags), and the
766- // packaged build leaves devServerUrl as None anyway.
761+ // config resolution lands in dev/ instead of userdata/. The packaged build
762+ // leaves devServerUrl as None.
767763 const devUrlArgs = Option . match ( environment . devServerUrl , {
768764 onNone : ( ) => [ ] as ReadonlyArray < string > ,
769765 onSome : ( url ) => [ "--dev-url" , url . href ] ,
0 commit comments