From cc8e8e3bda7e8169978eb23eb237f11388883b4e Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 19 Oct 2026 02:42:18 +0800 Subject: [PATCH] provider: moved Grok users get plugin 0.1.16, which keeps a sign-in with no email (llllleo9 on X) llllleo9 couldn't add Grok: grok login --device-auth exited 0, and the sign-in failed with "grok login finished without an account". Grok Build 1.0.62 was run in a sandbox against a stand-in auth.x.ai. When the id_token has no email claim (an account signed in through X), the CLI writes "email": null, and plugin 0.1.15 refused a sign-in made beside an already signed-in Grok Build. With GROK_AUTH_PATH set, the CLI kept the sign-in elsewhere. Plugin 0.1.16 (magpie-community/plugins 8cdf2d2) fixes both: - the account is told by its email, else its xAI user id, else the token's sub; - GROK_AUTH_PATH is left out of the login; - a login that leaves nothing says which file it read and what was there. npm view @magpie-community/opencode-grok-auth@0.1.16 --prefer-online shows 0.1.16, which is latest, and its integrity matches the publish run's. This commit raises the mover's min to 0.1.16, so keepMovedCurrent updates moved users. The built-in's own Grok sign-in (runCLISignIn) has no caller left, so the built-in is unchanged. Run at this change, on origin/main ccb2eea15 plus this diff, macOS: - gofmt -l: clean. go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... and go build: clean. - go test ./... -timeout 45m: internal/provider ok (1205s), internal/plugin ok (1244s), and 60 packages ok. - Four packages were red with the machine at load average 195-235, while six other sessions ran benchmarks: - internal/agent timed out at 45m in TestCodexAgentsV1WarnsWhenCodexOwnV2IsOn; - internal/gateway timed out at 45m in TestPluginStreamLargeReplies (#2551); - internal/library timed out at 45m in TestSkillHow; - internal/gui failed TestSetAnswersWhileDevinAndProvidersHang (15.7s, #1375). None of the four reads the mover's min. - A rerun of those four, at load average 420, had not finished a package after 30 minutes. It isn't a record of green. - go test -count=1 -run 'Moved|Mover|Grok' ./internal/provider: ok. Not tried with a real xAI account: whether xAI's token for llllleo9's account lacks the email claim, and whether their Grok Build was already signed in. --- internal/provider/migrate_side.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/migrate_side.go b/internal/provider/migrate_side.go index 61c0055fb..e0f3d61d1 100644 --- a/internal/provider/migrate_side.go +++ b/internal/provider/migrate_side.go @@ -97,7 +97,7 @@ func init() { // names, as the built-in does: the homes stay where they are. movers["grok"] = &mover{ pkg: "@magpie-community/opencode-grok-auth", - min: "0.1.15", // a Go key the Provider API refuses is taken as Go's and asked at /alpha/generate (#969); a failure's status and its sign-in mark as the built-in's; grok-4.7's reasoning levels; a token Grok refuses early reads as expired; the sign-in renewed ahead of time through auth.refresh; a 429 shows a spent Rate limit window until it lifts; a login with no link says why; a tool whose parameters are a root union goes as a plain object (#1271); a plain Codex agent_message (a subagent's task or reply) goes as the user's message, not refused with 422 "unknown item type", a sealed one as it came (plugins#61); a model Grok lists at two windows is offered at each, grok-4.7@500k sent with x-grok-context-window (plugins#83); a window offered without a k (grok-4.7@131072) goes as that window, not as a model named so (#1679); a sign-in without Grok Build names GROK_BIN_DIR (#2223) + min: "0.1.16", // a Go key the Provider API refuses is taken as Go's and asked at /alpha/generate (#969); a failure's status and its sign-in mark as the built-in's; grok-4.7's reasoning levels; a token Grok refuses early reads as expired; the sign-in renewed ahead of time through auth.refresh; a 429 shows a spent Rate limit window until it lifts; a login with no link says why; a tool whose parameters are a root union goes as a plain object (#1271); a plain Codex agent_message (a subagent's task or reply) goes as the user's message, not refused with 422 "unknown item type", a sealed one as it came (plugins#61); a model Grok lists at two windows is offered at each, grok-4.7@500k sent with x-grok-context-window (plugins#83); a window offered without a k (grok-4.7@131072) goes as that window, not as a model named so (#1679); a sign-in without Grok Build names GROK_BIN_DIR (#2223); a sign-in with no email (an X account) is kept by its xAI user id, GROK_AUTH_PATH no longer takes it elsewhere, and a login that leaves none says where it looked agents: []string{"grok"}, out: func() ([]Moving, error) { var out []Moving