fix(serviceoffer): restore ERC-8004 registration aggregation#367
Merged
fix(serviceoffer): restore ERC-8004 registration aggregation#367
Conversation
2ff6ad3 to
140ceba
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
Re-applies
0f7d553("fix: aggregate ERC-8004 registration services") on top of currentmain. That commit was silently reverted when PR #364 (autorefill) was squash-merged from a stale base — see context below.Without this,
reconcileRegistrationStatusreturnsSingletonConflictfor every ServiceOffer after the first, which means (a) only one service per stack can reach Ready while registration is enabled, and (b) PR #355'sobol sell demo hello/blocks/oracleflow cannot produce a populated storefront with registration on by default.What broke
0f7d553"fix: aggregate ERC-8004 registration services"main. AddedapplySharedRegistrationStatus, multi-offer fan-out inenqueueOfferFromRegistration, multi-offer render inbuildActiveRegistrationDocument. ReplacedSingletonConflictwith shared-agent logic.a819df3"feat(buy): add agent-managed autorefill reconcile loop (#364)"main. The PR branch was cut before0f7d553landed. The squash silently reverted0f7d553's lines incontroller.goandrender.go(no merge conflict surfaced because the squash rebuilds the diff against the current tip).b5eba81"fix(serviceoffer): drop orphan shared-registration tests (#366)"controller_test.gostill referencedapplySharedRegistrationStatus. I deleted the orphan tests to get CI green, with a commit-message note that the fix needed its own restore PR. This is that PR.What this PR does
Exact contents of
0f7d553, re-applied:internal/serviceoffercontroller/controller.go— restoreapplySharedRegistrationStatus, multi-offer fan-out inenqueueOfferFromRegistration,registrationOffers()helper, deletion-path hand-off to next owner, and the shared-agent branch inreconcileRegistrationStatus/reconcileRegistrationActive.internal/serviceoffercontroller/controller_test.go— restore the twoTestApplySharedRegistrationStatus_*tests that fix(serviceoffer): drop orphan shared-registration tests #366 deleted.internal/serviceoffercontroller/render.go— restore 4-argbuildActiveRegistrationDocument,buildRegistrationServices,offerPublishedForRegistration.internal/serviceoffercontroller/render_test.go— restore fan-out render coverage.Other silent reverts in the same squash (NOT in this PR)
While auditing, I found
a819df3also silently reverted three unrelated commits. Those are not included here because one of them is non-trivial to restore safely:499e0e4"fix(erc8004): use canonical string signer contract" —SignTxRequest.ChainIDrevertedstring→int64ininternal/erc8004/signer.go.499e0e4's commit body says the server accepts strings (canonical). The post-squash comment onmainsays "sending it as a string causes HTTP 422". These two statements can't both be right against the same remote-signer. Someone with recent hands-on experience with the Rust remote-signer needs to decide which wire format it actually accepts today before this one gets restored.6c8d786"docs(erc8004): tighten remote-signer string contract" — reverted insigner.py. Same blocker: depends on the signer contract decision.899c605"docs: point stack consumers at signer schema" — revertedCLAUDE.md+SKILL.mdpointers to the canonical schema URL. Again, depends on (1).I'll open follow-ups once the signer-contract question is resolved.
Verification
go test ./...— green, including the two restoredTestApplySharedRegistrationStatus_*cases and all pre-existing autorefill tests.origin/mainwith one conflict incontroller_test.go(same file block thata819df3+b5eba81churned); resolved by keeping both autorefill and shared-registration tests.Test plan
go test ./internal/serviceoffercontroller/...registration.enabled: true; confirm both reach Ready and share the same AgentID instead of one returning SingletonConflict.Follow-ups
update-branchstep before merge on PRs that touch heavily-shared files (serviceoffercontroller/,erc8004/,x402/).