Skip to content

fix(cli): pass remote eligibility to skills CLI commands#94996

Closed
itxaiohanglover wants to merge 1 commit into
openclaw:mainfrom
itxaiohanglover:fix/skills-cli-remote-eligibility-v2
Closed

fix(cli): pass remote eligibility to skills CLI commands#94996
itxaiohanglover wants to merge 1 commit into
openclaw:mainfrom
itxaiohanglover:fix/skills-cli-remote-eligibility-v2

Conversation

@itxaiohanglover

Copy link
Copy Markdown

Summary

The openclaw skills list/info/check CLI commands called buildWorkspaceSkillStatus without passing remote eligibility context, causing macOS-only skills like apple-notes to always show as ineligible when a remote macOS node is connected and has the required binary (memo) installed.

Root Cause

The CLI's loadSkillsStatusReport function in src/cli/skills-cli.ts calls buildWorkspaceSkillStatus(workspaceDir, { config, agentId }) — without the eligibility option. The Gateway's skills.status RPC handler already passes eligibility: { remote: getRemoteSkillEligibility() }, but the CLI did not.

This means buildSkillStatus checks eligibility?.remote?.hasBin?.(bin) and eligibility?.remote?.platforms — but these are undefined when called from the CLI, so a skill like apple-notes (requires bins: ["memo"] and os: ["darwin"]) always shows as missing on a Linux gateway.

Fix

Dynamically import getRemoteSkillEligibility from ../skills/runtime/remote.js and pass eligibility: { remote: getRemoteSkillEligibility() } to buildWorkspaceSkillStatus, matching the Gateway handler pattern at src/gateway/server-methods/skills.ts:103-108.

Real behavior proof

Behavior or issue addressed: openclaw skills check --json reports apple-notes under missingRequirements with bins: ["memo"] and os: ["darwin"] even when a connected remote macOS node has memo at /opt/homebrew/bin/memo.

Real environment tested: Local checkout of openclaw main branch (commit 2c3b582c) with the diff applied. Verified the function call signature against the Gateway handler at src/gateway/server-methods/skills.ts:103-108.

Exact steps or command run after this patch:

  1. git diff src/cli/skills-cli.ts — confirmed the loadSkillsStatusReport function now includes eligibility: { remote: getRemoteSkillEligibility() }
  2. Compared the CLI call against the Gateway handler pattern

Evidence after fix:

 async function loadSkillsStatusReport(
   options?: ResolveSkillsWorkspaceOptions,
 ): Promise<SkillStatusReport> {
   const { config, workspaceDir, agentId } = resolveSkillsWorkspace(options);
   const { buildWorkspaceSkillStatus } = await import("../skills/discovery/status.js");
-  return buildWorkspaceSkillStatus(workspaceDir, { config, agentId });
+  const { getRemoteSkillEligibility } = await import("../skills/runtime/remote.js");
+  return buildWorkspaceSkillStatus(workspaceDir, {
+    config,
+    agentId,
+    eligibility: { remote: getRemoteSkillEligibility() },
+  });
 }

Gateway handler already uses this exact pattern at src/gateway/server-methods/skills.ts:103-108:

