You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π Bug: search_skills(source="all") returns all 20 results with score=0.0 β default source makes search useless
Description
When calling search_skills via MCP (mcp__openspace__search_skills) with the default source="all", the function returns the top 20 local skills with score=0.0 regardless of the query. The search effectively returns a fixed list and cannot find any skill by name or topic.
When called with source="local", search works correctly and returns relevant skills with proper scores.
Reproduction (2026-06-12, 2026-06-13)
# Wrong: default source, search returns 0.0 for everythingr=awaitsession.call_tool("search_skills", {"query": "svg render", "limit": 20})
# β 20 results, ALL score=0.0# β "svg-render" (which exists locally!) NOT in top 20r=awaitsession.call_tool("search_skills", {"query": "playwright", "limit": 20})
# β 20 results, ALL score=0.0# β Same fixed list# Right: source="local", works as expectedr=awaitsession.call_tool("search_skills", {"query": "svg render", "source": "local", "limit": 5})
# β "svg-render" at #1, score=2.50 β
Root Cause (inferred from behavior)
source="all" mixes local + cloud (HKUDS open-space.cloud) results. The cloud path requires a valid OPENSPACE_API_KEY; when the key is missing or invalid, the cloud call returns 401, and the search engine appears to fall back to returning the fixed top-20 local skills with score=0.0 instead of:
Either returning only local results with proper scores (graceful degradation)
Or raising an error that tells the caller "cloud unreachable, retry with source=local"
Impact
The default source="all" (which most users never override) makes search_skills useless β every call returns a meaningless list of 0-score skills.
Agents relying on search_skills to discover capabilities (the documented "explore-then-execute" pattern) think OpenSpace has no relevant skills and skip it entirely.
Return the merged + re-ranked list of local + cloud skills with proper scores
Or fall back to local-only results with correct scores when cloud is unreachable (rather than returning score=0.0 for everything)
Or raise a clear error: "Cloud auth failed, retry with source='local' or set OPENSPACE_API_KEY"
Actual Behavior
Returns 20 results with score=0.0 for any query, regardless of relevance.
Environment
OpenSpace: latest main, commit 228f8f7
OpenClaw: v2026.4.24 (macOS arm64)
MCP transport: streamable-http, port 8083
71 local skills registered (verified by search_skills(source="local", limit=200))
OPENSPACE_API_KEY set in ~/.openclaw/openclaw.json (verified working via GET /api/v1/auth/me)
Suggested Fix
In openspace/skill_engine/search.py (or wherever the merge happens): when cloud search returns 401/500/timeout, log a warning AND fall back to local-only results with the same scoring function used by source="local", rather than zeroing out scores. This preserves the merged-source UX for users who don't pass source= explicitly.
π Bug:
search_skills(source="all")returns all 20 results with score=0.0 β default source makes search uselessDescription
When calling
search_skillsvia MCP (mcp__openspace__search_skills) with the defaultsource="all", the function returns the top 20 local skills withscore=0.0regardless of the query. The search effectively returns a fixed list and cannot find any skill by name or topic.When called with
source="local", search works correctly and returns relevant skills with proper scores.Reproduction (2026-06-12, 2026-06-13)
Root Cause (inferred from behavior)
source="all"mixes local + cloud (HKUDS open-space.cloud) results. The cloud path requires a validOPENSPACE_API_KEY; when the key is missing or invalid, the cloud call returns 401, and the search engine appears to fall back to returning the fixed top-20 local skills with score=0.0 instead of:Impact
source="all"(which most users never override) makessearch_skillsuseless β every call returns a meaningless list of 0-score skills.search_skillsto discover capabilities (the documented "explore-then-execute" pattern) think OpenSpace has no relevant skills and skip it entirely.Expected Behavior
source="all"should either:Actual Behavior
Returns 20 results with
score=0.0for any query, regardless of relevance.Environment
228f8f7search_skills(source="local", limit=200))OPENSPACE_API_KEYset in~/.openclaw/openclaw.json(verified working viaGET /api/v1/auth/me)Suggested Fix
In
openspace/skill_engine/search.py(or wherever the merge happens): when cloud search returns 401/500/timeout, log a warning AND fall back to local-only results with the same scoring function used bysource="local", rather than zeroing out scores. This preserves the merged-source UX for users who don't passsource=explicitly.