fix(app): keep backend_binary_path cmd.exe-launchable on Windows - #887
Merged
Conversation
std::fs::canonicalize returns a \\?\-prefixed verbatim path on Windows. That path is embedded into agent-facing command lines — antigravity's .agents/hooks.json PreToolUse hook and the team MCP stdio server spec — which agent CLIs execute through cmd.exe, and cmd.exe cannot launch \\?\-prefixed programs. Every antigravity tool call then fails with UNKNOWN_UPSTREAM_ERROR. Resolve the backend binary with dunce::canonicalize instead: same symlink resolution, but the plain drive-letter form whenever the path is representable without the prefix. Refs iOfficeAI/AionUi#4095, iOfficeAI/AionUi#4062.
kaizhou-lab
enabled auto-merge (squash)
August 19, 2026 07:35
kaizhou-lab
added a commit
that referenced
this pull request
Aug 19, 2026
## Problem `h2 0.4.14` is flagged by [RUSTSEC-2026-0258](https://rustsec.org/advisories/RUSTSEC-2026-0258) (*h2 unbounded empty DATA frames*, published 2026-08-17, fixed in >=0.4.16). `cargo audit` exits non-zero on it, so the **Security Audit** job fails on every PR opened since the advisory landed (e.g. #887 / #888 — all other checks green, unrelated to their changes). ## Fix `cargo update h2 --precise 0.4.16` — lock-only, no manifest changes. The accompanying `windows-sys` edge changes in `Cargo.lock` are the pinned cargo 1.95.0 normalizing wide-range dependency edges (rustix, tempfile, socket2, winapi-util, …) during re-resolution; no crate version changes besides h2. Landing the normalized form once stops it reappearing in every future lock touch. ## Verification - `cargo tree -p h2` resolves cleanly to 0.4.16. - The advisory's fixed range is exactly `>=0.4.16`; the remaining audit findings (anyhow/event-listener/lru) are `unsound` warnings, which do not fail the job. - Full CI validates the workspace against the updated lock. Co-authored-by: zk <>
kaizhou-lab
pushed a commit
that referenced
this pull request
Aug 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.70](v0.1.69...v0.1.70) (2026-08-19) ### Features * **monitor:** add fs/createFile command ([#891](#891)) ([19c7837](19c7837)) * **monitor:** back explorer drag-transfer with fs/copy and fs/move ([#877](#877)) ([85670aa](85670aa)) * **session:** distinguish Task subagents from background tasks ([#890](#890)) ([a978cf7](a978cf7)) ### Bug Fixes * **agent:** pair native media blocks with a link to the same file ([#876](#876)) ([da91f82](da91f82)) * **antigravity:** collapse agy's U+FFFD runs at text_delta joins ([#888](#888)) ([0324fa9](0324fa9)) * **antigravity:** route Team over the CLI, which is what agy was already using ([#881](#881)) ([70781cc](70781cc)) * **app:** bound the graceful-shutdown tail so the data-dir instance lock is released ([#884](#884)) ([1e20ab4](1e20ab4)) * **app:** harden the shutdown watchdog force-exit path ([679f34d](679f34d)) * **app:** harden the shutdown watchdog force-exit path ([d94b574](d94b574)) * **app:** keep backend_binary_path cmd.exe-launchable on Windows ([#887](#887)) ([c8bbde6](c8bbde6)) * **app:** reuse the app-level ConversationService in build_cron_state ([#885](#885)) ([9182eaa](9182eaa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Problem
On Windows, any tool call in an Antigravity conversation fails with
UNKNOWN_UPSTREAM_ERROR. Reported in iOfficeAI/AionUi#4095, and the same failure mode was independently observed for the team MCP command line in an iOfficeAI/AionUi#4062 comment.AppServices::from_config_with_backend_binary_pathresolves the backend binary withstd::fs::canonicalize, which on Windows returns a\\?\-prefixed verbatim path. That path is embedded into agent-facing command lines:.agents/hooks.jsongetscommand: "\\?\C:\...\aioncore.exe" antigravity-hook(antigravity_hook.rs::hooks_json_body). The stderr in the report shows the hook command being executed through cmd.exe, which cannot launch\\?\-prefixed programs — so the hook fails on every tool call and the turn surfacesUNKNOWN_UPSTREAM_ERROR.<backend_binary_path> mcp-team-stdio(session.rs::mcp_stdio_config→session_agent.rs::team_mcp_server_spec/acp_assembler.rs::team_mcp_server), spawned the same way by agent CLIs — the #4062 comment shows the identicalis not recognizedfailure there.Fix
Resolve the backend binary with
dunce::canonicalizeinstead: identical symlink resolution, but it keeps the plain drive-letter form whenever the path is representable without the verbatim prefix (falling back to verbatim only where genuinely required, e.g. over-long paths). Fixing the single construction site covers every downstream consumer ofbackend_binary_path.Testing
backend_binary_path_never_carries_a_windows_verbatim_prefixgoes through the real constructor and asserts the resolved path stays absolute and free of\\?\. CI runs on ubuntu, where the assertion is trivially true; on Windows machines it exercises the actual regression.cargo test -p aionui-app(targeted),cargo clippy -p aionui-app -- -D warnings,cargo fmt --checkall pass.