Skip to content

persist regenerated config tokens#82

Merged
cesaregarza merged 1 commit into
mainfrom
feat/2.0.0
Mar 30, 2026
Merged

persist regenerated config tokens#82
cesaregarza merged 1 commit into
mainfrom
feat/2.0.0

Conversation

@cesaregarza

Copy link
Copy Markdown
Owner

Summary

  • auto-save regenerated tokens when a Config instance is backed by a file path
  • keep in-memory-only configs unchanged
  • add focused tests covering both behaviors

Why

A successful live token regeneration currently updates the in-memory config but does not persist gtoken and bullet_token back to disk unless callers remember to invoke save_to_file() separately. That makes expensive successful refreshes easy to lose.

Impact

File-backed uses of Config.regenerate_tokens() now persist refreshed tokens immediately after a successful regeneration. This keeps .splatnet3_scraper aligned with the live token state without changing memory-only callers.

Testing

  • uv run pytest -q tests/query/configuration/test_config.py tests/query/test_queryhandler.py

@cesaregarza cesaregarza marked this pull request as ready for review March 30, 2026 06:43
@sonarqubecloud

Copy link
Copy Markdown

@cesaregarza cesaregarza merged commit bbd440b into main Mar 30, 2026
4 checks passed
@cesaregarza cesaregarza deleted the feat/2.0.0 branch March 30, 2026 06: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.

1 participant