You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6a4b584
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server,adapters): close the virtual-model scope gap and harden queue retention
Three findings from an adversarial review of this branch.
The scope check ran before applyOpenAiVirtualModel, which rewrites route.modelId
to the wire id that is actually billed. A key allowing only the public selector
was therefore authorized on one model and sent on another. The settled route is
now re-checked after normalization, so the id that is billed is the id that was
authorized.
The account-qualified branch of /v1/alpha/search resolves a model through the
router and bills the account it names, so it applies the same rule. The
endpoints that spend quota without routing a model -- images, audio, realtime,
and the non-account-qualified search branch -- are recorded in the lane document
as uncovered rather than left to read as covered.
The queue's per-event budget comment claimed it bound any single event. It bounds
a RETAINED one: an event handed straight to a waiting consumer is never held, so
refusing it would abort a turn over memory this queue does not own. The comment
now says what the code does. retainedEventCodeUnits also guards a non-object,
so a malformed adapter emission becomes a terminal event rather than a TypeError
thrown out of push with the queue half-updated.
The scope regression reached the config schema through config/schema/leaf-validators
directly, which enters that module cycle from the wrong end and threw a TDZ
ReferenceError on CI. It now loads a hand-written config.json through src/config
the way a startup does, which also proves the stronger property: a damaged
permission field drops that key alone and its valid neighbour survives.
0 commit comments