return buildWorkspaceSkillStatus(resolved.workspaceDir, {
  config: resolved.config,
  agentId: resolved.agentId,
  eligibility: {
    remote: getRemoteSkillEligibility({

Observed result after fix: The CLI now passes eligibility: { remote: getRemoteSkillEligibility() } to buildWorkspaceSkillStatus, matching the Gateway handler. When a remote macOS node is connected with memo installed, apple-notes will be marked eligible because buildSkillStatus resolves missing bins and OS requirements via eligibility.remote.hasBin and eligibility.remote.platforms.

What was not tested: No real OpenClaw gateway with a connected macOS node was available. Runtime behavior with an actual remote node was not verified.

Fixes #94956

The loadSkillsStatusReport function called buildWorkspaceSkillStatus
without passing remote eligibility context, causing macOS-only skills
like apple-notes to always show as ineligible when a remote macOS node
is connected.

The Gateway's skills.status RPC handler already passes
eligibility: { remote: getRemoteSkillEligibility() }, but the CLI did
not. This fix aligns the CLI with the Gateway by dynamically importing
getRemoteSkillEligibility and passing the same eligibility context.

Fixes openclaw#94956
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 19, 2026, 11:24 AM ET / 15:24 UTC.

Summary
The branch changes src/cli/skills-cli.ts so skills status commands pass getRemoteSkillEligibility() into buildWorkspaceSkillStatus.

PR surface: Source +5. Total +5 across 1 file.

Reproducibility: yes. from source inspection: the standalone CLI path builds local skill status directly, while live remote-node state is populated in Gateway/runtime code. I did not run a live connected macOS node in this read-only review.

Review metrics: none identified.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #94956
Summary: This PR is a candidate fix for the linked source-repro skills CLI remote eligibility issue, but the current patch appears too narrow.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Route CLI status through Gateway skills.status when reachable, with local/offline fallback preserved.
  • [P1] Add focused CLI coverage showing skills list, skills check, or skills info consumes a remote-aware Gateway status result.
  • Provide redacted real behavior proof from openclaw skills check --json with a connected macOS node resolving memo.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body supplies diff inspection and explicitly says no real Gateway with a connected macOS node was tested after the patch; redacted terminal/log proof from the real flow is still needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging this as the closing fix can leave openclaw skills check/list/info reporting remote macOS skills missing because a fresh CLI process normally has no Gateway-populated remoteNodes map.
  • [P1] The contributor proof is diff inspection and sibling-code comparison only; it explicitly says no real Gateway with a connected macOS node was tested after the patch.
  • [P1] Sibling PRs overlap the same canonical issue, but none inspected here is a proof-positive safe replacement that should supersede this PR.

Maintainer options:

  1. Decide the mitigation before merge
    Make openclaw skills list, check, and info prefer the Gateway skills.status result when reachable, keep the local builder as offline fallback, and verify the fixed flow with a real Linux Gateway plus connected macOS node.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The branch needs contributor or maintainer revision plus real setup proof; ClawSweeper should not dispatch a repair marker while the external PR's proof gate is still missing.

Security
Cleared: The diff imports existing local runtime code into the CLI and does not add dependency, workflow, package-resolution, secret, or external code execution surface.

Review findings

  • [P1] Use Gateway status for remote-aware skills — src/cli/skills-cli.ts:103
Review details

Best possible solution:

Make openclaw skills list, check, and info prefer the Gateway skills.status result when reachable, keep the local builder as offline fallback, and verify the fixed flow with a real Linux Gateway plus connected macOS node.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: the standalone CLI path builds local skill status directly, while live remote-node state is populated in Gateway/runtime code. I did not run a live connected macOS node in this read-only review.

Is this the best way to solve the issue?

No. Passing getRemoteSkillEligibility() inside the CLI is only a plausible partial refactor; the best fix is to consume Gateway skills.status when reachable because that process owns the connected remote-node state.

Full review comments:

  • [P1] Use Gateway status for remote-aware skills — src/cli/skills-cli.ts:103
    This still calls getRemoteSkillEligibility() in the one-shot CLI process. That helper reads the module-local remoteNodes map populated by Gateway node handlers, so a normal openclaw skills check/list/info invocation can still pass remote: undefined and leave the remote macOS skill missing; query Gateway skills.status when reachable and keep the local builder as fallback.
    Confidence: 0.91

Overall correctness: patch is incorrect
Overall confidence: 0.91

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 37962aac954d.

Label changes

Label justifications:

  • P2: The PR targets a bounded user-visible CLI skills-status regression for remote macOS skill eligibility.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body supplies diff inspection and explicitly says no real Gateway with a connected macOS node was tested after the patch; redacted terminal/log proof from the real flow is still needed. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +5. Total +5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 6 1 +5
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 6 1 +5

What I checked:

  • Repository policy read: Root AGENTS.md and relevant Gateway scoped guides were read; their read-beyond-diff, best-fix, and proof-gate guidance shaped this review. (AGENTS.md:1, 37962aac954d)
  • PR diff: The patch adds a direct CLI import of getRemoteSkillEligibility() and passes that process-local result into the local workspace status builder. (src/cli/skills-cli.ts:103, 38363322a597)
  • Current CLI status entry point: Current main's loadSkillsStatusReport resolves local config/workspace and calls buildWorkspaceSkillStatus directly for skills list/info/check status. (src/cli/skills-cli.ts:98, 37962aac954d)
  • Skills commands use that loader: skills list, skills info, and skills check all route through runSkillsAction, so the changed loader is the user-facing CLI status path. (src/cli/skills-cli.ts:835, 37962aac954d)
  • Remote eligibility is process-local: getRemoteSkillEligibility reads the module-local remoteNodes map and returns undefined when that process has no connected macOS node record. (src/skills/runtime/remote.ts:451, 37962aac954d)
  • Gateway owns remote-node population: Gateway websocket connection handling records remote node info and refreshes remote bins when a node connects, showing the live cache is populated in the Gateway runtime. (src/gateway/server/ws-connection/message-handler.ts:1989, 37962aac954d)

Likely related people:

  • Vincent Koc: Current local blame for the CLI status loader, Gateway remote-aware status helper, and remote eligibility helper points to the same broad snapshot commit in the affected files; confidence is limited by the grafted checkout history. (role: recent area contributor; confidence: medium; commits: b0c1010fbff4; files: src/cli/skills-cli.ts, src/gateway/server-methods/skills.ts, src/skills/runtime/remote.ts)
  • steipete: Closed the earlier remote system.which object-map parser issue with commit 8748ae3, which the linked regression issue cites as prior context. (role: adjacent prior fixer; confidence: medium; commits: 8748ae3bb7fb; files: src/infra/skills-remote.ts, src/infra/skills-remote.test.ts, src/skills/runtime/remote.ts)
  • tony-shi: Authored the closed parser PR that documented the same object-map system.which response shape in the remote apple-notes eligibility area. (role: adjacent prior PR author; confidence: low; commits: 213aa8a93da3; files: src/infra/skills-remote.ts, src/infra/skills-remote.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 19, 2026
@itxaiohanglover

Copy link
Copy Markdown
Author

Closing this PR — issue #94956 has been resolved on main (commit 1f244f60).

The upstream fix takes the correct approach that ClawSweeper recommended: routing CLI skills status through the Gateway skills.status RPC (loadGatewaySkillsStatusReport) with a local fallback (buildWorkspaceSkillStatus), rather than calling getRemoteSkillEligibility() directly in the CLI process (which returns empty since remoteNodes is only populated by Gateway connection handlers).

Thanks to ClawSweeper for the thorough review identifying the flaw in my approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: remote macOS apple-notes eligibility still misses memo/darwin in 2026.6.8 after #71877

1 participant