Skip to content

fix(app): keep backend_binary_path cmd.exe-launchable on Windows - #887

Merged
kaizhou-lab merged 1 commit into
mainfrom
fix/antigravity-hook-verbatim-path
Aug 19, 2026
Merged

fix(app): keep backend_binary_path cmd.exe-launchable on Windows#887
kaizhou-lab merged 1 commit into
mainfrom
fix/antigravity-hook-verbatim-path

Conversation

@kaizhou-lab

Copy link
Copy Markdown
Contributor

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_path resolves the backend binary with std::fs::canonicalize, which on Windows returns a \\?\-prefixed verbatim path. That path is embedded into agent-facing command lines:

  • the Antigravity PreToolUse permission hook: .agents/hooks.json gets command: "\\?\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 surfaces UNKNOWN_UPSTREAM_ERROR.
  • the team MCP stdio server spec: <backend_binary_path> mcp-team-stdio (session.rs::mcp_stdio_configsession_agent.rs::team_mcp_server_spec / acp_assembler.rs::team_mcp_server), spawned the same way by agent CLIs — the #4062 comment shows the identical is not recognized failure there.

Fix

Resolve the backend binary with dunce::canonicalize instead: 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 of backend_binary_path.

Testing

  • New regression test backend_binary_path_never_carries_a_windows_verbatim_prefix goes 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 --check all pass.

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
kaizhou-lab enabled auto-merge (squash) August 19, 2026 07:35
@kaizhou-lab
kaizhou-lab merged commit c8bbde6 into main Aug 19, 2026
5 of 6 checks passed
@kaizhou-lab
kaizhou-lab deleted the fix/antigravity-hook-verbatim-path branch August 19, 2026 07:49
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>
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