a9cce6d844
The panel's PUT hand-rolled its target: hardcoded profile-local path while reads used resolve_config_path(), always the underscore host key while reads honor legacy dot-form blocks, apiKey to the env store which the client ranks below a JSON-stored key, and an unlocked read-modify-write of the file the OAuth refresh loop guards with an advisory lock because refresh tokens are single-use. Any of the first three silently shadowed or bypassed live settings on save; the fourth could revoke the OAuth grant. Route the write through resolve_config_path() and _host_block (updating the resolved block in place), persist a saved apiKey into the host block where the client reads it — never over an OAuth access token, which the refresh loop owns — and take _config_refresh_lock around the read-modify-write. Tolerate hosts:null instead of 500ing.