fix(cli): wire remote eligibility into CLI skills status commands#94973
fix(cli): wire remote eligibility into CLI skills status commands#94973lzyyzznl wants to merge 1 commit into
Conversation
|
Thanks for the context here. I did a careful shell check against current Close: current main already fixes the linked CLI/Gateway skills-status regression with a Gateway-first Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the current-main Gateway-first skills status implementation and close duplicate PRs for the fixed regression; track any separate doctor or offline-status behavior narrowly. Do we have a high-confidence way to reproduce the issue? Yes. Source history shows the old released bug was the local-only CLI status path, and current main now reproduces the expected fixed path by querying Gateway Is this the best way to solve the issue? Yes for current main, not for this branch. Gateway owns live remote-node eligibility, so the landed Gateway-first status path is the maintainable fix and the PR's process-local fallback wiring is no longer needed. Security review: Security review cleared: The diff imports existing local runtime helpers into CLI status code and adds test mocks; no dependency, workflow, package-resolution, secret, or supply-chain surface change was found. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 583829a342cb; fix evidence: commit f69f81af9ebe, main fix timestamp 2026-06-19T18:28:39+02:00. |
- Add dynamic imports for getRemoteSkillEligibility and canExecRequestNode in loadSkillsStatusReport, matching the Gateway's buildRemoteAware- WorkspaceSkillStatus pattern - CLI commands (skills list/check/info) now account for remote macOS nodes when determining skill eligibility, fixing apple-notes remaining ineligible on Linux gateways with connected macOS exec nodes - Add mocks for remote eligibility imports in skills-cli.commands.test.ts Fixes openclaw#94956
f377153 to
2194f25
Compare
|
ClawSweeper applied the proposed close for this PR.
|
Summary
The CLI skills status commands (
openclaw skills list,openclaw skills check,openclaw skills info) use a local-onlyloadSkillsStatusReportpath that bypasses the existing remote-aware Gatewayskills.statusimplementation. This causes macOS-only skills likeapple-notesto report as ineligible on Linux gateway hosts even when a paired, connected macOS exec node resolves the requiredmemobinary viasystem.which.The Gateway's
skills.statushandler already builds remote-aware status viabuildRemoteAwareWorkspaceSkillStatus, which passeseligibility.remotefromgetRemoteSkillEligibility. However, the CLI path inloadSkillsStatusReportcallsbuildWorkspaceSkillStatuswithout the remote eligibility option, creating a CLI/Gateway status mismatch.This fix wires remote eligibility into the CLI path by adding dynamic imports for
getRemoteSkillEligibilityandcanExecRequestNode, matching the exact pattern used by the Gateway,status-all/report-data, andchat-commandsmodules. The change is purely structural — no new logic is introduced — and when no remote macOS node is connected,getRemoteSkillEligibilityreturnsundefinedmaking behavior identical to before the fix.Fixes #94956
Real behavior proof
Behavior addressed: CLI skills status commands (list, check, info) did not consider remote macOS exec nodes when evaluating skill eligibility, causing apple-notes to report os:darwin and bins:memo as missing even when a connected macOS node resolves memo via system.which.
Real environment tested: Linux x86_64 (Ubuntu 24.04.4 LTS, kernel 6.8.0-124-generic), Node.js v25.9.0, OpenClaw main @ b3dfa0f
Exact steps or command run after this patch: node scripts/run-vitest.mjs src/cli/skills-cli.commands.test.ts src/skills/runtime/remote.test.ts src/skills/discovery/status.test.ts (all 3 test suites)
After-fix evidence:
Observed result after the fix: All 76 tests across 3 suites pass. The loadSkillsStatusReport function now includes eligibility.remote in its buildWorkspaceSkillStatus call, matching the Gateway's buildRemoteAwareWorkspaceSkillStatus pattern. When a remote macOS node is connected with memo available, getRemoteSkillEligibility will return platforms:darwin with resolved bins, making apple-notes eligible. The existing remote.test.ts suite validates this logic and passes unchanged.
What was not tested: End-to-end verification with a live macOS remote node was not performed (no macOS node available in this environment). The fix follows the identical import and call pattern used by src/gateway/server-methods/skills.ts, src/commands/status-all/report-data.ts, and src/skills/discovery/chat-commands.ts, all validated in production. The remote eligibility logic itself is unchanged and covered by its existing test suite.
Tests and validation
Unit tests
All 76 tests across 3 test suites pass:
Integration / E2E
The fix is purely structural — it wires an existing, tested code path (
getRemoteSkillEligibility+canExecRequestNode) into the CLI entry point. No new logic is introduced. The Gateway'sskills.statushandler and thestatus-allreport already use this exact pattern and have been verified in production. Both functions are called dynamically (no new static module dependencies), preserving the existing lazy-load architecture of the CLI module.Risk checklist
getRemoteSkillEligibilityreturnsundefinedand behavior is identical to beforegetRemoteSkillEligibilityreturningundefined(default case)Current review state