fix(buy): clearer hint when seller didn't publish on-chain identity#498
Merged
Conversation
OisinKyne
approved these changes
May 18, 2026
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).
5d0249d to
a33006f
Compare
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
agent-registration.jsonparses successfully but has an emptyregistrations[], the error now explains why it failed and surfaces--no-verify-identityas the opt-out — instead of the opaque"registration document has no on-chain registrations"message users saw before.--no-verify-identityremains the explicit opt-out.Why
On the v1337 live demo (
inference.v1337.org),obol buy inference v1337-aeon --seller https://inference.v1337.org/services/aeonhard-failed because v1337's/.well-known/agent-registration.jsonhas noregistrations[]field — the seller never ranobol sell register. The previous error gave no hint that--no-verify-identityexists, 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:
After:
Test plan
"empty registrations"table row inTestVerifyAgentIDto match new substring (no \registrations[]` field`).TestVerifyAgentIDForPricing_EmptyRegistrations: seller returns valid JSON withregistrations: []; asserts error contains bothno \registrations[]` fieldand--no-verify-identity`.registrations[{agentId, agentRegistry}]) unchanged —TestVerifyAgentIDForPricingstill 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.