fix(deploy): track Codex model catalog without .gitignore negation#25
Open
fix(deploy): track Codex model catalog without .gitignore negation#25
Conversation
`databricks sync` doesn't honor `.gitignore` negation patterns, so `.codex/* + !.codex/databricks-models.json` was effectively excluding the catalog file along with everything else under `.codex/`. The deployed app's `~/.codex/` ended up without `databricks-models.json`, and `setup_codex.py` silently skipped the copy (catalog_src didn't exist on the synced machine), leaving config.toml referencing a file that didn't exist. Result: every `codex` invocation in the deployed app errored with "Error loading configuration: No such file or directory (os error 2)". Replace the blanket-ignore + negation with explicit per-file/dir ignores. Same set of runtime artifacts ignored, catalog now sync-clean. Verified locally: - `git check-ignore .codex/databricks-models.json` → not ignored - `git check-ignore .codex/config.toml` (and other runtime files) → still ignored Co-authored-by: Isaac
Collaborator
Author
|
@datasciencemonkey — flagging for priority review. P0: Codex CLI is fully broken on every deploy until this lands. One-file change ( |
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.
Priority
P0 — Codex CLI is fully broken on deploy. Every deployed app fails with
Error loading configuration: No such file or directory (os error 2)the first time a user typescodex. Only this one-file gitignore change is needed to restore Codex.Summary
Fix for #24. Codex CLI errors with
Error loading configuration: No such file or directory (os error 2)on every deployed app becausedatabricks syncdoesn't honor.gitignorenegation patterns — it was excluding.codex/databricks-models.jsonalong with the rest of.codex/, so the deployed~/.codex/ended up without the model catalog thatconfig.tomlreferences.Change
Replaces in
.gitignore:Verification
Test plan
~/.codex/databricks-models.jsonexists in the running container.codexin the deployed terminal — should not error with "No such file or directory".Why not
.databricksignoreinstead.databricksignoreis the alternative override path, but it's likely backed by the same gitignore parser — so a negation pattern there might also be skipped. Restructuring.gitignoreto not need negation eliminates the ambiguity for every tool that reads it (databricks-cli, Docker, VSCode hover-ignored-decoration, etc.) rather than papering over it for just one.Closes #24
This pull request and its description were written by Isaac.
Test Evidence (verified on the live deployment 2026-05-06)
Captured from the user's deployed terminal at
https://coding-agents-7405613340366915.15.azure.databricksapps.com:So the
.codex/directory never made it into the synced workspace.setup_codex.pyran (other files in~/.codex/are present from setup) butcatalog_src.exists()was False on the synced machine, silently skipping the copy.After this fix lands, redeploy and verify with
[ -f ~/.codex/databricks-models.json ] && echo OK.