Fix OpenClaw smoke-test for x402 payment mode - #4
Conversation
Smoke-test now signs and retries chat completions when the sidecar runs in x402 mode, and status tolerates missing wallet routes on older sidecars. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdb7852fdd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if agent_wallet.get("status") != "installed": | ||
| raise RuntimeError( | ||
| f"Consumer wallet for {self.config.consumer_agent_id} is not installed. " | ||
| "Run `opencoat-inference openclaw bootstrap` first." |
There was a problem hiding this comment.
Honor env wallet overrides before requiring installed agent wallet
This guard runs before OPENCOAT_CONSUMER_PRIVY_WALLET_ID/OPENCOAT_CONSUMER_PRIVY_WALLET_ADDRESS are applied, so x402 openclaw smoke-test fails whenever the sidecar reports not_installed even if a valid payer wallet is explicitly configured in env. That blocks a working configuration path that pay-and-call already supports, and causes an avoidable runtime failure in x402 mode for users who rely on env-provided wallet credentials.
Useful? React with 👍 / 👎.
Summary
openclaw smoke-testcomplete a paid chat completion when the sidecar runs inx402mode (402 → Privy signature → retry), matching the existingpay-and-callflow.openclaw statustolerate missing/v1/walletroutes on older sidecar builds instead of failing with HTTP 404.Test plan
uv run ruff check .uv run pytest -quv run opencoat-inference openclaw smoke-testagainst a sidecar withOPENCOAT_PAYMENT_MODE=x402Made with Cursor