Skip to content

fix: init re-auths instead of hard-failing on an expired stored token - #169

Merged
piekstra merged 1 commit into
mainfrom
chore/bump-cli-common-v0.1.2
Aug 3, 2026
Merged

fix: init re-auths instead of hard-failing on an expired stored token#169
piekstra merged 1 commit into
mainfrom
chore/bump-cli-common-v0.1.2

Conversation

@piekstra

@piekstra piekstra commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Bumps google-cli-common v0.1.1 → v0.1.2, picking up open-cli-collective/google-cli-common#1.

gro init previously hard-failed when the stored token was expired/revoked (the weekly fate of Testing-mode OAuth apps):

Error: getting profile: Get "https://gmail.googleapis.com/...": oauth2: "invalid_grant" "Token has been expired or revoked."

requiring a manual keychain delete before re-auth. With v0.1.2 the invalid_grant is recognized as an auth error and routed into the existing re-auth flow (confirm → clear token → fresh consent), and the confirmation prompt is skipped under --auth-code-stdin where no TTY exists.

Real-world validation: a locally patched gro built from this exact combination handled a production expired-token re-auth end to end on 2026-08-03.

go build ./... and go test ./... pass locally with the bump.

https://claude.ai/code/session_018kd6nduhCb2p3RzVvbPnMF

Bumps google-cli-common v0.1.1 -> v0.1.2, picking up
open-cli-collective/google-cli-common#1: 'gro init' now routes an
invalid_grant (expired/revoked refresh token) into the re-auth flow
instead of aborting with 'getting profile: ... Token has been expired
or revoked', and skips the TTY confirm under --auth-code-stdin.
@piekstra
piekstra requested a review from piekstra-dev August 3, 2026 20:40

@piekstra-dev piekstra-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: b3be3c7b4c6f
Profile: reviewer - Posting as: piekstra-dev

Summary

Reviewer Findings
go:implementation-tests 0

Reviewer Coverage

Reviewer Status Inspected Skipped Constraints
go:implementation-tests complete_broad go.mod, go.sum unavailable Diff is a version-only go.mod/go.sum bump with no local Go code changes to review.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 21s | $0.59 | claude-sonnet-5 | cr 0.10.268
Field Value
Model claude-sonnet-5
Reviewers go:implementation-tests
Engine claude_cli · claude-sonnet-5
Reviewed by cr · piekstra-dev
Duration 1m 21s wall · 1m 10s compute
Cost $0.59
Tokens 22 in / 3.2k out

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection claude-sonnet-5 6 1.4k 0 54.6k $0.35 19s
go:implementation-tests claude-sonnet-5 10 1.3k 113.1k 13.4k $0.14 43s
orchestrator-rollup claude-sonnet-5 6 395 56.8k 14.4k $0.11 7s

@piekstra
piekstra merged commit 18dffe8 into main Aug 3, 2026
11 checks passed
@piekstra
piekstra deleted the chore/bump-cli-common-v0.1.2 branch August 3, 2026 20:54
piekstra added a commit to open-cli-collective/google-readwrite that referenced this pull request Aug 3, 2026
…#1)

Bumps `google-cli-common` v0.1.1 → v0.1.2, picking up
open-cli-collective/google-cli-common#1.

Same fix as open-cli-collective/google-readonly#169 — `grw init` shares
`initcmd` from the common module. An expired/revoked stored token
(weekly for Testing-mode OAuth apps) previously aborted init with
`oauth2: "invalid_grant" "Token has been expired or revoked."` instead
of offering re-auth; v0.1.2 routes it into the re-auth flow and skips
the TTY confirmation under `--auth-code-stdin`.

`go build ./...` and `go test ./...` pass locally with the bump.

https://claude.ai/code/session_018kd6nduhCb2p3RzVvbPnMF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants