leowang (Discord #help, 11-07) had two Antigravity accounts that Google
suspended for a Terms of Service violation. Their usage rows read
"tried 23, answered 0, 23 account restricted by the vendor" and 22/0/22.
2e58f85e4 (v0.1.3110) reads that 403 as failRestricted and rests the
account restrictedRest (2h), and the comment promises one refused request
per account per two hours. But when the model has no other account,
restLast keeps a lone resting candidate ("there is no other") and
probeOne keeps the resting one back soonest. So every request still went
to Google, alternating between the two accounts. The same held for every
failRestricted refusal (WorkBuddy 11140, ZCode 3012, a Codex risk block).
restAfterMarked now keeps the vendor's words with a restricted rest.
restrictedHeld gives them again, with the refusal's status, when the
last candidate of a request is an account resting for that reason. This
mirrors verifyHeld: nobody is asked, the try is marked restricted so the
panel keeps saying why, and the rest isn't taken anew, including in a
strictly kept conversation. When the rest ends (or Unrest), the account
is asked once again. A refusal of the request's content (Antigravity's
400 high-risk text, or its 429 on agent prompts, failPrompt) rests
nothing and still asks.
Run (mote, macOS 27):
- go test -count=1 -timeout 45m ./internal/gateway: ok
- the new tests (restricted_held_test.go) and -run
'TestAntigravitySuspended|TestRiskRefusal|TestWorkBuddyRestricted|
TestPluginRestrictedAccountSkipped|TestZCodeStartPlanBlockRestsRestricted|
Restricted|Verif': ok
- gofmt -l, go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: clean
Broken by hand:
- On the old gateway.go/routing.go,
TestSuspendedAccountsNotAskedWhileTheyRest is red ("turn 2: 403 ...
asked [u1]") and TestRestrictedLoneAccountNotAskedWhileItRests is red
("request 2 ... asked [acct-1 acct-1]").
TestContentRefusalStillAsksTheAccount passes on both.
- With the !heldRestricted rest guard replaced by true,
TestSuspendedStrictConversationKeepsItsRest is red ("turn 3 moved the
rest").
Not tried:
- A real suspended Google account. The fixture is the 403 body from
2e58f85e4's test.
- A restricted rest still lives in memory only (rests.json keeps ladder
rests), so a restart asks each such account once more. Not changed.
Reported-by: leowang (Discord)