Skip to content

fix(cli): wire remote eligibility into CLI skills status commands#94973

Closed
lzyyzznl wants to merge 1 commit into
openclaw:mainfrom
lzyyzznl:fix/issue-94956-remote-apple-notes-eligibility
Closed

fix(cli): wire remote eligibility into CLI skills status commands#94973
lzyyzznl wants to merge 1 commit into
openclaw:mainfrom
lzyyzznl:fix/issue-94956-remote-apple-notes-eligibility

Conversation

@lzyyzznl

Copy link
Copy Markdown
Contributor

Summary

The CLI skills status commands (openclaw skills list, openclaw skills check, openclaw skills info) use a local-only loadSkillsStatusReport path that bypasses the existing remote-aware Gateway skills.status implementation. This causes macOS-only skills like apple-notes to report as ineligible on Linux gateway hosts even when a paired, connected macOS exec node resolves the required memo binary via system.which.

The Gateway's skills.status handler already builds remote-aware status via buildRemoteAwareWorkspaceSkillStatus, which passes eligibility.remote from getRemoteSkillEligibility. However, the CLI path in loadSkillsStatusReport calls buildWorkspaceSkillStatus without the remote eligibility option, creating a CLI/Gateway status mismatch.

This fix wires remote eligibility into the CLI path by adding dynamic imports for getRemoteSkillEligibility and canExecRequestNode, matching the exact pattern used by the Gateway, status-all/report-data, and chat-commands modules. The change is purely structural — no new logic is introduced — and when no remote macOS node is connected, getRemoteSkillEligibility returns undefined making 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:

> node scripts/run-vitest.mjs src/cli/skills-cli.commands.test.ts
Test Files  1 passed (1), Tests  52 passed (52)

> node scripts/run-vitest.mjs src/skills/runtime/remote.test.ts
Test Files  1 passed (1), Tests  12 passed (12)

> node scripts/run-vitest.mjs src/skills/discovery/status.test.ts
Test Files  1 passed (1), Tests  12 passed (12)

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:

> node scripts/run-vitest.mjs src/cli/skills-cli.commands.test.ts
Test Files  1 passed (1)
     Tests  52 passed (52)

> node scripts/run-vitest.mjs src/skills/runtime/remote.test.ts
Test Files  1 passed (1)
     Tests  12 passed (12)

> node scripts/run-vitest.mjs src/skills/discovery/status.test.ts
Test Files  1 passed (1)
     Tests  12 passed (12)

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's skills.status handler and the status-all report 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

  • This change is backwards compatible — when no remote macOS node is connected, getRemoteSkillEligibility returns undefined and behavior is identical to before
  • This change has been tested with existing configurations — all 76 related unit tests pass; CLI test suite explicitly mocks getRemoteSkillEligibility returning undefined (default case)
  • I have updated relevant documentation — no API or config changes; the fix aligns CLI behavior with documented Gateway behavior
  • Breaking changes (if any) are documented in Summary — no breaking changes

Current review state

  • Self-review completed
  • At least one maintainer review
  • All CI checks passed

@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

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Close: current main already fixes the linked CLI/Gateway skills-status regression with a Gateway-first skills.status path and regression coverage; this branch's remaining local fallback wiring is superseded.

Root-cause cluster
Relationship: superseded
Canonical: #94956
Summary: This PR targeted the remote macOS apple-notes CLI skills-status regression, but the canonical issue is closed after the current-main Gateway-first fix in f69f81af9ebe5b14492762610c6240a583df320a.

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 details

Best 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 skills.status before local fallback.

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:

  • Repository policy read: Root AGENTS.md was read fully, and src/agents/AGENTS.md was read because the PR imports src/agents/exec-defaults.js; the read-beyond-diff, current-main, and real-proof rules shaped this review. (AGENTS.md:1, 583829a342cb)
  • Current main implementation: Current origin/main has loadSkillsStatusReport call loadGatewaySkillsStatusReport first, and that helper requests Gateway skills.status with CLI client identity before falling back to local status. (src/cli/skills-cli.ts:106, 583829a342cb)
  • Gateway status is remote-aware: Gateway skills.status builds status through buildRemoteAwareWorkspaceSkillStatus, passing getRemoteSkillEligibility and canExecRequestNode into buildWorkspaceSkillStatus. (src/gateway/server-methods/skills.ts:100, 583829a342cb)
  • Current main regression coverage: The CLI command test now proves skills check --agent writer --json consumes the Gateway report, marks apple-notes eligible, and does not call the local status builder when Gateway is reachable. (src/cli/skills-cli.commands.test.ts:1206, 583829a342cb)
  • Fix provenance: Blame ties the Gateway-first CLI status loader lines to f69f81af9ebe5b14492762610c6240a583df320a, the commit titled fix(cli): use gateway skills status when available. (src/cli/skills-cli.ts:106, f69f81af9ebe)
  • Fix timestamp: The fix commit was committed on 2026-06-19T18:28:39+02:00 by Vincent Koc. (f69f81af9ebe)

Likely related people:

  • vincentkoc: Authored f69f81af9ebe5b14492762610c6240a583df320a, which added the Gateway-first CLI status path and regression coverage that closed the linked issue; recent history also shows this author touching the central CLI and Gateway skills files. (role: current-main fixer and recent area contributor; confidence: high; commits: f69f81af9ebe, f062171c54; files: src/cli/skills-cli.ts, src/cli/skills-cli.commands.test.ts, src/gateway/server-methods/skills.ts)
  • steipete: History shows Peter Steinberger authored the earlier remote system.which bin-map parser fix cited by the linked issue and multiple adjacent remote skills/CLI changes. (role: adjacent prior feature and parser-fix owner; confidence: medium; commits: 8748ae3bb7fb, e96b939732, a6b4294bf; files: src/infra/skills-remote.ts, src/infra/skills-remote.test.ts, src/skills/runtime/remote.ts)

Codex review notes: model internal, reasoning high; reviewed against 583829a342cb; fix evidence: commit f69f81af9ebe, main fix timestamp 2026-06-19T18:28:39+02:00.

@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
- 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
@lzyyzznl
lzyyzznl force-pushed the fix/issue-94956-remote-apple-notes-eligibility branch from f377153 to 2194f25 Compare June 19, 2026 17:59
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 19, 2026
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