Skip to content

Allow Codex commits in standalone repositories - #254

Merged
itsHabib merged 2 commits into
mainfrom
codex/standalone-git-writable-root
Aug 29, 2026
Merged

Allow Codex commits in standalone repositories#254
itsHabib merged 2 commits into
mainfrom
codex/standalone-git-writable-root

Conversation

@itsHabib

@itsHabib itsHabib commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Codex local runs could edit files in standalone repositories but could not commit because the sandbox left the repository's .git directory read-only. This adds the validated standalone Git metadata directory as an explicit writable root while preserving the linked-worktree and separate-git-dir boundaries.

What this adds

Standalone repository Git writes

  • Allows the spawned Codex process to write a canonical, direct-child .git directory for an ordinary repository.
  • Canonicalizes symlinked workdirs before repository discovery.
  • Rejects symlinked .git paths without imposing case-sensitive path spelling.
  • Preserves the existing linked-worktree metadata roots and separate-git-dir refusal.

Regression coverage

  • Covers canonical standalone repositories, symlinked workdirs, symlink rejection, filesystem casing, linked worktrees, and separate-git-dir repositories.

Validation

  • make check
  • pnpm --filter @ship/codex-runner test — 99 tests passed
  • Ubuntu and Windows CI at 21300c3920083f77e51f20cfea7e0e79624f3490
  • Codex exact-head review found no major issues
  • Minimal Codex sandbox probe: commit blocked before the writable-root change and succeeded when .git was admitted
  • RoxIQ Gauntlet rehearsal gnt_20260827T230200Z_1c7dc381485baa99 completed pass/none with a Codex-created repair commit

@itsHabib

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23f8fb58f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/codex-runner/src/linked-worktree-writes.ts Outdated
Comment thread packages/codex-runner/src/linked-worktree-writes.ts
@itsHabib

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 21300c3920

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@itsHabib
itsHabib merged commit d57807b into main Aug 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant