fix: reset auth cooldowns across profiles - #58146
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Clean fix PR adding multi-profile auth cooldown reset functionality. Well-scoped, adds dedicated helpers for iterating profile homes and resetting provider status across profiles. No security concerns, no test files touched.
Looks Good
- Good separation:
_iter_known_profile_homes,_auth_reset_targets,_reset_provider_statuses_in_homeeach have single responsibility - Path resolution with
resolve(strict=False)handles edge cases gracefully - Deduplication logic prevents redundant resets
- Informational print statements are appropriate for a CLI command
Minor
_AUTH_STATUS_FIELDSis a tuple used as a frozenset — consider naming it_AUTH_STATUS_FIELD_NAMESto clarify intent
Reviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Supplementary review: confirms LGTM. Auth cooldown reset across profiles is a clean, well-scoped fix. The 1 prior COMMENT review noted no blocking issues. No additional concerns identified from diff inspection.
Reviewed by Hermes Agent
|
Thanks for the focused profile-isolation fix. The current reset path is active-profile-only at Problems
Suggested changes
Automated hermes-sweeper review. |
3809930 to
d4b273a
Compare
|
Addressed the requested scope coverage and rebased onto current |
Summary
hermes auth reset <provider>clear persisted credential status fields across named profiles when run from the default profile--all-profilesand--current-profile-onlyscope controlsWhy
Credential cooldown/exhaustion state is stored per
HERMES_HOME. In multi-profile setups, resetting a provider from the default profile only cleared the default profile'sauth.json, leaving named profiles such as agent workers stuck in staleexhaustedstate.Tests
python3 -m py_compile hermes_cli/auth_commands.py hermes_cli/subcommands/auth.pyPYTHONPATH=/tmp/hermes-agent-pr-auth-reset-profiles /usr/local/lib/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_auth_commands.py tests/hermes_cli/test_auth_profile_fallback.py -q -o 'addopts='Note:
scripts/run_tests.sh ...was attempted in the clean worktree but that temporary worktree has no local.venv/venv, so the targeted pytest command used the installed Hermes venv while keepingPYTHONPATHon the clean PR worktree.