Repository navigation
Remove per-launch Codex model catalogs on ug revert - #1224
Merged
Merged
Conversation
ug codex --provider writes ~/.ucode/codex-model-catalog-<hash>.json per workspace and scope, and nothing ever deleted them. ug revert now removes them alongside the shared catalog. Co-authored-by: Isaac <no-reply@databricks.com>
masonc08
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Codex launches that discover models write a per-launch catalog,
~/.ucode/codex-model-catalog-<hash>.json, and reference it from~/.codex/ucode.config.toml. The hash is derived from the workspace and the launch's scope, so each source gets its own file:ug codex --provider <name>provider:<name>ug codex --model-location <catalog>.<schema>parent:<catalog>.<schema>ug codexwith a model location saved byug configureparent:<catalog>.<schema>Nothing ever deleted these files, so they piled up and survived
ug revert.ug revertnow deletes everycodex-model-catalog-*.jsonnext to the shared catalog, whichever launch wrote it. By then revert has already restoreducode.config.toml, the only file that names them.Notes
revert_legacy_shared_config's return value is unchanged: it still reports only config edits, so the revert summary prints the same lines.Tests
TestCodexRevertLegacySharedConfig::test_strips_ucode_app_catalog_referenceto create a per-launch catalog and assert revert removes it. Deletion matches the file name, not the scope, so one scope covers both--providerand--model-locationfiles.uv run pytest tests/test_agent_codex.py tests/test_cli.py -k 'revert or Revert or catalog': 38 passed. ruff check and format are clean.This pull request and its description were written by Isaac.
E2E Test:
Screen.Recording.2026-10-21.at.1.57.12.PM.mov