Skip to content

Fix kb.capabilities OpenClaw compat source#415

Draft
plind-junior with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-test-py3-12
Draft

Fix kb.capabilities OpenClaw compat source#415
plind-junior with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-ci-test-py3-12

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The failing ci / test (py3.12) (pull_request) job came from a host-compat drift check added to kb.capabilities. The implementation and test were reading OpenClaw pluginApi compatibility from openclaw.plugin.json, but the current packaging contract keeps that metadata in package.json.

  • Root cause

    • tests/test_capabilities.py expected openclaw.plugin.json["openclaw"]["compat"]["pluginApi"]
    • the manifest intentionally has no top-level openclaw field, so the check failed with KeyError and host_compat degraded to {}
  • Capabilities metadata

    • add host_compat to the Capabilities model
    • populate kb.capabilities.host_compat from package.json via a small loader in src/vouch/capabilities.py
    • keep the loader defensive: missing or malformed package metadata returns {} rather than breaking capability reporting
  • Regression coverage

    • update the capabilities tests to treat package.json as the source of truth for OpenClaw pluginApi
    • add focused fallback cases for missing and malformed package.json
def _load_host_compat() -> dict[str, dict[str, str]]:
    package_json = json.loads(_PACKAGE_JSON_PATH.read_text(encoding="utf-8"))
    compat = package_json.get("openclaw", {}).get("compat")
    if not isinstance(compat, dict):
        return {}
    return {"openclaw": {k: str(v) for k, v in compat.items()}}

@github-actions github-actions Bot added the size: XS less than 50 changed non-doc lines label Jul 7, 2026
@github-actions github-actions Bot added mcp mcp, jsonl, and http surfaces storage kb storage, migrations, schemas, and proposals tests tests and fixtures size: S 50-199 changed non-doc lines and removed size: XS less than 50 changed non-doc lines labels Jul 7, 2026
Copilot AI changed the title [WIP] Fix failing GitHub Actions job ci / test (py3.12) Fix kb.capabilities OpenClaw compat source Jul 7, 2026
Copilot AI requested a review from plind-junior July 7, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp mcp, jsonl, and http surfaces size: S 50-199 changed non-doc lines storage kb storage, migrations, schemas, and proposals tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants