Repository navigation
fix(antigravity): discover projectId during token refresh - #8842
Merged
diegosouzapw merged 3 commits intoJul 28, 2026
Merged
diegosouzapw merged 3 commits into
diegosouzapw merged 3 commits into
Conversation
The initial OAuth exchange can fail to populate projectId via loadCodeAssist (network timeout, account not yet onboarded). The runtime transformRequest path already recovers via ensureAntigravityProjectAssigned, but refreshCredentials did not -- after a token refresh the per-token memoization cache is invalidated (new access token = new cache key), so every subsequent request triggers a fresh loadCodeAssist round-trip that may fail again. Add a best-effort ensureAntigravityProjectAssigned call in refreshCredentials when projectId is empty, mirroring the pattern in transformRequest. Persist the discovered id so it survives the next refresh or restart. Signed-off-by: Minxi Hou <houminxi@gmail.com>
antigravity.ts grew from 1493 to 1528 lines (+35) with projectId discovery in refreshCredentials. executor-antigravity.test.ts is a new test file at 1098 lines (above cap 1000) with 4 new test cases. Signed-off-by: Minxi Hou <houminxi@gmail.com>
`ExecutorLog.info` (open-sse/executors/base.ts) is `(tag, message) => void` — two parameters. The discovery log passed a third metadata object, which failed typecheck:core with TS2554 on antigravity.ts:777. Bind the message to a local and pass two arguments, matching the sibling warn on the catch branch. Kept to two lines so the file stays at its frozen size; ran Prettier, which also wrapped the pre-existing over-width `const msg` line below. Also adds the changelog fragment for the fix. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
force-pushed
the
fix/antigravity-projectid-refresh
branch
from
July 28, 2026 12:06
7aa375f to
9e8a771
Compare
diegosouzapw
merged commit Jul 28, 2026
38cee62
into
diegosouzapw:release/v3.8.49
15 of 16 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Jul 28, 2026
…e lost credits Aggregates every pending changelog.d fragment into the [3.8.49] section and regenerates the contributors table from the reconciled bullets. Three fixes this surfaced: - The [3.8.49] section had no `### 📝 Maintenance` heading, so the aggregator's findIndex matched the first one in the file — inside [3.8.47] — and would have filed 92 maintenance bullets under the wrong release. Added the heading to the living section; [3.8.47] stays at its original 234 bullets. - 46 bullets carried no PR/issue reference. Fragments may keep the number only in the filename (`<N>-slug.md`), which the aggregator does not copy into the bullet, so the link and the credit were dropped on aggregation. Restored, scoped strictly to the [3.8.49] range. - 9 external contributors lost their attribution that way and are credited again: @MisileLab (#8566), @MumuTW (#8619), @epsilonode (#8724), @hppsc1215 (#8835), @sumanxg (#8837, #8856), @TitoTFP (#8838), @HouMinXi (#8842, #8845). Contributors table: 84 → 155 entries, no one removed. 42 i18n mirrors synced. check:changelog-integrity green — no base bullet lost.
Merged
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…pw#8842) * fix(antigravity): discover projectId during token refresh The initial OAuth exchange can fail to populate projectId via loadCodeAssist (network timeout, account not yet onboarded). The runtime transformRequest path already recovers via ensureAntigravityProjectAssigned, but refreshCredentials did not -- after a token refresh the per-token memoization cache is invalidated (new access token = new cache key), so every subsequent request triggers a fresh loadCodeAssist round-trip that may fail again. Add a best-effort ensureAntigravityProjectAssigned call in refreshCredentials when projectId is empty, mirroring the pattern in transformRequest. Persist the discovered id so it survives the next refresh or restart. Signed-off-by: Minxi Hou <houminxi@gmail.com> * chore(quality): rebaseline antigravity.ts and test file-size antigravity.ts grew from 1493 to 1528 lines (+35) with projectId discovery in refreshCredentials. executor-antigravity.test.ts is a new test file at 1098 lines (above cap 1000) with 4 new test cases. Signed-off-by: Minxi Hou <houminxi@gmail.com> * fix(antigravity): match ExecutorLog arity in the refresh discovery log `ExecutorLog.info` (open-sse/executors/base.ts) is `(tag, message) => void` — two parameters. The discovery log passed a third metadata object, which failed typecheck:core with TS2554 on antigravity.ts:777. Bind the message to a local and pass two arguments, matching the sibling warn on the catch branch. Kept to two lines so the file stays at its frozen size; ran Prettier, which also wrapped the pre-existing over-width `const msg` line below. Also adds the changelog fragment for the fix. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Signed-off-by: Minxi Hou <houminxi@gmail.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…e lost credits Aggregates every pending changelog.d fragment into the [3.8.49] section and regenerates the contributors table from the reconciled bullets. Three fixes this surfaced: - The [3.8.49] section had no `### 📝 Maintenance` heading, so the aggregator's findIndex matched the first one in the file — inside [3.8.47] — and would have filed 92 maintenance bullets under the wrong release. Added the heading to the living section; [3.8.47] stays at its original 234 bullets. - 46 bullets carried no PR/issue reference. Fragments may keep the number only in the filename (`<N>-slug.md`), which the aggregator does not copy into the bullet, so the link and the credit were dropped on aggregation. Restored, scoped strictly to the [3.8.49] range. - 9 external contributors lost their attribution that way and are credited again: @MisileLab (diegosouzapw#8566), @MumuTW (diegosouzapw#8619), @epsilonode (diegosouzapw#8724), @hppsc1215 (diegosouzapw#8835), @sumanxg (diegosouzapw#8837, diegosouzapw#8856), @TitoTFP (diegosouzapw#8838), @HouMinXi (diegosouzapw#8842, diegosouzapw#8845). Contributors table: 84 → 155 entries, no one removed. 42 i18n mirrors synced. check:changelog-integrity green — no base bullet lost.
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.
What
Discover missing projectId during Antigravity token refresh. When the initial OAuth exchange fails to populate projectId via loadCodeAssist (network timeout, account not yet onboarded to Gemini Code Assist), the stored projectId is empty. The runtime
transformRequestpath already recovers viaensureAntigravityProjectAssigned, butrefreshCredentialsdid not -- after a token refresh the per-token memoization cache is invalidated (new access token = new cache key), so every subsequent request triggers a fresh loadCodeAssist round-trip that may fail again, resulting in 422 errors.Why
3/4 agy accounts in our deployment had empty projectId after OAuth. The422 error message is:
Root cause: the initial exchange's loadCodeAssist call failed silently, and the refresh path never re-attempted discovery.
How
Add a best-effort
ensureAntigravityProjectAssignedcall inrefreshCredentialswhen projectId is empty, mirroring the existing pattern intransformRequest(antigravity.ts:538-555):ensureAntigravityProjectAssignedwith the new access token and an8s timeoutpersistDiscoveredAntigravityProjectIdTests
4 new test cases in
executor-antigravity.test.ts:All5 refreshCredentials tests pass (1 existing + 4 new).
Related