Skip to content

fix(buy): clearer hint when seller didn't publish on-chain identity#498

Merged
OisinKyne merged 1 commit into
mainfrom
fix/buy-clearer-no-registrations-hint
May 18, 2026
Merged

fix(buy): clearer hint when seller didn't publish on-chain identity#498
OisinKyne merged 1 commit into
mainfrom
fix/buy-clearer-no-registrations-hint

Conversation

@bussyjd
Copy link
Copy Markdown
Collaborator

@bussyjd bussyjd commented May 17, 2026

Summary

  • When agent-registration.json parses successfully but has an empty registrations[], the error now explains why it failed and surfaces --no-verify-identity as the opt-out — instead of the opaque "registration document has no on-chain registrations" message users saw before.
  • UX-only change: no security model modifications, no auto-bypass, --no-verify-identity remains the explicit opt-out.

Why

On the v1337 live demo (inference.v1337.org), obol buy inference v1337-aeon --seller https://inference.v1337.org/services/aeon hard-failed because v1337's /.well-known/agent-registration.json has no registrations[] field — the seller never ran obol sell register. The previous error gave no hint that --no-verify-identity exists, forcing users to dig through help text.

This is categorised as a UX gap, not a security bug. The buyer flow's refuse-by-default identity check is correct and unchanged.

Behavior change

Before:

identity pre-flight: registration document has no on-chain registrations

After:

identity pre-flight: seller didn't publish on-chain identity: agent-registration.json has no `registrations[]` field.
This usually means: (a) the seller didn't run `obol sell register` on-chain, or
(b) the seller is on an older obol-stack version that pre-dates the AgentIdentity CRD.
Re-run with --no-verify-identity to buy without identity verification, or contact the seller to publish their agentId.

Test plan

  • Updated existing "empty registrations" table row in TestVerifyAgentID to match new substring (no \registrations[]` field`).
  • Added TestVerifyAgentIDForPricing_EmptyRegistrations: seller returns valid JSON with registrations: []; asserts error contains both no \registrations[]` fieldand--no-verify-identity`.
  • Existing passing cases (valid registrations[{agentId, agentRegistry}]) unchanged — TestVerifyAgentIDForPricing still green.
  • go test ./cmd/obol/ ./internal/buy/ ./internal/erc8004/ -count=1 — all pass.
  • go build ./... — clean.

Risks

None — message-only change in a single code path. No security impact. The opt-out flag and its semantics are untouched.

On the v1337 live demo (inference.v1337.org), `obol buy inference` was
failing with the opaque message "registration document has no on-chain
registrations" because v1337's agent-registration.json has no
`registrations[]` field (seller never ran `obol sell register`).

Users had to guess that `--no-verify-identity` was the opt-out.

This is a UX-only change. The security model is unchanged:
- identity check is still required by default
- `--no-verify-identity` is still the explicit opt-out
- no auto-bypass is added

The new error message explains what the missing field means and surfaces
the `--no-verify-identity` hint directly so users don't have to dig
through help text.

Affected: internal/buy/discover.go (error text),
internal/buy/discover_test.go (update existing assertion +
new TestVerifyAgentIDForPricing_EmptyRegistrations case).
@OisinKyne OisinKyne force-pushed the fix/buy-clearer-no-registrations-hint branch from 5d0249d to a33006f Compare May 18, 2026 10:36
@OisinKyne OisinKyne enabled auto-merge (rebase) May 18, 2026 10:36
@OisinKyne OisinKyne merged commit a0e1863 into main May 18, 2026
6 checks passed
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.

2 participants