Skip to content

sell --accept: cli/v3 comma-splits the value → "network is required" (multi-currency offers unreachable from CLI) #664

Description

@bussyjd

What happens

Creating a multi-currency offer with --accept always fails with:

--accept "token=USDC": network is required

even though network= is clearly present in the value:

obol sell http my-api \
  --upstream my-svc --port 8080 --namespace llm \
  --accept token=USDC,network=base,price=0.03 \
  --accept token=OBOL,network=ethereum,price=0.0001

This affects obol sell http, obol sell agent, and obol sell update — i.e. every command that takes --accept. Multi-currency offers can't be created from the CLI at all; the only workaround is to create a single-currency offer and then kubectl patch the extra spec.payments[] entries by hand.

Root cause

--accept is a cli.StringSliceFlag (urfave/cli/v3). By default cli/v3 slice flags split each value on ,. Each --accept is meant to be one comma-separated key=value list (token=X,network=Y,price=Z), and parseAcceptKV already does its own , split. So cli/v3 splits the value first, handing buildAcceptPayments shredded fragments:

["token=USDC", "network=base", "price=0.03", "token=OBOL", "network=ethereum", "price=0.0001"]

buildAcceptPayments then treats each fragment as a whole option, and the first one (token=USDC) has no network → "network is required".

The grouping between the two options is destroyed by the split, so it can't be reconstructed after the fact — the split must be prevented.

Fix

Set DisableSliceFlagSeparator: true on the commands that carry --accept (sell http, sell agent, sell update) so each --accept arrives as one whole value; parseAcceptKV keeps doing the intra-option , split. The repeatable --register-skills / --register-domains / --register-metadata flags on those commands are unaffected in practice — each of their values is a single token or key=value pair, and nothing in the repo passes them comma-joined.

The existing accept_test.go unit tests never caught this because they call parseAcceptOption / buildAcceptPayments directly, bypassing cli/v3 argv parsing. The fix adds a regression test that drives real cli/v3 parsing (and a negative control proving the field is load-bearing).

Severity

Medium — multi-currency pricing is a headline v0.11.0 feature and is unreachable from the CLI without a manual kubectl patch workaround.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions