Repository navigation
Add Codex desktop catalog integration tests - #1226
Conversation
Cover the shared ~/.codex/config.toml catalog pointer that the Codex desktop app reads: configure twice beside user settings, bare codex app-server model/list, unchanged repeat, revert, and a user-owned catalog pointer that must survive. Co-authored-by: Isaac <no-reply@databricks.com>
|
/ug-review |
Polly AI ReviewBlocking issues
Security vulnerabilitiesNone identified in the changed code. Non-blocking notes
ApproachThe installed-CLI configure → repeat configure → revert journey is appropriate for checking command wiring and filesystem ownership. Existing session and managed-config primitives avoid new scaffolding. SummaryDiff size (computed): 3 files; +87 / -1 lines (88 changed text lines); 0 binary files.
Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements. ChangesAdds shared-config lifecycle and custom-catalog preservation coverage, plus coverage documentation. No production code, dependencies, or generated assets change. The size is proportionate; no unnecessary scaffolding was found. TestsTest-by-test assessment
Existing tests cover catalog contents, bare app-server No pytest, collection, lint, or live suite was independently executed. The reported results remain unverified. Only the synthetic Windows-path TOML failure and encoding fix were executed offline; the corrected lifecycle cases still need Linux and Windows integration verification. ScopeAll three changed files support the stated catalog-lifecycle coverage outcome. No unrelated changes were found. The broader CI selection caused by Automated review by Polly · workflow run |
- Quote the user catalog path as JSON so the TOML stays valid on Windows. - Drop the live marker, matching the other managed-fixture Codex tests. - Drop the revert half of the repeat-configure test; the managed model discovery test already covers it. - ug revert now deletes ug's stable catalog even when the user's own model_catalog_json pointer is kept, and the user-catalog test checks it. Co-authored-by: Isaac <no-reply@databricks.com>
Drop the ug revert change, its unit test, and the leftover-catalog assertion; this PR only adds integration tests. Co-authored-by: Isaac <no-reply@databricks.com>
What
Adds black-box integration tests for how
ugsets up the Codex desktop app, modeled on the Claude Desktop lifecycle test (tests/integration/test_ug_configure_claude_desktop.py, #1072). The desktop app reads the shared~/.codex/config.toml, whereugpointsmodel_catalog_jsonat its stable catalog~/.ucode/codex-model-catalog.json.New file
tests/integration/test_ug_configure_codex_desktop.py(markersmanaged_fixtureandcodex, like the other managed Codex tests; fixturemanaged_workspace_default):test_ug_configure_codex_desktop_repeat_configure: the user already has settings in~/.codex/config.toml.ug configureadds only the catalog pointer, keeps the user's settings, and prints thecodex app-server daemon restartnotice.config.tomland the catalog byte-identical and prints no restart notice.test_ug_configure_codex_desktop_keeps_user_catalog: the user already points the desktop app at their own catalog.custom model catalog) and changes neither file.Already covered elsewhere, so not repeated: the catalog's model list and a bare
codex app-servermodel/list(test_ug_configure_managed_codex), and revert removingug's pointer and catalog while keeping user settings (test_case_02_managed_codex_uses_admin_discovery_after_configure).Not covered
ug revertleaves~/.ucode/codex-model-catalog.jsonbehind when the user keeps their ownmodel_catalog_jsonpointer. That is not fixed here, so the user-catalog test does not assert it.tests/AGENTS.mdkeeps tracing out of this suite, and CI runners have no systemd user bus.Docs
tests/integration/README.md: file-tree entry and a Codex desktop coverage paragraph.tests/README.md: the "Desktop Codex app" row now names this coverage.Tests
uv run pytest tests/test_integration_contract.py: 80 passed; the new file collects 2 tests. ruff check and format are clean.This pull request and its description were written by Isaac.