Skip to content

fix(byok): reconcile runtime key pools after config changes - #29

Merged
dondai1234 merged 1 commit into
dondai1234:masterfrom
robbyczgw-cla:fix/byok-key-pool-refresh
Jul 24, 2026
Merged

fix(byok): reconcile runtime key pools after config changes#29
dondai1234 merged 1 commit into
dondai1234:masterfrom
robbyczgw-cla:fix/byok-key-pool-refresh

Conversation

@robbyczgw-cla

Copy link
Copy Markdown
Contributor

Summary

Reconcile existing in-memory BYOK key pools with the current configuration during refresh. Removed and reordered keys now take effect without a server restart while cooldown/health state for retained keys is preserved.

Type of change

  • Bug fix (non-breaking)
  • Reliability / hardening

Checklist

  • Functional behavior changes; no cosmetic-only change.
  • Regression tests fail on v12.3.0 without this patch.
  • pytest tests/ passes locally: 704 passed, 5 deselected.
  • No new heavy module-level import in server.py.
  • CHANGELOG.md updated under Unreleased.
  • No config format or CLI surface change.

Notes for review

The pool object is retained so active engine instances continue to reference it. Its key membership/order and state map are reconciled in place, and the rotation cursor is moved to the next surviving key where possible.

Tests cover partial removal and reordering, deletion around the rotation cursor, retained cooldown state, and complete provider removal.

Fixes #26

@dondai1234
dondai1234 force-pushed the fix/byok-key-pool-refresh branch from 71893b3 to e204b30 Compare July 23, 2026 23:59
@dondai1234
dondai1234 force-pushed the fix/byok-key-pool-refresh branch from e204b30 to df33ff6 Compare July 24, 2026 00:01
@dondai1234
dondai1234 merged commit 162ab74 into dondai1234:master Jul 24, 2026
4 checks passed
dondai1234 added a commit that referenced this pull request Jul 24, 2026
Three community bug fixes by @robbyczgw-cla:
- Focus context isolation (#27): scope smart_fetch request context via decorator
- Region cache identity (#28): explicit region in search cache key
- BYOK pool reconciliation (#29): removed/reordered keys without restart

709 tests pass.
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.

Removed BYOK keys remain active in the runtime pool until restart

2 participants