Skip to content

fix(hermes_time): add missing reset_cache() function#32987

Open
Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/hermes-time-reset-cache
Open

fix(hermes_time): add missing reset_cache() function#32987
Kailigithub wants to merge 1 commit into
NousResearch:mainfrom
Kailigithub:fix/hermes-time-reset-cache

Conversation

@Kailigithub

Copy link
Copy Markdown
Contributor

Summary

Adds the reset_cache() function that is referenced in both the module-level comment and the get_timezone() docstring, but was never implemented. This was item 2 in issue #32848.

Changes

  • hermes_time.py: add reset_cache() function that clears the three timezone cache globals (_cached_tz, _cached_tz_name, _cache_resolved) so that the next call to get_timezone() re-resolves from the environment/config.

Why

The module comment and get_timezone() docstring both say:

Call reset_cache() to force re-resolution (e.g. after config changes).

But the function did not exist, so callers who followed this guidance would get a NameError. Now the documented API is functional.

Testing

  • python3 -m py_compile hermes_time.py — passes
  • ruff check hermes_time.py — clean
  • python3 -m pytest tests/test_timezone.py -q — 20 passed

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder duplicate This issue or pull request already exists labels May 27, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #13487 which adds the same missing reset_cache() function to hermes_time.py. Also covered in the omnibus #32869 (item 2 from #32848).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants