feat(codex): converge account picker catalogs - #1212
Conversation
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR adds ChangesCodex catalog convergence
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Convergence
participant CatalogSource
participant ProviderFetch
participant ObservedMerge
participant CatalogWriter
Convergence->>CatalogSource: Resolve catalog kind and runtime support
Convergence->>ProviderFetch: Gather models and provider outcomes
ProviderFetch-->>Convergence: Return models with authoritative or degraded states
Convergence->>ObservedMerge: Build and merge observed catalog state
ObservedMerge-->>Convergence: Return normalized catalog entries
Convergence->>CatalogWriter: Persist the converged catalog
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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: a4878de383
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
|
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/codex-convergence-account-selectors.test.ts`:
- Around line 512-514: Update the convergence assertion around syncCatalogModels
so unchanged custom-catalog.json content expects catalogWritten to be false, or
adjust writeRetainedCatalogSync to skip replaceActiveCodexCatalog and its atomic
write when prepared bytes match the existing file; preserve true only when
content is physically written.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cbffb3b0-0bdf-4bf6-a7cd-92fc452c48b1
📒 Files selected for processing (5)
src/codex/catalog/bundled.tssrc/codex/catalog/sync.tstests/codex-catalog.test.tstests/codex-convergence-account-selectors.test.tstests/codex-runtime.test.ts
Review - Request ChangesRequesting changes for one correctness issue I found. P2 - Legacy custom models can ignore deletion during an outage after upgradingThere is a migration edge case around the new Custom model rows created by older OpenCodex versions do not have this marker. In the new merge logic, an absent custom row is treated as an intentional deletion only when the existing catalog row already carries That means this sequence can leave a deleted model behind:
The result is that a model the user explicitly deleted can remain in the Codex catalog until a later authoritative provider refresh. I think this needs either an ownership migration for legacy custom rows or another mechanism that lets config deletion remain authoritative during the first post-upgrade degraded refresh. Please also add a regression covering:
Apart from this, I did not find another merge-blocking correctness or security issue in the current diff. I also did not find a new credential/account-identity leak. CI noteThe current GitHub Actions run for |
Summary
multi_agent_v2from the admitted config bytesThis is the third slice requested in #1019, following #1096 and #1152. It intentionally contains catalog construction, merge, and convergence behavior only. Management API/dashboard activation and the remaining lifecycle work stay in later slices.
Part of #425.
Verification
dev@3e60b1d9bun run typecheckbun run privacy:scangit diff --checkChecklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
New Features
codexAccountPickerEnabledsetting for account-qualified Codex model rows.Bug Fixes
Documentation