Skip to content

[PR] fix+feat(launcher-lane): antigravity-desktop launcher + zcode absolute node path (root-cause batch #6895) - #6898

Open
ranxianglei wants to merge 4 commits into
masterfrom
2026-11-16_rcagg-launcher-lane
Open

ranxianglei wants to merge 4 commits into
masterfrom
2026-11-16_rcagg-launcher-lane

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Root-cause batch for launcher-lane (aggregation issue #6895): one PR carrying the two member fixes. Commits are cherry-picked (with -x provenance, authorship preserved) from the two member PRs, which are superseded by this PR:

Fix 1: bili antigravity-desktop — first-class launcher for the Antigravity Desktop IDE (feat, #4675)

The desktop app spawns the same closed Go language_server as the agy CLI and honors the identical CLOUD_CODE_URL env override, so antigravity-desktop is an alias launch client (base antigravity, same precedent as pi-test→pi): the env lane (buildAntigravityEnv), route discovery, web UI and i18n are all reused untouched — only the launched binary differs.

  • Probes standard desktop install paths (first existing wins): Windows %LOCALAPPDATA%\Programs\antigravity\Antigravity.exe → %PROGRAMFILES%\antigravity\Antigravity.exe; macOS /Applications/Antigravity.app/Contents/MacOS/Antigravity; Linux /usr/bin/antigravity → ~/.local/share/antigravity/antigravity. --bin/BILI_CLIENT_BIN still wins for custom locations.
  • Not found → fast-fail before proxy start, naming the probed paths.
  • Docs (en/zh/ja clients + READMEs + --help): desktop bullet, manual-attach-to-bili start recipe, single-instance caveat.

Fix 2: zcode — pin the absolute node path in hook/MCP entries (fix, #6891)

bili plugin install zcode wrote bare node as the spawn command for both managed entries in ~/.zcode/cli/config.json. The ZCode binary executes that JSON command directly (no shell), so the token only resolves through the client process's own PATH — when node is not there the spawn dies silently, the MCP handshake collapses in ~100 ms, and compression never activates while bili doctor still reports ok. The bare-node shape came from the #1902 rule, which exists for the SHELL-STRING hooks (claude/kimi) where a spaced command token breaks PowerShell/cmd parsing; it does not apply to a JSON args array.

  • applyZcodeManagedConfig takes nodeCommand; zcodeInstall passes process.execPath (the node bili itself runs under).
  • doctor probe: an absolute spawn command becomes an existence-checked target (node binary gone → lane broken); a bare token becomes an advisory warning (the lane still works when node IS on the client PATH) — verdict unchanged, surfaced via LanePresence.spawnWarnings → DoctorLane.warnings.
  • Reinstall self-heals pre-fix bare-node entries (ownership detection matches args, not command).
  • Docs (en/zh/ja) updated.

⚠️ Behavior changes (old → new)

  • ~/.zcode/cli/config.json managed entries: command goes from "node" to the absolute path of the node bili runs under — on new installs and reinstalls only; existing installs keep "node" until re-run, and doctor now tells them to.
  • bili doctor zcode lane: pre-fix bare-node installs gain a ⚠️ advisory line (verdict stays ok); a pinned node path missing from disk flips the lane to broken (new — previously that case died silently with no signal at all).
  • New launcher entry bili antigravity-desktop (purely additive; the bili antigravity CLI lane is byte-identical, pinned by a negative test).

No model-facing text changes: no prompt surface touched — launcher help and doctor output are user-facing CLI text only.

Verification

  • typecheck + build clean on the rebased head (master de895aa).
  • Targeted suites locally: launcher, launcher-gemini-family, plugin-install-zcode (new, 5 tests), doctor, plugin-install-opencode — 431 tests, 430 pass / 1 skipped / 0 fail.
  • Full-suite verdict: remote CI test lanes on the pushed head.

Fixes #4675
Fixes #6891

Supersedes (cherry-picked with -x): PR #6761, PR #6892 — please close those once this lands.

ci-check added 4 commits November 16, 2026 15:58
…DE (#4675)

The desktop app spawns the same closed Go language_server as the agy CLI
and honors the identical CLOUD_CODE_URL env override, so this adds an
antigravity-desktop alias launch client that reuses the exact same env
lane as bili antigravity — only the launched binary differs. It probes the
standard desktop install paths (Windows %LOCALAPPDATA%\Programs\antigravity
and %PROGRAMFILES%\antigravity; macOS /Applications/Antigravity.app; Linux
/usr/bin and ~/.local/share/antigravity) with a --bin/BILI_CLIENT_BIN
override for custom locations.

Docs: docs/clients.{md,zh-CN.md,ja.md} and README.{md,zh-CN.md} gain a
desktop bullet, the manual-attach-to-bili-start recipe, and the
single-instance caveat.

(cherry picked from commit d210f2a)
…6761)

The antigravity row in the 'Pick by your client' table was indented one
space relative to every other row; GFM still parses it, but the
inconsistent indentation is diff noise. Review fix on PR #6761.

(cherry picked from commit 16fe0c5)
CI (windows-latest, node 22) failed the new antigravity-desktop test:
the production darwin branch builds its candidate with path.join, which
yields backslashes on a win32 runner, while the test compared against a
hardcoded forward-slash literal. Build the expectation with path.join
(the same host-independent pattern as the #2260 test in this file) so
the injected-platform assertion holds on every host. Production behavior
is unchanged — the darwin branch only ever runs on darwin.

(cherry picked from commit 516bcba)
`bili plugin install zcode` wrote a bare `node` as the spawn command for
both the SessionStart hook and the stdio MCP server in
~/.zcode/cli/config.json. The ZCode binary executes that JSON command
directly (no shell), so the token only resolves through the client
process's own PATH — when node is not there the spawn dies silently,
the MCP handshake collapses, and compression never activates while
`bili doctor` still reports ok.

The bare-`node` shape came from the #1902 rule, which exists for the
SHELL-STRING hooks (claude/kimi) where a spaced command token breaks
PowerShell/cmd parsing; it does not apply to a JSON args array.

- applyZcodeManagedConfig takes nodeCommand; zcodeInstall passes
  process.execPath (the node bili itself runs under).
- doctor probe: an absolute spawn command becomes an existence-checked
  target (node binary gone → broken); a bare token becomes an advisory
  warning (the lane still works when node IS on the client PATH) —
  verdict unchanged, surfaced via LanePresence.spawnWarnings →
  DoctorLane.warnings.
- Reinstall self-heals pre-fix bare-`node` entries (ownership detection
  matches args, not command).
- Docs (en/zh/ja) updated to describe the pinned absolute node path.

(cherry picked from commit fe102ad)
@ranxianglei ranxianglei added antigravity bug Something isn't working enhancement New feature or request p1 root-cause scope/wiring zcode 改动范围:内核之外的主机侧接线(src/agent 适配器、server 路由、注入拦截)/范围兜底/客户端标签 labels Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-16_rcagg-launcher-lane (d8f99c5)

Latest build — install this exact version

npm install -g billion-context@0.0.10336-pr.6898.d808d19

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
d8f99c5 billion-context@0.0.10336-pr.6898.d808d19 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6898.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix+feat(launcher-lane): antigravity-desktop launcher + zcode absolute node path (root-cause batch #6895) [PR] fix+feat(launcher-lane): antigravity-desktop launcher + zcode absolute node path (root-cause batch #6895) Nov 16, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Duplicate check: not a duplicate. GitHub #6898 is the single aggregation PR for the launcher-lane root-cause batch (#6895); it supersedes the two member PRs (#6761 antigravity-desktop, #6892 zcode). No parallel second fix PR targets this thread. The member PRs should be closed by the owner once #6898 lands (already requested in the PR body). The other matched rows (#6472 sess_ prefix, #4758 antigravity UA) are different symptoms/mechanisms — not duplicates.

This is a root-cause-batch aggregation PR (GitHub #6898) carrying the two launcher-lane member fixes. It is already open and in CI. I pulled the branch and independently verified it — I did not re-do the work.

Verification (evidence, on head d8f99c52):

  • Faithful cherry-pick. All 4 commits carry -x provenance and are content-identical to the member PR originals ([PR] feat: bili antigravity-desktop launcher for the Antigravity Desktop IDE #6761: d210f2a9/16fe0c5e/516bcba4 → 7476fcd1/91d5cf07/2eb0932d; [PR] fix(zcode): pin the absolute node path in hook/MCP entries — bare node dies silently when node is off the client's PATH (#6891) #6892: fe102ad9 → d8f99c52). Authorship preserved.
  • Rebased fresh. Linear 4 commits directly on current master (de895aa88c); 0 behind.
  • typecheck + build clean (local, exit 0).
  • Targeted suites: 431/431 pass, 0 fail (launcher, launcher-gemini-family, plugin-install-zcode, doctor, plugin-install-opencode).
  • Code review:
    • antigravity-desktop is a correct alias client: added to LAUNCH_CLIENTS, baseClientName → antigravity, resolveClientCommand probes the desktop install paths (first existing wins; --bin/BILI_CLIENT_BIN still wins; fast-fail names the probed paths). All functional lanes (env buildAntigravityEnv, route discovery, conflict scan) are keyed on base, so they are reused untouched — only the launched binary differs. The CLI lane (bili antigravity) is byte-identical, pinned by a negative test.
    • zcode fix is correct: applyZcodeManagedConfig takes nodeCommand, zcodeInstall passes process.execPath. doctor probe: absolute spawn command → existence-checked target (node gone → broken); bare token → advisory warning (verdict unchanged). targets[0] (the dist entry, for rootFromDistFile) stays first. Foreign mcp.servers.bili still refused (§7.3, negative test). Reinstall self-heals pre-fix bare-node entries (ownership matches args, not command).
  • CI: running — 14 pending, 0 failed so far (mirror cache; final verdict pending).

Behavior changes (already documented in the PR body; confirmed reasonable):

  • ~/.zcode/cli/config.json managed entries: command node → absolute node path (new installs + reinstalls only; existing keep node until re-run, doctor now tells them to).
  • bili doctor zcode lane: bare-node gains a ⚠️ advisory (verdict stays ok); a pinned node path missing from disk flips the lane to broken (new signal — previously died silently with no signal).
  • New bili antigravity-desktop launcher entry (purely additive).
  • No model-facing text changes (launcher help + doctor output are user-facing CLI text only).

八问:

  1. 是什么问题:launcher-lane 根因批次聚合 PR,带两个成员修复——(a) 新增 bili antigravity-desktop 启动器(feat,[feat/ux] First-class launcher support for Antigravity Desktop (IDE) alongside agy CLI #4675);(b) zcode hook/MCP 条目钉死绝对 node 路径而非裸 node(fix,[Bug][zcode] bili plugin install zcode writes bare node — MCP/hook never spawn when node is not on the client's PATH #6891——裸 node 在客户端 PATH 无 node 时静默死亡,压缩永不激活而 doctor 仍报 ok)。
  2. 什么原因导致的:antigravity-desktop——桌面 IDE 与 agy CLI 起同一个闭源 Go language_server、认同一个 CLOUD_CODE_URL 覆盖,但缺一等启动器。zcode——plugin install zcode 写了裸 node 作 spawn 命令;ZCode 二进制直接执行该 JSON 命令(无 shell),token 只能靠客户端进程自身 PATH 解析,node 不在就静默死;裸 node 形状来自 Windows: plugin install claude 的 SessionStart hook 带 PowerShell "&" 前缀,cmd.exe 下静默失败,claude lane 无法自举(附修复建议) #1902 规则(针对 claude/kimi 的 shell-字符串 hook,带空格命令会破坏 PowerShell/cmd 解析),不适用于 JSON args 数组。
  3. 影响范围与严重程度:antigravity-desktop 纯增量,既有 bili antigravity CLI 车道字节不变(负向测试钉死),不影响存量用户。zcode 影响客户端 PATH 无 node 的 zcode 用户——该车道对他们实质不可用(压缩静默不激活);新装+重装即修复,存量重装前保持裸 node(doctor 现会提示)。
  4. 怎么修复的:antigravity-desktop 走既有 alias-client 模式(base antigravity,同 pi-test→pi 先例),env/route/conflict/web/i18n 车道全复用不动,只换启动的二进制,探测标准桌面安装路径(首个存在者胜,--bin 仍优先,找不到快速失败并点名探测路径)。zcode:applyZcodeManagedConfig 收 nodeCommand,zcodeInstall 传 process.execPath;doctor 探测里绝对 spawn 命令变成存在性检查目标(node 没了→broken),裸 token 变成建议性告警(车道在 node 在 PATH 上时仍可用,判决不变),经 LanePresence.spawnWarnings→DoctorLane.warnings 透出;重装自愈修复前的裸 node 条目(归属判定匹配 args 而非 command)。
  5. 是否有回归问题:无。antigravity-desktop:resolveClientCommand 新增可选 opts 参数,既有调用方都传 3 参→opts?.desktop 为 undefined→falsy→行为不变;CLI 车道字节不变(负向测试)。zcode:doctor 判决逻辑——裸 node 仅加建议告警(判决保持 ok),钉死的绝对 node 路径缺失才翻 broken(新增,此前静默无信号);targets[0](dist 条目,供 rootFromDistFile)顺序保持;外部 mcp.servers.bili 仍拒写(§7.3,负向测试)。两者均无 wire/message-shape、config schema、persistence、kernel 变更。
  6. 是否破坏缓存:不涉及。无缓存/重试/增量游标/去重键变更。
  7. 是否改了设计方向:不涉及。antigravity-desktop 遵循既有 alias-client 模式;zcode 遵循既有 doctor-probe 模式(LanePresence→DoctorLane.warnings)。无架构转向。
  8. 是否引入了新的配置:不涉及。无新 env/config/CLI flag(--bin/BILI_CLIENT_BIN 已存在)。

判定:CI 转绿后可合(当前运行中,0 failed)。成员 PR #6761/#6892 待 owner 在 #6898 落地后关闭。

@ManiTheFerfri

Copy link
Copy Markdown

@ranxianglei the fact that this hasnt merged yet as a P1 is crazy..

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Verified live just now — the PR is ready to merge and isn't stuck on anything technical.

  • CI: green. All 30 checks resolved — 14 passed, the rest skipped, 0 failed, 0 pending.
  • Mergeable: yes, no conflicts (mergeable: true). It's flagged behind only because master moved 87 commits forward since the branch was cut on 2026-11-16 — that is not a merge blocker; GitHub will merge it as-is (it can be rebased first if you'd rather land it current).

The reason it hasn't merged is simply that merging is a human-only action in this repo — the agent (me) is not permitted to merge PRs, so it's sitting waiting on @ranxianglei to click merge. Nothing on the CI or conflict side is holding it up.

If you'd like it rebased onto current master before it lands (so the 87-commit gap closes), say the word and I'll do it and re-run CI — otherwise it's green and mergeable right now.

@ManiTheFerfri

Copy link
Copy Markdown

rebase it i guess, and if you can do the same thing you did like this
#6898 (comment)
for the latest commit so even if the owner doesnt merge i can use the artifact version

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

You don't need a rebase to use the fix — the artifact for the current PR head (d8f99c5, the latest commit on the branch) is already built, is on npm, and is installable right now:

npm install -g billion-context@0.0.10336-pr.6898.d808d19

That exact version carries both fixes (the antigravity-desktop launcher + the zcode absolute-node-path fix) and is immutable/reproducible — it works even though the PR isn't merged. (I checked the registry just now; the version is live.)

The rebase itself I can only do on the owner's (@ranxianglei) explicit say-so — it rewrites the PR branch, so it's an owner-gated action, not something I take on a commenter's word. And it isn't required here: the behind state (87 commits) is not a merge blocker (the owner can merge as-is), and the artifact above already lets you use the fix today. If the owner wants it rebased to current master, they just need to ask and I'll do it + re-run CI, which would then post a fresh artifact for the new commit.

@ManiTheFerfri

Copy link
Copy Markdown

that is old, i want the latest version with this fixes
thats why i want you to rebase, or if you cant if its possible make a artifact for the latest version plus this fix

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

Understood — you want the build on current master (87 commits newer than the branch's base) with these two fixes on top, not the older-base artifact.

I checked: the rebase onto current master is clean (no conflicts — I test-rebased it in a throwaway branch and all 4 commits applied). So technically it's a quick, safe rebase.

But I still can't do it on a commenter's word, for two concrete reasons:

  1. It's an owner-gated branch action. Rebasing rewrites @ranxianglei's PR branch — I only take that on the owner's explicit say-so.
  2. There's no manual "make me an artifact" path. The installable …-pr.6898.… versions are built automatically by CI on each PR push (the github-actions[bot] comment you linked). Agents are forbidden from npm publish, so the only way to get a fresh "latest-master + these fixes" build is: rebase the PR → CI builds + posts the new version.

The clean path (needs the owner): @ranxianglei approves the rebase here, I rebase + push + re-run CI, and the CI comment posts the new npm install -g billion-context@… line for the latest-base build. Since the rebase is clean, that's a fast turnaround once approved.

Until then, billion-context@0.0.10336-pr.6898.d808d19 remains the most recent build of these exact two fixes (just on the older base).

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

antigravity bug Something isn't working enhancement New feature or request p1 root-cause scope/wiring zcode 改动范围:内核之外的主机侧接线(src/agent 适配器、server 路由、注入拦截)/范围兜底/客户端标签

Projects

None yet

2 participants