Skip to content

fix(capabilities): read host_compat from package.json after 2026.6 repackage#401

Open
minion1227 wants to merge 1 commit into
vouchdev:testfrom
minion1227:fix/host-compat-read-from-package-json
Open

fix(capabilities): read host_compat from package.json after 2026.6 repackage#401
minion1227 wants to merge 1 commit into
vouchdev:testfrom
minion1227:fix/host-compat-read-from-package-json

Conversation

@minion1227

Copy link
Copy Markdown
Contributor

what changed

_load_host_compat() (and the #237 drift tests) now read openclaw.compat.pluginApi from package.json instead of openclaw.plugin.json.

why

two PRs collided on test. the #237 host-compat feature reads the pluginApi floor from openclaw.plugin.json. the 2026.6 openclaw repackage (47ac72f) then moved that floor into the new loader-facing package.json — its commit message is explicit that the current loader ignores openclaw.plugin.json's openclaw.* fields, so package.jsonopenclaw.compat.pluginApi is now the single source of truth.

result on test today: _load_host_compat() reads a key that no longer exists, host_compat silently degrades to {}, and both drift tests fail:

  • test_capabilities_host_compat_matches_openclaw_manifestKeyError: 'openclaw'
  • test_capabilities_host_compat_present_and_nonemptyassert 'openclaw' in {}

this points the reader and the tests at package.json where the floor now lives, restoring the drift check. graceful-degradation on a missing/malformed manifest is preserved (those tests move with it).

what might break

nothing on disk or on the wire. host_compat now reports {"openclaw": {"pluginApi": ">=2026.6.0"}} again instead of {}. standalone-wheel installs without package.json still degrade to {} (covered by test).

tests

  • pytest tests/test_capabilities.py — 5/5 green
  • ruff check src tests — clean
  • mypy src — clean
  • full pytest (minus embeddings) — green

…package

the vouchdev#237 host-compat drift check read openclaw.compat.pluginApi from
openclaw.plugin.json, but the 2026.6 loader repackage (47ac72f) moved
that floor into the new loader-facing package.json — the current openclaw
parser ignores openclaw.plugin.json's openclaw.* fields entirely. so
_load_host_compat() read a key that no longer existed, host_compat
silently degraded to {}, and the two drift tests failed on test.

point _load_host_compat() and the drift tests at package.json, where the
pluginApi floor now lives. the graceful-degradation and malformed-json
tests move with it. no behaviour change beyond reading the right file.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 105405cf-9bc5-4f1f-b13d-549a7e48a99c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added mcp mcp, jsonl, and http surfaces tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 6, 2026
@minion1227

Copy link
Copy Markdown
Contributor Author

merge-order note: please merge this PR before #297 and #301.

all three carry the same one-line host_compat fix (#297 and #301 have it folded in so their ci goes green against the current, still-broken test). this pr is the canonical, single-purpose fix. if #297/#301 merge first, this one looks redundant and risks being closed — merging it first keeps it as the source of the fix, and #297/#301 then merge cleanly on top (identical content dedups, no conflict).

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 tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant