fix(skill-install): refresh OpenClaw skills after update (Fixes #1911)#1946
fix(skill-install): refresh OpenClaw skills after update (Fixes #1911)#1946deepujain wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughpostInstall now accepts an injectable SSH executor and is invoked unconditionally after skill install, causing the session/index refresh to run for both fresh installs and updates; a new test exercises postInstall with a stubbed ssh executor validating mirror commands and session clearing. Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(200,230,255,0.5)
participant CLI as Nemoclaw CLI
participant PI as postInstall
participant SSH as sshExec / sshExecImpl
participant SBD as Sandbox (/.openclaw/skills, sessions.json)
end
CLI->>PI: call postInstall(ctx, paths, skillDir)
PI->>SSH: runSsh("mkdir -p $HOME/.openclaw/skills/<skill>")
SSH-->>SBD: create/mirror skill files
PI->>SSH: runSsh("cat ... > $HOME/.openclaw/skills/<skill>/SKILL.md")
SSH-->>SBD: write mirrored SKILL.md
PI->>SSH: runSsh("printf '{}' > /sandbox/.openclaw-data/agents/main/sessions/sessions.json")
SSH-->>SBD: overwrite sessions.json (clears agent sessions)
PI-->>CLI: return { success: true, messages: [] }
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Added the missing docstring coverage cleanup on the touched skill-install entrypoint and reran the local checks. Build, CLI typecheck, and the skill-install test all pass here. |
|
✨ Possibly related open issues: |
Fixes NVIDIA#1911 Signed-off-by: Deepak Jain <deepujain@gmail.com>
Fixes NVIDIA#1911 Signed-off-by: Deepak Jain <deepujain@gmail.com>
e31c80c to
3b19d71
Compare
|
Rebased this onto current main and reran the touched-path checks. Build, CLI typecheck, and the skill-install test still pass here. |
fix(skill-install): refresh OpenClaw sessions after skill updates (Fixes #1911)
Summary
Fixes #1911.
OpenClaw was writing the updated
SKILL.mdinto the sandbox, butnemoclaw <sandbox> skill installstill skipped the session refresh on updates. That left the agent serving stale skill content for an existing session even though the on-disk skill had changed.This change keeps the existing mirror step and always clears the OpenClaw session index after install or update so the next session reloads the latest skill content.
Changes
src/nemoclaw.ts: stop telling post-install to skip the OpenClaw refresh on updates.src/lib/skill-install.ts: keep the mirror step and always clearsessions.jsonfor OpenClaw installs unless a caller explicitly opts out.src/lib/skill-install.test.ts: add coverage that the OpenClaw post-install flow mirrors the skill and refreshes the session index.Testing
npm run build:clinpm run typecheck:clinpm test -- src/lib/skill-install.test.tsnpm testEvidence it works
npm teststill hits unrelated pre-existing suite failures in this environment, including:test/install-preflight.test.tstest/legacy-path-guard.test.tssrc/lib/preflight.test.tssrc/lib/sandbox-version.test.tstest/security-c2-dockerfile-injection.test.tsSigned-off-by: Deepak Jain deepujain@gmail.com
Summary by CodeRabbit
Bug Fixes
Improvements
Tests