Repository navigation
fix(antigravity): detect installed client version for GUI quota requests - #2900
Merged
jlcodes99 merged 1 commit intoOct 27, 2026
Merged
Conversation
moyuan10086
marked this pull request as ready for review
October 24, 2026 02:22
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.
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 resolveproduct.json/Info.plist, including a configuredagy.exelaunch path with an ASAR-based desktop installation.In a same-account comparison against
retrieveUserQuotaSummary, both requests returned HTTP 200: the1.20.5User-Agent returned only3p-weekly/3p-5h, while the installed2.17.0version also returnedgemini-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:
1.20.5before the fix and passed with2.17.0after it.git diff --checkpasses. 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-runcompleted successfully on Windows (the upstream test target emitted existing warnings). Starting the resulting GUI test executable failed before test execution with Windows loader status0xC0000139(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.