Conversation
…forwarded role (lidge-jun#5334 follow-up) lidge-jun#5334 made the developer wire role tri-state: an undeclared destination folds it to system. Two suites asserting role:"developer" on the Chat wire were missed because they are about tool-result repair ordering and document parts, not role selection — declare the destination, per the convention the change established. Verified: both files fail on dev@600075d2 with system-for-developer wire roles and pass with the declaration. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: luvs01/opencodex/.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 |
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. |
|
✅ Deterministic PR hygiene checks passed. |
GET /api/settings and switch-free PUTs passed reason "not_requested", so describeCodexDesktopSwitches reported boolean effective state and an OpenCodex-derived sign-in requirement even while an external model_provider owned config.toml. observedCodexDesktopSwitchApply now consults the same currentExternalCodexModelProvider predicate the injector uses, so read reports describe observed ownership (effective: null, external_provider, external auth source) instead of re-deriving it only from a completed apply. Documents the reporting contract in structure/config.md and the public guide. Co-Authored-By: Epinephrine <luvs01@hanmail.net>
|
Fixed in 6321d1e — the read path now consults |
|
Fixed in 6321d1e — |
|
Fixed in 6321d1e — read reports now derive external ownership from |
| const { currentExternalCodexModelProvider } = await import("./inject/config-toml"); | ||
| const provider = currentExternalCodexModelProvider(); |
There was a problem hiding this comment.
🟡 Unreadable Codex configuration breaks all settings requests
When config.toml exists but cannot be read or disappears during detection, ownership detection throws. Every settings GET and unrelated PUT then fails instead of returning its normal report.
Learn more
This new read runs outside the error handling used by applyCodexDesktopSwitches. currentExternalCodexModelProvider performs an existsSync followed by readFileSync, so permission errors and deletion between those calls propagate through the management route. The route-level handler only converts specific known errors, leaving this ordinary filesystem failure to escape the settings request.
Example: An external provider manager temporarily replaces ~/.codex/config.toml while the dashboard refreshes settings. The existence check succeeds, the subsequent read receives ENOENT, and /api/settings fails instead of returning the remaining settings.
Recommended fix: Catch import/read failures inside observedCodexDesktopSwitchApply and return a non-applied diagnostic state with the error in detail. Add a focused regression test that injects a failing ownership read or creates an existence/read race.
Was this helpful? React with 👍 or 👎 to provide feedback.
Motivation
success: truewhen an externalmodel_providerownedconfig.toml, which causedapplyto be reported as applied and led the CLI to claim the file was rewritten and to show an incorrect auth-source consequence.Description
configApplied?: falsetoCodexInjectResultwhen injection preserves an externally ownedconfig.tomlrather than writing it (src/codex/inject.ts).external_providerapply reason inapplyCodexDesktopSwitches, and reportapplied: falsewith the injector message asdetail(src/codex/desktop-switches.ts).effectiveto benulland by reportingauthSource.presentsCodexAccountasnullwith a descriptivesummary, so the UI/CLI shows the external ownership rather than claiming a rewrite (src/codex/desktop-switches.ts).~/.codex/config.toml was rewritten, and does not suggestocx syncfor the non-retryable external-ownership case (src/cli/system-command.ts).tests/config/settings-desktop-switch-apply.test.ts,tests/cli/cli-headless-parity.test.ts, andtests/codex-integration/codex-inject-integration.test.ts).structure/config.mdto state that externalmodel_providerownership is preserved and reported as externally controlled rather than claiming a rewrite.Testing
./node_modules/.bin/bun test tests/config/settings-desktop-switch-apply.test.tsand./node_modules/.bin/bun test tests/cli/cli-headless-parity.test.ts, and both passed (new external-provider cases included).bun run typecheckandbun run structure:check, both succeeded.bun run test) for observation: the modified subsystem tests pass; the full suite completed but included unrelated environment-sensitive failures in some integration lanes (existing JSON parse and process-group assertions) that are not caused by these changes.Codex Task