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. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca5d15ccf6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | `src/providers/registry.ts` | Canonical provider presets for CLI, dashboard, OAuth, key providers, and metadata. | | ||
| | `src/providers/derive.ts` | Enrichment from provider presets into user config. | | ||
| | `src/oauth/` | OAuth providers, token storage, refresh, and auth-token resolution. The login callback listener binds a per-provider FIXED loopback port, so consecutive logins reuse the same number; every response it sends ends its connection (`Connection: close`, including non-callback paths such as a stray `/favicon.ico` 404). Stopping the listener does not close an established socket, so without that a pooled client would deliver the next login's callback to the retired flow, which rejects the unknown state as a CSRF mismatch while the live flow waits. Kiro add-account identity prefers same-session `whoami` over a leftover SQLite state profile, and never persists the Builder ID service profile ARN as `accountId`. | | ||
| | `src/oauth/` | OAuth providers, token storage, refresh, and auth-token resolution. Meta Muse device authorization, polling, and key-mint JSON responses share the 64 KiB bounded-body ceiling and the request's deadline; oversized declared or streamed bodies are rejected before JSON parsing. The login callback listener binds a per-provider FIXED loopback port, so consecutive logins reuse the same number; every response it sends ends its connection (`Connection: close`, including non-callback paths such as a stray `/favicon.ico` 404). Stopping the listener does not close an established socket, so without that a pooled client would deliver the next login's callback to the retired flow, which rejects the unknown state as a CSRF mismatch while the live flow waits. Kiro add-account identity prefers same-session `whoami` over a leftover SQLite state profile, and never persists the Builder ID service profile ARN as `accountId`. | |
There was a problem hiding this comment.
Update every mapped OAuth structure document
This change updates only runtime.md, but structure/INDEX.md maps src/oauth/ to three owning documents: runtime.md, transports/inventory.md, and providers/xai-grok.md. Because the new OAuth response-body contract leaves the latter two owners untouched, the repository's mandatory source-to-doc synchronization is incomplete; update both mapped documents in this commit, or narrow their manifest ownership if they no longer describe this area.
AGENTS.md reference: structure/AGENTS.md:L44-L50
Useful? React with 👍 / 👎.
Motivation
response.json()unbounded, exposing the process to memory exhaustion from a large or malicious response.Description
readMuseJsonhelper that enforces the shared 64 KiB ceiling usingreadBoundedResponseBytesand rejects oversized declared or streamed bodies before JSON parsing.response.json()calls inrequestMuseDeviceAuthorization,pollMuseDeviceToken, andmintMuseApiKeywith the bounded reader and preserve the request deadline via the combined abortsignal.tests/providers/meta-muse-device.test.tsthat cover oversized streamed authorization/token responses and an oversized declared mint response, and updatestructure/runtime.mdto document the bounded-body invariant for the OAuth transport.Testing
npx --yes bun@1.4.2 test tests/providers/meta-muse-device.test.ts— 39 passed, 0 failed.npx --yes bun@1.4.2 run typecheck,npx --yes bun@1.4.2 run structure:check, andnpx --yes bun@1.4.2 run privacy:scanall passed.npx --yes bun@1.4.2 run testcompleted but reported unrelated existing/concurrency-sensitive failures intests/server/api-key-attribution.test.ts,tests/lab/lab-automation-final-coderabbit-regressions.test.ts, andtests/codex-integration/bearer-admission-routed-provider.test.ts; the focused Meta Muse tests remained green.bun testwith the preinstalled Bun 1.2.14 failed due tonode:zlibsymbol differences, so tests were exercised with the repository-aligned Bun 1.4.2 runtime.Codex Task