fix(openclaw): drop unsupported --force from linked plugin install - #21
Open
Alexgodoroja wants to merge 1 commit into
Open
fix(openclaw): drop unsupported --force from linked plugin install#21Alexgodoroja wants to merge 1 commit into
Alexgodoroja wants to merge 1 commit into
Conversation
OpenClaw rejects --force alongside --link ("Linked plugins point at the
source path directly"), so `attach --openclaw` aborted on the first of the
three CLI steps. Because install, enable and inspect share one try block,
the plugin was never registered at all -- while the cpSync above had already
populated ~/.pilot/integrations/openclaw-policy, leaving users with plugin
files on disk and nothing installed against them.
--force was redundant regardless: a linked install points at installedPlugin,
which cpSync refreshes on every run, so re-attaching stays idempotent without it.
The test stub logged argv and always exited 0, so it accepted a flag pair the
real CLI refuses and the bug shipped green. It now mirrors the CLI and rejects
the combination, which fails the test if --force is reintroduced.
Verified against OpenClaw 2026.7.1-2: install, enable and inspect all succeed,
and the plugin reports status "loaded".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happens now
npx [email protected] attach --openclawfails outright:src/setup/harnesses/openclaw.jspasses both flags, and OpenClaw treats them as mutuallyexclusive — a linked plugin points at the source path, so there is no copy to overwrite.
Why it's worse than one failed command
configure()runs install, enable and inspect inside a singletry, so the throw on thefirst step means none of them run and
pilot-policyis never registered. ThecpSynconline 22 has already populated
~/.pilot/integrations/openclaw-policyby that point, so theuser is left with plugin files on disk and nothing installed against them —
plugins listshows no
pilot-policy, which reads like the copy silently did nothing.Fix
Drop
--force. It was redundant anyway: a linked install points atinstalledPlugin, andcpSync(..., { force: true })refreshes those files on every run, so re-attaching staysidempotent without it.
Why CI didn't catch it
The test stubbed
openclawwith a shell script that logged argv and always exited 0, so ithappily accepted a flag pair the real CLI refuses, and
assert.match(calls, /--link\n--force/)actively pinned the broken behaviour. The stub now mirrors the real CLI and rejects the
combination; reintroducing
--forcefails the test (confirmed by re-adding it locally).Verification
Against OpenClaw 2026.7.1-2 on macOS, all three steps now succeed and
plugins inspect pilot-policy --jsonreportsstatus: "loaded",enabled: true.node --test test/native-harness-setup.test.js→ 8/8 pass.npm run lintclean.Full
npm testis 55 pass / 7 fail, but that failure set is identical on unmodifiedmain(
test/attach.test.js,harness-config-contracts,hermes-setup,manifest, two OpenClawplugin hook tests, and the stdio
initializesmoke test). All pre-existing and untouched here.