Uh oh!
There was an error while loading. Please reload this page.
fix: aggregate ERC-8004 registration services - #363
Merged
Conversation
bussyjd
marked this pull request as ready for review
April 21, 2026 17:25
bussyjdforce-pushed
the
fix/erc8004-shared-registration-clean
branch
from
April 21, 2026 17:28
b827753 to
49d340bComparebussyjdforce-pushed
the
fix/erc8004-shared-registration-clean
branch
from
April 21, 2026 17:31
49d340b to
899c605CompareOisinKyne
approved these changes
Apr 21, 2026
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 freeto 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
ServiceOffers into one shared agent documentSingletonConflictContext
Fixes#361.
ERC-8004 expects a single
agentURI//.well-known/agent-registration.jsondocument with aservicesarray. The previous controller behavior treated the path as singleton but still rendered the document from exactly one offer, which broke multi-service agents and demo flows.Before / After
Old behavior
flowchart TD A["Registration-enabled ServiceOffers"] --> B{"Which offer owns /.well-known/agent-registration.json?"} B -->|Oldest offer| C["Publish registration doc from one ServiceOffer only"] B -->|All later offers| D["Registered=False\nSingletonConflict"] C --> E["Only owner gets Registered=True"] E --> F["Only owner can contribute to Ready-dependent discovery surfaces"]New behavior
Owner Handoff
Concrete Examples
Before
Two offers:
demo/review-hellodemo/review-blocksObserved result:
review-hellogetsRegistered=Truereview-blocksgetsRegistered=FalsewithSingletonConflictreview-helloendpointRepresentative status on the later offer:
Representative registration document before this fix:
{ "name": "review-hello", "services": [ { "name": "web", "endpoint": "https://example.com/services/review-hello" }, { "name": "OASF", "version": "0.8", "skills": ["x402-demo", "hello"] } ] }After
With the same two offers active, both participate in one shared document.
Representative registration document after this fix:
{ "name": "review-hello", "services": [ { "name": "web", "endpoint": "https://example.com/services/review-hello" }, { "name": "OASF", "version": "0.8", "skills": ["x402-demo", "hello"] }, { "name": "web", "endpoint": "https://example.com/services/review-blocks" }, { "name": "OASF", "version": "0.8", "skills": ["x402-demo", "blocks"] } ] }Representative non-owner offer status after this fix:
Why this matches ERC-8004
The fix aligns the controller with the EIP's intended model:
agentURIservices[]/.well-known/agent-registration.jsonValidation
go test -v ./internal/serviceoffercontrollergo test -run TestNope ./cmd/obol ./internal/erc8004 ./internal/monetizeapi ./internal/x402 ./internal/stackTestBuildRegistrationConfigMap_PublishesAggregatedAgentRegistrationverifies that the publishedagent-registration.jsonpayload contains every expected service endpoint, not just the aggregated in-memory document