Skip to content

fix(openclaw): read scoped plugin configuration - #4044

Open
yufanyang214-lab wants to merge 1 commit into
rtk-ai:developfrom
yufanyang214-lab:fix/openclaw-scoped-config
Open

yufanyang214-lab wants to merge 1 commit into
rtk-ai:developfrom
yufanyang214-lab:fix/openclaw-scoped-config

Conversation

@yufanyang214-lab

Copy link
Copy Markdown

Summary

The OpenClaw plugin reads the host-wide api.config as its own settings. Consequently, the documented plugins.entries["rtk-rewrite"].config.enabled = false still registers the rewrite hook, and config.verbose = true produces no rewrite logs.

Read the validated api.pluginConfig instead, keeping the existing defaults. Six dependency-free Node tests exercise the actual plugin entry, covering both configuration regressions and the existing rewrite/exit-code behavior.

Related: #1717 (verbose diagnostics). Its separate hook discovery/activation problem remains outside this fix.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets
  • cargo test — 3,781 passed, 8 ignored, with Rust 1.98.1 and Git 2.51.0 on Linux.
  • node --test openclaw/index.test.mjs — all 6 pass on Node 22.22.3 and 24.19.0.
  • The same Node tests against unmodified develop (d402152ffa050ca3753672e3d49c3f2ff498a07b) fail the two configuration cases and pass the other four cases.
  • git diff --check and clean patch-application check against that base.

The Node tests mock the child-process boundary; they do not start RTK or an OpenClaw Gateway. They are currently run manually because the existing Cargo CI does not run Node tests. Exit 1 still passes through, exit 2 blocks, and exit 3 requires approval.

The first Cargo run with Git 2.43.0 hit the existing git_log_malformed_digit_run_propagates_real_git_error assertion: that version says "not a non-negative integer", whereas the test expects "not an integer". The complete suite passes with the Git 2.51.0 version named by that test. No Rust code or test assertions were changed.

Host API contract

OpenClaw provides host configuration and plugin configuration separately in v2026.9.4 and the API builder.

@CLAassistant

CLAassistant commented Sep 14, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working tests openclaw labels Sep 14, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes the OpenClaw plugin to read the scoped, validated api.pluginConfig instead of the host-wide api.config, so per-plugin settings like enabled and verbose under plugins.entries["rtk-rewrite"].config actually take effect. Adds six dependency-free Node tests covering the configuration regressions and existing rewrite/exit-code behavior.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working openclaw tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants