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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc16074fe3
ℹ️ 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".
| if (providerTableMode && row.model_provider === "openai") { | ||
| return "history_paginated_openai_requires_native_writer"; | ||
| } | ||
| return "history_paginated_requires_native_writer"; |
There was a problem hiding this comment.
Scan all rows before accepting the paginated stand-down
When a provider-table transition encounters a mixed store where an opencodex row is returned before an openai row, this immediate return reports the permitted generic stand-down without ever inspecting the later openai thread. Because the query has no ordering guarantee, the transaction can then remove openai_base_url and cause that thread to resume through Codex's built-in OpenAI endpoint—the exact leak this change intends to prevent. Check for any selected openai row before returning the generic stand-down, or otherwise scan all rows first.
Useful? React with 👍 / 👎.
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
openai_base_urlwhile leaving paginated threads taggedopenai, which would let resumed conversations bypass the proxy and reach OpenAI directly. This preserves the routing invariant and prevents leakage of conversation context to the wrong provider.Description
openairows fromopencodexrows in the history preflight by selectingmodel_providerin the query and returning a new refusal codehistory_paginated_openai_requires_native_writerwhen a provider-table transition encounters a paginatedopenaithread. (Change insrc/codex/history-provider.ts.)openaithread and asserts the injector refuses the transaction without changingconfig.tomlor rollout bytes. (Change intests/codex-integration/codex-inject-integration.test.ts.)structure/config.mdto document that the stand-down exception does not apply when paginatedopenairows would be stranded, and that such transitions now refuse withhistory_paginated_openai_requires_native_writer. (Documentation update instructure/config.md.)Testing
npx --yes bun@latest test tests/codex-integration/codex-inject-integration.test.tsand observed the new test passing along with the suite-specific cases (76 pass, 1 environment-dependent skip).npx --yes bun@latest run typechecksucceeded.npx --yes bun@latest run structure:checksucceeded.npx --yes bun@latest run privacy:scansucceeded.npx --yes bun@latest run testwas attempted but the container produced unrelated platform-specific failures (native-profile origin-status and Unix process-group/zombie cleanup assertions); the changed regression passed in focused runs.Codex Task