Skip to content

fix: align the credential functions to be the same#6075

Open
bryanadenhq wants to merge 1 commit intomainfrom
fix/credential-function-alignment
Open

fix: align the credential functions to be the same#6075
bryanadenhq wants to merge 1 commit intomainfrom
fix/credential-function-alignment

Conversation

@bryanadenhq
Copy link
Collaborator

@bryanadenhq bryanadenhq commented Mar 9, 2026

Description

Aligns list_credentials with check_agent so both functions follow the same credential resolution steps: loading shell env vars, resolving spec-name aliases, and surfacing flat-file credentials written by the GUI.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #6074

Changes Made

  • Call ensure_credential_key_env() at the start of list_credentials to match check_agent behavior
  • Resolve CREDENTIAL_SPECS aliases (e.g. gmail_oauth → google) before filtering accounts by credential_id
  • Read flat-file credentials directly from EncryptedFileStorage to include GUI-saved credentials that LocalCredentialRegistry skips

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

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.

[Feature]: Consistent credential listing across GUI and CLI flows

1 participant