refactor(evm-wallet-experiment): use new kernel-cli queueMessage subcommand#909
Merged
refactor(evm-wallet-experiment): use new kernel-cli queueMessage subcommand#909
Conversation
…ommand Leverage the new `ocap daemon queueMessage <kref> <method> [args]` syntax from 2f7ecbc across all scripts, docs, and the OpenClaw plugin. This eliminates the error-prone `daemon exec queueMessage '["kref","method",[args]]'` pattern with its nested JSON escaping, and removes the manual `parse_capdata` helper since the CLI now auto-decodes CapData via prettifySmallcaps. Also adds OCAP_HOME env var support and fixes a wrong OCAP_BIN path in update-limits.sh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… update-limits
prettifySmallcaps converts CapData #error objects to strings like
"[TypeError: msg]" rather than preserving the {"#error": "msg"} shape.
The old grep for '"#error"' would never match the decoded output,
silently ignoring revocation failures. Use string-prefix detection instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing YELLOW color variable to setup-away.sh - Clarify daemon_qm helper comments (--quiet shift + method capture) - Simplify call()/rawCall() in home-interactive.mjs: close over kernel and rootKref to reduce from 4 positional args to 2 - Replace `any` with `unknown` for parameterized test rejection params in coordinator-vat.test.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e dead code - Fix error detection in openclaw plugin daemon.ts: prettifySmallcaps converts #error CapData objects to strings like "[TypeError: msg]", so the old object-shape check never matched. Use string-prefix check. - Remove unused json_value() from setup-away.sh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…JSON construction Replace ad-hoc shell string interpolation for COMMS_PARAMS (relay address, allowedWsHosts) and ENTROPY with node -e + env vars. The old pattern was vulnerable to JSON injection if RELAY_ADDR contained double-quote characters, and was inconsistent with the rest of the scripts' JSON construction discipline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…CLI output
The new `daemon queueMessage` CLI auto-decodes CapData, so test mocks
must return plain JSON instead of CapData-wrapped responses. Also updates
spawn argument assertions to match the new CLI arg structure
(daemon queueMessage kref method argsJson) and the error test to use
prettified error strings ("[Error: msg]") instead of CapData #error objects.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
…st constants prettifySmallcaps converts both #error objects and manifest constants to strings starting with "[": errors become "[TypeError: msg]" while constants become "[undefined]", "[NaN]", etc. Use a regex that checks for the ": " separator to avoid false positives on void method returns. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Coverage Report
File CoverageNo changed files found. |
rekmarks
previously approved these changes
Mar 31, 2026
The "rejects new messages when queue reaches MAX_QUEUE limit" test sends 201 messages while disconnected, restarts a kernel, and resolves all promises. In CI this can take >90s. Bump from NETWORK_TIMEOUT*3 (90s) to NETWORK_TIMEOUT*4 (120s) to avoid flaky timeout failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ction test The "handles multiple simultaneous reconnections to different peers" test has kernel1 redeem URLs on two peers that restart sequentially through a relay. The default ackTimeoutMs of 2s gives only 8s for URL redemption, which is too tight when two kernels are reconnecting in CI. Use 5s (→ 20s redemption window) for the initiating kernel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rekmarks
approved these changes
Apr 1, 2026
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.

Summary
Leverages the new
ocap daemon queueMessage <kref> <method> [args]syntax (from #896) across all evm-wallet-experiment scripts, docs, and the OpenClaw plugin.daemon exec queueMessage '["kref","method",[args]]'with the cleanerdaemon queueMessage kref method '[args]'— eliminates nested JSON escaping and simplifies argument construction throughoutsetup-home.sh,setup-away.sh, andupdate-limits.shparse_capdata()helper (~30 lines per script) — the new CLI auto-decodes CapData viaprettifySmallcaps, so manual parsing is no longer neededdecodeCapData(),isCapDataLike(), andCapDataLiketype (~60 lines) since the CLI handles CapData decoding; plugin just JSON.parses the decoded outputOCAP_HOMEenv var support —home-interactive.mjsdefault db path, log messages in scripts, and docs all respectOCAP_HOMEOCAP_BINpath inupdate-limits.sh— was pointing to non-existentpackages/cli/, now correctly points topackages/kernel-cli/update-limits.sh—prettifySmallcapsconverts#errorobjects to strings like[TypeError: msg], so the oldgrep '"#error"'would never match; now uses string-prefix detectionNet result: -108 lines across 6 files.
Test plan
These are shell scripts and documentation — no automated test suite covers them directly. Verified by:
bash -nsyntax checksparse_capdataordaemon exec queueMessagereferencesdaemon queueMessageCLI source (packages/kernel-cli/src/commands/daemon.ts) to confirm argument handling matches the new script invocationsprettifySmallcapsto confirm error object encoding and fix the detection logic accordingly🤖 Generated with Claude Code
Note
Medium Risk
Medium risk because it changes the CLI invocation contract and output parsing used by setup/limits scripts and the OpenClaw plugin; failures would surface as broken automation or mis-detected daemon/vat errors rather than isolated unit changes.
Overview
Switches the wallet setup flows to the new
kernel-clidaemon queueMessageinterface. All docs and automation scripts replacedaemon exec queueMessagenested-JSON calls withdaemon queueMessage <kref> <method> <argsJson>, simplifying argument construction and updating the manual command examples.Removes CapData unwrapping from consumers and updates error handling. The OpenClaw plugin and shell scripts drop
CapData/parse_capdatadecoding logic and insteadJSON.parsethe CLI’s decoded output, with new heuristics for detecting prettified vat errors (e.g."[ErrorName: msg]").Misc reliability/ops tweaks. Adds
OCAP_HOMEsupport for interactive DB/log paths, fixesupdate-limits.shto point atpackages/kernel-cli/dist/app.mjs, refactors remote comms JSON construction in scripts, and increases remote-comms e2e test timeouts/backoff to reduce CI flakiness.Written by Cursor Bugbot for commit 70bf51b. This will update automatically on new commits. Configure here.