fix(cli): tolerate removed cwd in plugin authoring output#106425
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 10:48 AM ET / 14:48 UTC. Summary PR surface: Source +6, Tests +64. Total +70 across 2 files. Reproducibility: yes. at source level: current main calls Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the focused Do we have a high-confidence way to reproduce the issue? Yes at source level: current main calls Is this the best way to solve the issue? Yes. Reusing the existing safe-cwd helper only while formatting final status paths is narrower and more maintainable than changing target resolution, write behavior, or adding a new fallback/configuration path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f167089d6176. Label changesLabel justifications:
Evidence reviewedPR surface: Source +6, Tests +64. Total +70 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
Maintainer proof complete on exact head
Known proof gaps: none. |
|
Merged via squash.
|
What Problem This Solves
openclaw plugins buildandopenclaw plugins initrendered their final output paths withprocess.cwd(). If the launch directory disappeared after the command completed its file writes, Node threwuv_cwdand turned successful authoring work into a reported failure.Why This Change Was Made
Plugin-authoring output now uses the existing
tryProcessCwd()boundary. It preserves relative paths while cwd is available and falls back to the already resolved absolute target when it is not.User Impact
Plugin build/init commands with explicit absolute targets can finish cleanly even if their launch directory is removed before final status output. Normal relative-path output is unchanged.
Evidence
node scripts/run-vitest.mjs src/cli/plugins-authoring-command.test.ts(13 tests passed).oxfmton both touched files: passed.git diff upstream/main...HEAD --check: passed.AI-assisted: yes (implementation and tests).