Skip to content

Rename CLI token storage types to the Store vocabulary#5384

Merged
renaudhartert-db merged 2 commits into
mainfrom
storage-rename-cache-to-store
Jun 1, 2026
Merged

Rename CLI token storage types to the Store vocabulary#5384
renaudhartert-db merged 2 commits into
mainfrom
storage-rename-cache-to-store

Conversation

@renaudhartert-db
Copy link
Copy Markdown
Contributor

@renaudhartert-db renaudhartert-db commented May 31, 2026

What is this about?

Follow-up to #5383, which introduced the CLI-owned Store interface but deliberately left the concrete types and helpers in the old Cache vocabulary to keep that PR focused on the structural change. This PR does the rename that #5383 promised, so the package reads consistently.

Testing

Pure rename, no behavior change. Existing auth unit and acceptance tests pass.

Follow-up to #5383. That PR introduced the CLI-owned Store interface but deliberately left the concrete types and helpers in the old Cache vocabulary to keep the diff focused. This change does the rename it promised.

CLI-owned storage pieces move to the Store vocabulary: the backends (fileTokenCache -> fileStore, keyringCache -> keyringStore, and constructors), the resolver (ResolveCache -> ResolveStore, cacheFactories -> storeFactories), the on-disk format types (tokenCacheFile -> tokenStoreFile), and related helpers and test doubles. file_cache.go is renamed to filestore.go. The on-disk filename stays token-cache.json for backward compatibility; only Go identifiers change.

Anything that implements or refers to the SDK's TokenCache keeps the Cache name: the ToU2MTokenCache adapter, the DualWritingTokenCache and notFoundHintCache wrappers, the OAuthTokenCache helper, and the test doubles that implement the SDK TokenCache.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented May 31, 2026

Commit: 25b79bb

Run: 26743001596

Copy link
Copy Markdown
Member

@simonfaltum simonfaltum left a comment

Choose a reason for hiding this comment

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

No blocking findings from my pass. Verified locally with go test ./cmd/auth ./libs/auth/... on the PR worktree.

Tiny non-blocking nit: libs/auth/credentials_test.go still mentions storage.ResolveCache in two comments; those can be updated to storage.ResolveStore for consistency, but there is no behavioral impact.

…mments

Addresses review nit: two comments in credentials_test.go still referenced storage.ResolveCache.

Co-authored-by: Isaac
@renaudhartert-db renaudhartert-db added this pull request to the merge queue Jun 1, 2026
Merged via the queue into main with commit 9af226f Jun 1, 2026
23 checks passed
@renaudhartert-db renaudhartert-db deleted the storage-rename-cache-to-store branch June 1, 2026 09:04
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.

3 participants