Skip to content

Fix OpenClaw smoke-test for x402 payment mode - #4

Open
HyperdustLabs wants to merge 1 commit into
mainfrom
fix-openclaw-smoke-test-x402
Open

Fix OpenClaw smoke-test for x402 payment mode#4
HyperdustLabs wants to merge 1 commit into
mainfrom
fix-openclaw-smoke-test-x402

Conversation

@HyperdustLabs

Copy link
Copy Markdown
Owner

Summary

  • Make openclaw smoke-test complete a paid chat completion when the sidecar runs in x402 mode (402 → Privy signature → retry), matching the existing pay-and-call flow.
  • Let openclaw status tolerate missing /v1/wallet routes on older sidecar builds instead of failing with HTTP 404.

Test plan

  • uv run ruff check .
  • uv run pytest -q
  • uv run opencoat-inference openclaw smoke-test against a sidecar with OPENCOAT_PAYMENT_MODE=x402

Made with Cursor

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +168 to +171
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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant