fix(vd): honor VD_CODEX_HOME in vd install codex - #101
Conversation
Auto-detect already treated $VD_CODEX_HOME as the Codex home, but user-scope install always wrote ~/.agents/skills. Match Cursor: codexDest now writes $VD_CODEX_HOME/skills when that inventory override is set. Default remains ~/.agents/skills. Co-authored-by: Duc Nguyen <me@vanducng.dev>
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). |
Code Review SummaryWhat changed:
Review referenceRun again
Priority
Review context Last reviewed commit |
| // codexHome matches inventory discovery: $VD_CODEX_HOME if set, else ~/.agents. | ||
| func codexHome() (string, error) { | ||
| if home := os.Getenv("VD_CODEX_HOME"); home != "" { | ||
| return home, nil | ||
| } |
There was a problem hiding this comment.
obs skill registry misses $VD_CODEX_HOME installs
codexDest now writes user-scope Codex skills to $VD_CODEX_HOME/skills, but DefaultSkillRoots in internal/obs/ingest/skillnames.go still scans only ~/.agents/skills and ~/.codex/skills, and its comment calls those "the Codex-side install locations vd writes to".
For users with VD_CODEX_HOME set, vd install codex now lands skills in a directory obs never reads, so vd obs attributes those skills' invocations to (none) with no warning.
Should DefaultSkillRoots (or its caller) also honor VD_CODEX_HOME so install and attribution stay in sync?
Follow-up to #99 (merged). The review on that PR found a P2: auto-detect treated
$VD_CODEX_HOMEas the Codex home, butvd installstill always wrote~/.agents/skills.Which side moved
Install dest now honors
$VD_CODEX_HOME, matching Cursor (cursorHome/VD_CURSOR_HOME) and inventory (Service.platformRoots). Detection stays as it is.The review suggestion to detect
~/.agentsonly would have left inventory and auto-detect disagreeing whenever$VD_CODEX_HOMEis set. Skills would still land where inventory never scans.Behavior
$VD_CODEX_HOME$HOME/.agents/skills(unchanged default)$VD_CODEX_HOME/skillsRepo scope is still
<repo>/.agents/skills. Explicit--destis unchanged.Tests
TestCodex_UserScopeUsesAgentsSkillsTestCodex_UserScopeHonorsVDCodexHomeTestRunInstall_AutoCodexHonorsVDCodexHomego test ./internal/install/ ./internal/cli/ ./internal/inventory/