From 2ef2eab4072909b2a77e2f903882965f1f5974d6 Mon Sep 17 00:00:00 2001 From: David O'Keeffe Date: Wed, 6 May 2026 18:46:38 +1000 Subject: [PATCH] fix(deploy): track Codex model catalog without .gitignore negation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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 --- .gitignore | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b05e3f9..7b09b54 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,21 @@ uploads/ # uv lockfile — not portable across PyPI proxies, generate locally with `uv lock` uv.lock -# Codex CLI generated/cached files (only the bundled model catalog is tracked) -.codex/* -!.codex/databricks-models.json +# Codex CLI generated/cached files. The bundled model catalog +# (.codex/databricks-models.json) is tracked. Listed file-by-file rather +# than `.codex/* + !.codex/databricks-models.json` because `databricks sync` +# (and several other gitignore-honoring tools) doesn't respect the negation +# pattern — that broke the deploy of databricks-models.json to the app +# workspace, which Codex needs to start. +.codex/config.toml +.codex/.env +.codex/AGENTS.md +.codex/.personality_migration +.codex/memories/ +.codex/tmp/ +.codex/sessions/ +.codex/cron/ +.codex/skills/ # Codex skills are generated at runtime by setup_codex.py from .claude/skills/ .agents/