[WRONG BRANCH] fix(codex): preserve user-owned openai_base_url on fallback restore - #307
[WRONG BRANCH] fix(codex): preserve user-owned openai_base_url on fallback restore#307luvs01 wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
Warning Review limit reached
Next review available in: 24 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 (4)
Comment |
⏳ DRAFT
What to do
Its title has been prefixed with |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74a2c1c2e2
ℹ️ 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".
| markJournalInjectedState( | ||
| content, | ||
| profileContent, | ||
| keptUserBaseUrl ? null : rootTomlString(content, "openai_base_url"), |
There was a problem hiding this comment.
Retain injected URL evidence across marker-dropping reinjection
When the Codex app drops the ownership comment and another sync runs before restore, setRootOpenaiBaseUrl reports keptUserBaseUrl even though the unmarked value is the URL from the previous injection. Passing null here then replaces the journal without that ownership evidence; if the app subsequently changes the file again so exact-hash restoration cannot run, fallback restoration leaves openai_base_url pointing at the stopped proxy. Preserve the previous journaled URL when it matches the retained value, and cover the inject → rewrite → reinject → rewrite → restore sequence.
Useful? React with 👍 / 👎.
Motivation
config.tomlcontained and a later fallback restore could remove a user-ownedopenai_base_urlthat OpenCodex never wrote.Description
markJournalInjectedStateto accept an explicitinjectedOpenaiBaseUrlparameter and persist that value instead of callingrootTomlString(config, "openai_base_url").nullfor the journaled URL when the injector detected and preserved a user-owned rootopenai_base_url(keptUserBaseUrl), and pass the injected URL only when OpenCodex actually wrote it (src/codex/inject.ts).src/codex/journal.tsto explain why the caller must supply the URL and adjust thecodextests to the new API usage (tests/codex-journal.test.ts).tests/codex-restore-app-rewrite.test.ts).Testing
bun test tests/codex-restore-app-rewrite.test.ts --test-name-pattern 'openai_base_url'and the twoopenai_base_urlcases passed.bun test tests/codex-journal.test.ts --test-name-pattern 'hashless journal'and the relevant hashless-journal case passed.bun run typecheckwhich succeeded.git diff --checkwhich reported no whitespace errors.codex-journalsuite together without test filtering surfaced unrelated environment/seeding failures (missing seededmodels_cache.jsonin one rewrite case); the targeted tests for the change passed and the failures are not caused by these edits.Codex Task