Skip to content

fix(antigravity): detect installed client version for GUI quota requests - #2900

Merged
jlcodes99 merged 1 commit into
jlcodes99:mainfrom
moyuan10086:fix/antigravity-quota-client-version
Oct 27, 2026
Merged

jlcodes99 merged 1 commit into
jlcodes99:mainfrom
moyuan10086:fix/antigravity-quota-client-version

Conversation

@moyuan10086

@moyuan10086 moyuan10086 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

On Windows, an installed Antigravity 2.x app can show its correct version in the GUI badge while quota requests still send antigravity/1.20.5. This happens when the wakeup metadata reader cannot resolve product.json/Info.plist, including a configured agy.exe launch path with an ASAR-based desktop installation.

In a same-account comparison against retrieveUserQuotaSummary, both requests returned HTTP 200: the 1.20.5 User-Agent returned only 3p-weekly/3p-5h, while the installed 2.17.0 version also returned gemini-weekly/gemini-5h.

The GUI quota resolver now falls back to the existing installed-version detector used by the badge, including Windows executable VersionInfo, before using the compatibility default. Detection is lazy and reuses the existing cache. Explicit version overrides and successfully read legacy metadata keep their existing priority. Both quota User-Agent builders and the CloudCode metadata share this resolver.

Related: #2832 and #2838. This patch addresses GUI installed-version discovery; it does not change the fallback version or the standalone core/CLI implementation.

Validation:

  • Four new selection regressions cover missing wakeup metadata, whitespace, legacy/explicit precedence, and unavailable installed metadata. The missing-metadata regression failed with 1.20.5 before the fix and passed with 2.17.0 after it.
  • The four regressions passed in a standalone Rust harness using the production helper and repository tests.
  • New/changed Rust sections pass rustfmt; git diff --check passes. The upstream file already has unrelated rustfmt differences, which are left intact.
  • cargo test -p cockpit-tools --lib modules::quota::tests --no-default-features --no-run completed successfully on Windows (the upstream test target emitted existing warnings). Starting the resulting GUI test executable failed before test execution with Windows loader status 0xC0000139 (entry point not found), including with a minimal Windows-only PATH. The four new tests were therefore executed separately in the standalone harness described above; the full GUI test executable was not run successfully.

The existing installed-version cache retains its current process-lifetime behavior. This patch does not introduce cache invalidation for in-process app updates/path changes or establish Linux ASAR detection.

@moyuan10086
moyuan10086 marked this pull request as ready for review October 24, 2026 02:22
@jlcodes99
jlcodes99 merged commit aa46f10 into jlcodes99:main Oct 27, 2026
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.

2 participants