fix(capabilities): read host_compat from package.json after 2026.6 repackage#401
fix(capabilities): read host_compat from package.json after 2026.6 repackage#401minion1227 wants to merge 1 commit into
Conversation
…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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
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 |
what changed
_load_host_compat()(and the #237 drift tests) now readopenclaw.compat.pluginApifrompackage.jsoninstead ofopenclaw.plugin.json.why
two PRs collided on
test. the #237 host-compat feature reads the pluginApi floor fromopenclaw.plugin.json. the 2026.6 openclaw repackage (47ac72f) then moved that floor into the new loader-facingpackage.json— its commit message is explicit that the current loader ignoresopenclaw.plugin.json'sopenclaw.*fields, sopackage.json→openclaw.compat.pluginApiis now the single source of truth.result on
testtoday:_load_host_compat()reads a key that no longer exists,host_compatsilently degrades to{}, and both drift tests fail:test_capabilities_host_compat_matches_openclaw_manifest→KeyError: 'openclaw'test_capabilities_host_compat_present_and_nonempty→assert 'openclaw' in {}this points the reader and the tests at
package.jsonwhere 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_compatnow reports{"openclaw": {"pluginApi": ">=2026.6.0"}}again instead of{}. standalone-wheel installs withoutpackage.jsonstill degrade to{}(covered by test).tests
pytest tests/test_capabilities.py— 5/5 greenruff check src tests— cleanmypy src— cleanpytest(minus embeddings) — green