diff --git a/src/context.js b/src/context.js index 475674e0..c49c3f2d 100644 --- a/src/context.js +++ b/src/context.js @@ -289,6 +289,7 @@ const MANAGED_REPO_SCAN_IGNORED_FOLDERS = [ const MANAGED_GITIGNORE_PATHS = [ '.omx/', '.omc/', + '.codex/', '!.vscode/', '.vscode/*', '!.vscode/settings.json', diff --git a/test/cli-args-dispatch.test.js b/test/cli-args-dispatch.test.js index f5c33207..84c95483 100644 --- a/test/cli-args-dispatch.test.js +++ b/test/cli-args-dispatch.test.js @@ -215,6 +215,7 @@ test('shared context keeps the drift-prone help text, gitignore paths, and relea assert.match(descriptions.get('setup'), /--current/); assert.match(descriptions.get('doctor'), /--current/); + assert.ok(MANAGED_GITIGNORE_PATHS.includes('.codex/')); assert.ok(MANAGED_GITIGNORE_PATHS.includes('!.vscode/')); assert.ok(MANAGED_GITIGNORE_PATHS.includes('.vscode/*')); assert.ok(MANAGED_GITIGNORE_PATHS.includes('!.vscode/settings.json')); diff --git a/test/helpers/install-test-helpers.js b/test/helpers/install-test-helpers.js index 8280df24..4406c41c 100644 --- a/test/helpers/install-test-helpers.js +++ b/test/helpers/install-test-helpers.js @@ -136,6 +136,7 @@ function runHumanCmd(cmd, args, cwd, options = {}) { function assertZeroCopyManagedGitignore(content) { assert.match(content, /# multiagent-safety:START/); + assert.match(content, /^\.codex\/$/m); assert.match(content, /^!\.vscode\/$/m); assert.match(content, /^\.vscode\/\*$/m); assert.match(content, /^!\.vscode\/settings\.json$/m); diff --git a/test/setup.test.js b/test/setup.test.js index 50c8a00e..dcf03524 100644 --- a/test/setup.test.js +++ b/test/setup.test.js @@ -160,6 +160,7 @@ test('setup provisions workflow files and repo config', () => { assert.doesNotMatch(gitignoreContent, /^scripts\/agent-file-locks\.py$/m); assert.match(gitignoreContent, /^\.githooks$/m); assert.doesNotMatch(gitignoreContent, /^\.githooks\/pre-commit$/m); + assert.match(gitignoreContent, /^\.codex\/$/m); assert.match(gitignoreContent, /\.omx\//); assert.match(gitignoreContent, /\.omc\//); assert.match(gitignoreContent, /oh-my-codex\//);