fix(server): restore /config toJsonSafe projection
Reverts the redundant-cleanup hypothesis. The reproducer was upgraded to exercise the actual gemini-auth bug shape — function and bigint values under provider.options (a Schema.Any-typed declared field, not an excess property) — and that fails /config encode without the projection. Effect's onExcessProperty handles excess keys for free, but Schema.Any pass-through plus encode validation doesn't, so the toJsonSafe clone at the HTTP boundary is load-bearing for this case.
This commit is contained in:
parent
c6871e047b
commit
2aa6e501c8
1 changed files with 4 additions and 3 deletions
|
|
@ -13,9 +13,10 @@ export const configHandlers = HttpApiBuilder.group(InstanceHttpApi, "config", (h
|
|||
const configSvc = yield* Config.Service
|
||||
|
||||
const get = Effect.fn("ConfigHttpApi.get")(function* () {
|
||||
// Plugin `config` hooks may attach non-JSON-safe values (function,
|
||||
// symbol, undefined, bigint) to the live config. Project a JSON-safe
|
||||
// copy at the HTTP boundary so the response matches the typed schema
|
||||
// Plugin `config` hooks may attach runtime-only values (functions,
|
||||
// bigints, etc.) under schema-allowed fields like provider.options
|
||||
// (Schema.Any). Project a JSON-safe copy at the HTTP boundary so
|
||||
// response encode succeeds and clients see the typed schema shape
|
||||
// (mirrors Provider.toPublicInfo in #26550).
|
||||
return toJsonSafe(yield* configSvc.get())
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue