fix(codex): use project cwd for skill discovery#2330
fix(codex): use project cwd for skill discovery#2330Derpedyea wants to merge 13 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved Straightforward bug fix that uses the configured server working directory for Codex skill discovery instead of always using You can customize Macroscope's approvability policy. Learn more. |
|
lgtm |
…into fix/codex-repo-skill-discovery
Dismissing prior approval to re-evaluate 5699f40
|
Just fixed merge conflicts should be fine now. |
|
@Derpedyea is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
What Changed
Codex provider status checks now pass the configured T3 project cwd into the Codex app-server probe instead of always using
process.cwd().This lets Codex discover repo-level skills from the active project, including skills under
.agents/skills.The change also adds a focused regression test that verifies the Codex probe receives
ServerConfig.cwd.Why
Codex discovers repo-level skills relative to the cwd used by the app-server provider probe.
When T3 Code is launched from a different directory than the active project,
process.cwd()can point at the T3 server/runtime directory instead of the project directory. In that case, repo-level Codex skills do not appear even though they are valid for the project.Using
ServerConfig.cwdkeeps skill discovery aligned with the project T3 is serving.UI Changes
No UI changes.
Test Plan
bunx vitest run apps/server/src/provider/Layers/ProviderRegistry.test.tsbun run lint apps/server/src/provider/Layers/CodexProvider.ts apps/server/src/provider/Layers/ProviderRegistry.test.tsbun run fmt:check apps/server/src/provider/Layers/CodexProvider.ts apps/server/src/provider/Layers/ProviderRegistry.test.tsbun run typecheck --filter=t3Checklist
Note
Low Risk
Low risk: only changes the
cwdused during Codex provider probing (with a fallback toprocess.cwd()), affecting skill discovery but not auth or data handling.Overview
Codex provider status checks now pass the configured project working directory (
ServerConfig.cwd) into the Codex app-server probe instead of always usingprocess.cwd(), improving repo-scoped skill discovery when the server is launched from a different directory.Adds a focused regression test ensuring
checkCodexProviderStatusforwards the configuredcwdwhenServerConfigis available.Reviewed by Cursor Bugbot for commit 1bdad43. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix
checkCodexProviderStatusto use projectcwdfor Codex skill discoveryReplaces the hardcoded
process.cwd()inCodexProvider.tswith thecwdfromServerConfigwhen available, falling back toprocess.cwd()if not. A new test inProviderRegistry.test.tsverifies the probe receives the configuredcwd.Macroscope summarized 1bdad43.