refactor(proxy): freeze the filtered worker config before initialize

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-09-20 03:21:01 +00:00
parent b2e123da43
commit f7756d01cf

View file

@ -8571,8 +8571,9 @@ def save_worker_config(**data):
LEGACY_WORKER_CONFIG_KEYS: Final = frozenset({"telemetry"})
async def initialize_from_worker_config(worker_config: dict[str, object]) -> None:
await initialize(**{k: v for k, v in worker_config.items() if k not in LEGACY_WORKER_CONFIG_KEYS})
async def initialize_from_worker_config(worker_config: Mapping[str, object]) -> None:
supported: Final = MappingProxyType({k: v for k, v in worker_config.items() if k not in LEGACY_WORKER_CONFIG_KEYS})
await initialize(**supported)
async def initialize(