Conversation
managed_proxy_env_pairs() unconditionally appended the loopback bypass list even when global_proxy_enabled is false, so every managed launch handed the child an environment that a manual launch never has. For Antigravity IDE that breaks the renderer -> local language server HTTPS channel: the renderer logs Failed to fetch, the language server receives zero chat requests, and the Agent panel silently discards the first message after an account switch; closing and reopening the IDE works around it. Injecting only no_proxy/NO_PROXY before launching the same binary reproduces it, and clearing them makes it go away. Fix: emit proxy variables only when a proxy is actually in play - a managed proxy is configured, or the current process already carries a proxy variable (where the loopback bypass list is still useful). Otherwise return no pairs, so the managed launch matches a manual launch exactly. Verified with cargo check -p cockpit-tools --lib on top of upstream/main deacbe4. cargo test cannot run in this environment (lib test binary aborts with STATUS_ENTRYPOINT_NOT_FOUND), so no unit test is added.
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.
问题
managed_proxy_env_pairs()在global_proxy_enabled == false时,仍然追加了本机直连白名单(
no_proxy/NO_PROXY)。结果是:每一次"受管启动"都给子进程塞了一份"手动启动"永远不会有的环境变量。对 Antigravity IDE 而言,这会打断渲染进程与本机 Language Server 之间的通信通道:
[unknown] Failed to fetch: ConnectErrorstreamGenerateContent == 0)(用户只能关闭再重新打开 IDE 才能恢复)
复现
同一账户、同一状态数据库,唯一变量是启动方式:
在启动同一个 IDE 二进制之前仅注入
no_proxy/NO_PROXY,就足以复现该故障;清除这两个变量后故障即消失。
--reuse-window参数与 Chromium net-log 抓包这两个变量,均已被同一组对照实验排除。
修复
只有在"确实存在代理"时才输出代理相关环境变量:
除此之外直接返回空列表,使受管启动与手动启动的环境逐位一致。
验证
在
upstream/main(deacbe44)之上执行cargo check -p cockpit-tools --lib通过。说明:本机无法运行
cargo test—— lib 单元测试可执行文件启动即中止,报
STATUS_ENTRYPOINT_NOT_FOUND(缺少 comctl32 v6 manifest)。因此本次未添加单元测试。
Problem
managed_proxy_env_pairs()appends the loopback bypass list (no_proxy/NO_PROXY)even when
global_proxy_enabled == false. As a result, every managed launch passes thechild an environment that a manually launched app never has.
For Antigravity IDE this breaks the channel between the renderer and the local
language server:
[unknown] Failed to fetch: ConnectErrorstreamGenerateContent == 0)(the user must close and reopen the IDE to recover)
Reproduction
Same account, same state DB — only the launch path differs:
Injecting only
no_proxy/NO_PROXYbefore starting the same IDE binary isenough to reproduce it; clearing them makes it disappear. The
--reuse-windowflagand Chromium net-log capture were both ruled out by the same experiment matrix.
Fix
Emit proxy variables only when a proxy is actually in play:
list is still useful)
Otherwise return an empty list, so a managed launch is byte-for-byte identical
to a manual launch.
Verification
cargo check -p cockpit-tools --libon top ofupstream/main(deacbe44) passes.Note:
cargo testcannot run in the authoring environment — the lib test binaryaborts immediately with
STATUS_ENTRYPOINT_NOT_FOUND(missing comctl32 v6 manifest).No unit test is added for that reason.