[WRONG BRANCH] fix(auth): map compact credential-substitution failures to 401 - #304
[WRONG BRANCH] fix(auth): map compact credential-substitution failures to 401#304luvs01 wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes Limit details: You’ve used all 3 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
/v1/responses/compactpath threaded bearer admission through but did not mirror the same fail-closed handling for missing stored-main credential substitution, causing an internal 500 instead of a 401 when substitution was unavailable.Description
CodexMainSubstitutionUnavailableErrorto a fail-closed401 authentication_errorin the compact auth resolution path so compact requests behave the same as the main Responses path. (Change insrc/server/responses/compact.ts.)/v1/responses/compactwith a bearer admission and verifies a missing stored main credential returns401and performs no upstream I/O. (New test intests/codex-envkey-admission-substitution.test.ts.)Testing
bun test tests/codex-envkey-admission-substitution.test.ts(focused): passed.bun x tsc --noEmit(typecheck): passed.bun run privacy:scan: passed.bun run test/ full-suite run was observed but not relied on here due to long-running unrelated tests in this environment; the focused regression and typecheck were used as the primary verification.Codex Task