fix(agent): report OpenClaw via canonical ClawHub path in status (sable-1vq)#157
Merged
Merged
Conversation
…le-1vq) rf-zgwj moved the OpenClaw skill to ~/.openclaw/workspace/skills/rafter-security/ SKILL.md and strips the legacy ~/.openclaw/skills/rafter-security.md flat file. `agent verify` and the installer were updated; `agent status` and the Python SkillManager were not. Effect: after a correct `agent init --with-openclaw`, `agent status` reported "detected but skill missing" (false negative) while `agent verify` reported it installed, and `audit-skill` saw openClawAvailable=false. Fixes: - Node status.ts: detect via SkillManager (canonical path) with a legacy-file migration hint; matches verify. - Node init.ts: success message now prints the real destination (result.destPath) instead of the hardcoded legacy path. - Python SkillManager: ported to the canonical ClawHub paths in parity with node/src/utils/skill-manager.ts (get_openclaw_root, workspace skills dir, get_legacy_rafter_skill_path, has_legacy_rafter_skill). This also corrects audit-skill's openClawAvailable / rafterSkillInstalled fields. - Python status: same canonical detection + migration hint. Tests: 5 Node (status installed/missing/legacy/not-detected + status↔verify agree + init message path) and 8 Python (status reporting + SkillManager canonical paths and installer round-trip). 139 agent-suite Python tests green. Detection-only change: paths are fixed home()-relative literals (no user input, no traversal); no new deserialization, shell, or exec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While investigating OpenClaw scaffolding (sable-1vq), found a false-negative introduced by the rf-zgwj path migration. rf-zgwj moved the OpenClaw skill from the legacy flat file
~/.openclaw/skills/rafter-security.mdto the canonical ClawHub path~/.openclaw/workspace/skills/rafter-security/SKILL.md(and strips the legacy file on install).agent verifyand the installer were updated;agent statusand the PythonSkillManagerwere not.Live repro (before fix), after a correct
rafter agent init --with-openclaw:Also: the Node init success message hardcoded the legacy path, and Python
SkillManager(used byaudit-skill) reportedopenClawAvailable=false/rafterSkillInstalled=falseeven when installed.Fix
status.ts— detect viaSkillManager(canonical path) with a legacy-file migration hint; now matchesverify.init.ts— success message prints the realresult.destPathinstead of the hardcoded legacy path.SkillManager— ported to the canonical ClawHub paths in parity withnode/src/utils/skill-manager.ts(get_openclaw_root, workspace skills dir,get_legacy_rafter_skill_path,has_legacy_rafter_skill). Correctsaudit-skill's OpenClaw fields too.status— same canonical detection + migration hint.Tests
openclaw-integration.test.ts): status reports installed at canonical path; status↔verify agree; detected-but-missing; legacy-only migration hint; not-detected; init message names the canonical path. 27/27 pass.test_agent_status.py): status reporting (4 states) +SkillManagercanonical paths / root detection / installer round-trip / legacy detection. 139/139 agent-suite Python tests pass.Security
Detection-only change: all paths are fixed
home()-relative literals (no user input, no traversal — CWE-22 N/A); no new deserialization, shell, or exec.rafter secretsclean for changed files.🤖 Generated with Claude Code