Repository navigation
fix(api): accept dashboard sessions on preset item routes - #18386
diegosouzapw merged 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
135dd5c to
8c4513f
Compare
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
7fd6659
into
cheaper-inference:release/v3.8.53
Problem
With
REQUIRE_API_KEY=true, a signed-in Playground user can list and create presets, butGET,PUT, andDELETE /api/playground/presets/{id}reject the same dashboard session with401 Authentication required. The collection and item routes apply different credential rules (see #18385).Change
GET/PUT/DELETEwith real signed-session, valid-key, missing-credential, invalid-key, and login-disabled cases.Fixes #18385
CI diagnosis (head
8c4513f, basef1a7e12)The PR is not CI-green. The completed Oct 27 attempt (CI, Quality, API typecheck) had 13 failed checks, 39 passed, 5 skipped; newer attempts on the same head are in progress, so these counts are historical, not a live status. The CI checkout is the synthetic merge of this head into
f1a7e12; the diff changes only the two preset routes, their new auth helper, and the new integration test. Both integration-test shards passed in that attempt, and the new four-case regression passes locally.Reproduced on the exact base, independent of the preset-auth diff:
Fast Quality Gates:check:build-scopecounts 12,160 files against a 12,000 limit; the same tracked-file calculation atf1a7e12is already 12,158, before this PR's two TypeScript files. Itsopen-sse-typecheckfailures (TS2345inchatCore.tsandsseParser/geminiResponse.ts) also appear inAPI Route Typecheck; neither source file is changed here.Lint:check-test-tla-orderfinds top-levelawaitafter tests in three unchanged unit-test files.i18n Glossaryfindsusage.quotaAuthRequiredHintusing提供商instead of提供者in unchangedzh-CN.json; the offending value is present onf1a7e12(as is the corresponding供應商inzh-TW.json).f1a7e12and fail identically there (same six tests, same assertion messages); thefile://${process.argv[1]}entrypoint flagged by fast-path is likewise present on the exact base. The overlapping failures in regular and fast-path shards corroborate these signatures.Gate / CIandGate / Qualitysummarize failed child jobs; they are not separate preset-auth failures.Full-suite Vitest failure not reproduced in isolation: CI reports 14 failures across six unchanged UI/i18n test files, including 5-second timeouts. Running those exact six files separately with two workers yields 64/64 passing on
f1a7e12and 64/64 passing on the PR head. The full CI run on the exact base is unavailable, so the full-suite failure (possibly load/order-sensitive) cannot conclusively be attributed to upstream or this PR. None of these tests exercise the preset routes/helper.