Skip to content

fix(agent): report OpenClaw via canonical ClawHub path in status (sable-1vq)#157

Merged
Raftersecurity merged 1 commit into
mainfrom
fix/openclaw-status-canonical-path-sable-1vq
Jun 1, 2026
Merged

fix(agent): report OpenClaw via canonical ClawHub path in status (sable-1vq)#157
Raftersecurity merged 1 commit into
mainfrom
fix/openclaw-status-canonical-path-sable-1vq

Conversation

@Rome-1
Copy link
Copy Markdown
Collaborator

@Rome-1 Rome-1 commented Jun 1, 2026

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.md to the canonical ClawHub path ~/.openclaw/workspace/skills/rafter-security/SKILL.md (and strips the legacy file on install). agent verify and the installer were updated; agent status and the Python SkillManager were not.

Live repro (before fix), after a correct rafter agent init --with-openclaw:

OpenClaw:     detected but skill missing — run: rafter agent init --with-openclaw   # status (WRONG)
✓ OpenClaw: Rafter skill installed (v0.8.3)                                          # verify (right)

Also: the Node init success message hardcoded the legacy path, and Python SkillManager (used by audit-skill) reported openClawAvailable=false / rafterSkillInstalled=false even when installed.

Fix

  • Node status.ts — detect via SkillManager (canonical path) with a legacy-file migration hint; now matches verify.
  • Node init.ts — success message prints the real 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). Corrects audit-skill's OpenClaw fields too.
  • Python status — same canonical detection + migration hint.

Tests

  • Node (5 new in 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.
  • Python (8 new in test_agent_status.py): status reporting (4 states) + SkillManager canonical 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 secrets clean for changed files.

🤖 Generated with Claude Code

…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>
@Raftersecurity Raftersecurity merged commit 9f6dfdf into main Jun 1, 2026
@Raftersecurity Raftersecurity deleted the fix/openclaw-status-canonical-path-sable-1vq branch June 1, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants