hermes-agent/scripts
Aleksandr Pasevin fe859a1f55
fix(credential-pool): clear exhaustion state on key rotation (#22622)
* fix(credential-pool): clear exhaustion state on key rotation

When a user rotates an API key (e.g. via `hermes setup` after hitting a
rate limit), _upsert_entry updates the access_token on the existing pool
entry but preserves the stale last_status=exhausted from the old key.
On the next session the pool finds the entry, sees it exhausted, and
returns no usable credentials — even though the new key is valid.

Fix: when access_token changes on an existing entry, reset last_status,
last_error_code, last_error_reason, last_error_message, and
last_error_reset_at. The exhaustion state belongs to the old key, not
the new one.

* chore: add pasevin@gmail.com to AUTHOR_MAP

* fix: clear last_status_at on key rotation, remove unused pytest import

Address review feedback from teknium1 on PR #22622:
- Add last_status_at=None to the reset block (matches all other
  token-sync reset paths in credential_pool.py)
- Assert last_status_at is None in the regression test
- Remove unused pytest import flagged by ruff + ty
2026-08-04 11:35:06 -06:00
..
ci fix(runtime): resolve Hermes-managed Node and uv before bare PATH 2026-08-01 21:17:51 -04:00
lib fix(install): restore installs — engines floor no shipping toolchain can meet 2026-08-01 22:56:52 -05:00
observability
…
tests
…
whatsapp-bridge fix(whatsapp): guard bridge reconnect against hangs and unhandled rejections 2026-08-03 10:03:57 +05:30
LIVETEST_README.md
…
add_contributor.py
…
analyze_livetest.py
…
audit_pr_attribution.py feat(ci): auto-fixable contributor attribution — audit_pr_attribution.py + gate points at it 2026-08-02 15:26:59 -07:00
benchmark_browser_eval.py
…
build_model_catalog.py
…
build_skills_index.py fix(skills-hub): include owner in ClawHub source URLs and add retry on 429 (#51236) 2026-07-31 22:33:11 -07:00
capture-cage-terminal.sh
…
check-windows-footguns.py
…
check_subprocess_stdin.py
…
contributor_audit.py chore: release v0.20.0 (2026.8.3) 2026-08-03 09:57:23 -07:00
dev-sandbox.sh
…
discord-voice-doctor.py
…
docker_config_migrate.py refactor: config auto-migration support floor at v12 + deprecated shim retirement 2026-07-29 16:44:31 -07:00
docker_rebootstrap_nous_session.py
…
generate_conformance_vectors.py
…
hermes-gateway
…
install.cmd
…
install.ps1 fix(install): sync the lockfile engines mirrors with the manifests 2026-08-01 23:28:28 -05:00
install.sh fix(install): sync the lockfile engines mirrors with the manifests 2026-08-01 23:28:28 -05:00
install_psutil_android.py
…
iso-certify.py
…
keystroke_diagnostic.py
…
kill_modal.sh
…
lint_diff.py
…
micro_compaction_report.py feat(agent): report context occupancy, not just tokens saved 2026-07-31 17:44:19 +05:30
profile-tui.py
…
release.py fix(credential-pool): clear exhaustion state on key rotation (#22622) 2026-08-04 11:35:06 -06:00
run_tests.sh fix(test-runner): native Windows venv probe + glyph-safe stdio 2026-07-29 21:30:53 -07:00
run_tests_parallel.py fix(test-runner): native Windows venv probe + glyph-safe stdio 2026-07-29 21:30:53 -07:00
sample_and_compress.py
…
smoke_nemo_relay_shared_metrics.py fix(observability): preserve shared metrics compatibility 2026-07-29 14:09:47 -07:00
tool_search_livetest.py
…
tool_search_livetest2.py
…
tool_search_livetest_ue.py
…
tool_search_livetest_ue_disc.py
…
tool_search_livetest_ue_hard.py
…