Skip to content

fix: align empty CODEX_HOME with upstream Codex - #104

Merged
abruption merged 2 commits into
mainfrom
abruption/docs-98-codex-home-contract
Oct 7, 2026
Merged

abruption merged 2 commits into
mainfrom
abruption/docs-98-codex-home-contract

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

  • Treat exactly empty CODEX_HOME as unset, matching pinned Codex 0.159.2 and 0.160.0 implementations rather than selecting cwd.
  • Preserve nonempty relative/absolute resolution, whitespace paths, explicit --codex-home precedence, and existing fail-closed unavailable/non-directory handling.
  • Document the compatibility change and fixed-SHA upstream evidence. Deliberate cwd selection remains --codex-home .; no broad canonicalization or parser rewrite is introduced.
  • Add isolated HOME/cwd configuration and CLI regressions, including all four home-selection cases, explicit overrides, invalid selected homes, empty explicit CLI path, help/version, and confirmed absence without native file creation.

Validation

On macOS arm64 / Node 24.16.0:

  • npm ci, npm run check, npm run lint, npm test, npm run smoke:package: passed.
  • New home tests: 27 passed. Full suite: 202 tests, 201 passed, 1 existing case-sensitive-filesystem skip, 0 failures.
  • git diff --check: passed.

Upstream evidence: codex-rs/utils/home-dir/src/lib.rs filters an empty value before home selection in commits ff6aec96948b70d94983af2641a6b67c94faeff5 and a956835d020762cb2b570053af06f643a11c0ecc, linked in the CLI reference. Other upstream versions were not claimed as verified.

PR scope

This PR is independently based on main and intentionally separate from owner classification and signal execution. No user Codex home or session was modified during verification.

Fixes #98.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T05:04:15.398788Z d7dc716 Manual request
🔒 Security Review ✅ Completed 2026-10-07T05:05:11.439476Z d7dc716 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption

Copy link
Copy Markdown
Owner Author

The macOS CI failure was a test-fixture path alias mismatch: a child process canonicalizes its cwd from /var/... to /private/var/.... The follow-up canonicalizes only the fixture root; product behavior is unchanged.

Validation at d7dc716:

  • Reproduced the mismatch using an isolated symlink-alias TMPDIR: 14 passed / 13 failed before; 27/27 passed after.
  • npm ci, npm run check, npm run lint, npm test, and npm run smoke:package passed.
  • Full suite: 202 tests, 201 passed, 1 existing filesystem-dependent skip, 0 failures.

Please review the latest HEAD; the existing reviews cover the previous commit. This PR is intentionally left open pending review and merge approval.

@codex review
@codex security review

@abruption

Copy link
Copy Markdown
Owner Author

@codex security review Please review the latest HEAD d7dc716; the previous security review covers 23220a7.

@abruption

Copy link
Copy Markdown
Owner Author

Combined-candidate validation also passed, without merging or publishing anything.

The candidate contains exactly the changes from #103 (0b7ecf5), #104 (d7dc716), and #105 (49a479d). All 12 changed file blobs match their source branches; there were no cherry-pick conflicts or extra changes.

On macOS arm64 / Node 24.16.0:

  • npm ci, npm run check, npm run lint, npm test, npm run smoke:package, and npm run smoke:platform passed.
  • Combined suite: 218 tests, 217 passed, 1 existing filesystem-dependent skip, 0 failures.
  • Refusal and signal regressions use isolated fixtures and real advisory locks; no actual Codex session was signaled or native user home changed.

All three PRs remain open. Integration validation is not merge approval, and Codex reviews must cover each latest HEAD before any merge decision.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: d7dc716488

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: d7dc716488

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@abruption
abruption merged commit c41b5ab into main Oct 7, 2026
23 checks passed
@abruption
abruption deleted the abruption/docs-98-codex-home-contract branch October 7, 2026 08:49
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.

[P3] Verify and document the policy for an empty CODEX_HOME

1 participant