engine/codergen: seed codex auth when HOME is unset#43
engine/codergen: seed codex auth when HOME is unset#43danshapiro wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41cfd85bd9
ℹ️ 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".
| windowsHomeFromParts(envSliceValue(baseEnv, "HOMEDRIVE"), envSliceValue(baseEnv, "HOMEPATH")), | ||
| windowsHomeFromParts(os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH")), |
There was a problem hiding this comment.
Gate Windows home fallbacks to Windows hosts
codexSourceHome always considers HOMEDRIVE/HOMEPATH, even on Linux/macOS. When HOME and USERPROFILE are unset but those Windows vars are present (for example in mixed-shell or WSL-launched environments), windowsHomeFromParts can return C:\Users\..., which is not an absolute Unix path; this candidate is selected before os.UserHomeDir(), so codexStateBaseRoot() can resolve state under the current working directory with a literal C:\... segment and auth/config seeding will target the wrong directory.
Useful? React with 👍 / 👎.
Summary
Validation