Repository navigation
Conversation
A 403 whose body says an account is not eligible for Gemini Code Assist carries neither account_ineligible nor validation_required, so it was classed as an ordinary error. The account was never marked ineligible, never disabled and never rotated away from; the request fell through to shouldRetryEndpoint and was retried on the same account until the retry budget ran out, while usable accounts idled. Match the refusal sentence Google actually returns, alongside the existing machine-readable token. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
The bare /18 years old or older/ alternative could match an unrelated 403 that merely mentions an age requirement, and would then disable an account and rotate away from it. Require the phrase to appear alongside the product name, in either order. Adds two cases: an unrelated age-mentioning 403 is left alone, and the age sentence is still detected when it names the product in either order. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
The block claimed every alternative was anchored to Gemini context, but the token is deliberately matched anywhere, and the age alternative requires the product name on the same line rather than merely somewhere in the same body. Comment only; no behaviour change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for supplying the actual refusal wording, and for guarding against the privacy-notice false positive. Current main only recognizes the machine-readable eligibility code, so matching the explicit "not eligible for Gemini Code Assist" text fixes a real gap. The patch merges cleanly, the access and quota suites pass, and typecheck passes. Before we merge, could you make three changes?
|
Problem
A
403eligibility refusal is never detected, so the account is retried instead of disabled.Google returns this when a request reaches the Gemini Code Assist individuals tier instead of a provisioned managed project — which happens whenever the plugin falls back to
rising-fact-p41fc(ANTIGRAVITY_DEFAULT_PROJECT_ID):That body contains neither
account_ineligiblenorvalidation_required, soextractAccountAccessErrorDetailsreports both asfalse. In the live request path that means neither branch inrequest-services.tsmatches:markAccountIneligibleis never called, so the pool keeps no record of the failure and cannot route around it. The user sees an intermittent403while usable accounts sit idle. Note the asymmetry:validation_requiredis matched on a token Google does send; the eligibility refusal is matched on a token Google does not send.Fix
Match the refusal sentence Google actually returns, alongside the existing token:
Used in both places the token was tested (the top-level body and the per-string walk), so the probe path in
interpretAccountAccessProbeResponseand the live request path agree.Why the patterns are anchored
A bare substring is a trap here. A healthy
200loadCodeAssistresponse embeds a privacy notice containing:A
/age/pattern matches that, and an earlier revision of this fix did exactly that — classifying 26/26 working accounts as ineligible. Each pattern is therefore anchored to refusal phrasing, and a regression test pins the healthy-response case.Tests
account-access.test.tsgains 6 cases:messagefield)200response with the privacy notice is not flaggedvalidation_requiredstill reported without claiming ineligibilityVerified the new cases actually catch the defect: reverting the fix to token-only matching fails
detects Google's human-readable individuals-tier refusal.Impact
Every user with a multi-account pool on
round-robinorhybrid. The symptom is intermittent and resembles quota trouble, so it is hard to attribute. On the reporter's 26-account pool, probing each account individually showed 18 healthyfree-tieraccounts with a working managed project and only 8 genuinely refused — none of which the plugin could have identified on its own.Notes
tsc --noEmit(clean);account-access,fetch-interceptorandquotasuites pass (108 tests).bun run test/bun run build: they pin Bun1.4.2(build.prerequisite_order) and only1.4.3was available here, where the full suite segfaults inside Bun itself. The TUI build gate is unrelated to this change, but please run CI.