Skip to content

fix(auth): report per-environment status and refresh-token availability - #184

Merged
jpage-godaddy merged 1 commit into
mainfrom
cli-empty-auth-status
Aug 4, 2026
Merged

fix(auth): report per-environment status and refresh-token availability#184
jpage-godaddy merged 1 commit into
mainfrom
cli-empty-auth-status

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • gddy auth status with no --env returned an empty array — it enumerated environments via each PkceAuthProvider's in-memory token cache, which is always empty since a fresh provider is built per call. Now lists every known environment (built-ins + locally configured + PAT registry) and lets the dispatcher check status against real persisted storage.
  • Bumps cli-engine to 0.7, picking up Credential::refreshable (feat(auth)!: surface refresh-token availability on Credential/auth status cli-engine#79) so auth status output can distinguish a credential that definitely needs auth login from one that will attempt a silent renewal first.

Test plan

  • cargo check
  • cargo clippy -- -D warnings
  • cargo test (494 passed)
  • cargo fmt --check
  • Manually verified gddy auth status reports per-environment status with an accurate refreshable column

`gddy auth status` with no --env returned an empty array: it enumerated
environments via each PkceAuthProvider's in-memory token cache, which is
always empty since a fresh provider is built per call. List every known
environment instead (built-ins + locally configured + PAT registry) and
let the dispatcher check status on each against real persisted storage.

Also surfaces whether a cached credential has a refresh token on file
(cli-engine 0.7's new Credential::refreshable), so status output can
distinguish a credential that definitely needs `auth login` from one
that will attempt a silent renewal first.
Copilot AI lite review requested due to automatic review settings August 4, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes gddy auth status environment enumeration so it reports per-environment status reliably (even when no --env is specified) by listing all known environments and letting status checks consult persisted credential storage. It also bumps cli-engine to v0.7 to pick up Credential::refreshable, enabling auth status output to distinguish credentials that can attempt silent refresh from those that require an interactive login.

Changes:

  • Reworked GoDaddyAuthProvider::list_environments to enumerate all known environments (built-ins + locally configured + PAT registry) instead of relying on PkceAuthProvider’s in-memory cache.
  • Updated dependency cli-engine from 0.6 to 0.7.
  • Regenerated lockfile entries for the dependency bump.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
rust/src/auth.rs Fixes environment discovery for auth status by listing known env names and including PAT-registered envs.
rust/Cargo.toml Bumps cli-engine to 0.7 to support Credential::refreshable.
rust/Cargo.lock Updates locked cli-engine version/checksum to match the dependency bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jpage-godaddy
jpage-godaddy merged commit cf7d9f5 into main Aug 4, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the cli-empty-auth-status branch August 4, 2026 18:44
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