Skip to content

feat(auth): hot-reload tokens.toml on (mtime, size, inode) change#9

Merged
thinmintdev merged 1 commit into
mainfrom
feat/auth-token-reload-2026-05-15
May 16, 2026
Merged

feat(auth): hot-reload tokens.toml on (mtime, size, inode) change#9
thinmintdev merged 1 commit into
mainfrom
feat/auth-token-reload-2026-05-15

Conversation

@thinmintdev
Copy link
Copy Markdown
Contributor

Summary

  • TokenStore now stats tokens.toml on every access and re-reads when the file fingerprint shifts
  • hal0 auth token add (separate process) takes effect on the next API request — no systemctl restart, no /reload endpoint, no inotify watcher
  • Fingerprint refreshed after our own _save() so we don't reparse on every request when the API mutates the file
  • Closes task test(e2e): rewrite γ-3 models spec for Wave-3 per-id pull wire #12

Test plan

  • tests/auth/test_tokens.py green (40/40 pass locally)
  • Manual: mint token via CLI, verify next request honors it without API restart

🤖 Generated with Claude Code

TokenStore now stats tokens.toml on every access and re-reads when the
file fingerprint shifts. `hal0 auth token add` (CLI, separate process)
takes effect on the very next API request — no `systemctl restart
hal0-api.service`, no /reload endpoint, no inotify watcher.

The fingerprint is refreshed after our own _save() so we don't reparse
on every request when the API is the one mutating the file.

Closes task #12.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@thinmintdev thinmintdev merged commit 4e900a5 into main May 16, 2026
1 of 5 checks passed
@thinmintdev thinmintdev deleted the feat/auth-token-reload-2026-05-15 branch May 21, 2026 20:11
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