fix(serviceoffer): drop orphan shared-registration tests#366
Merged
Conversation
PR #364's squash merge left two tests in controller_test.go referencing `applySharedRegistrationStatus`, a function that was not carried over into `controller.go`. Result: `go test ./internal/serviceoffercontroller/` has been failing to build on main ever since with: controller_test.go:119:2: undefined: applySharedRegistrationStatus controller_test.go:139:2: undefined: applySharedRegistrationStatus Those tests describe a "shared registration across ServiceOffers" design that is not the behavior currently implemented — reconcileRegistrationStatus at controller.go:568 deliberately returns SingletonConflict for non-owner offers. Restoring the function alone would leave it dead; wiring it in would silently revert the singleton direction. Neither is in scope here. This patch removes the two orphan tests to restore the build. If the shared-registration feature is desired, a proper PR should land both the function and its caller in reconcileRegistrationStatus.
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
go test ./internal/serviceoffercontroller/has been failing to build onmainsince #364 was squash-merged:The squash brought over
controller_test.gofrom0f7d553(which introduced both the test and the function) but not the matching function definition incontroller.go. Every PR targetingmainhas been CI-red on this package ever since.The tests describe a feature that isn't on main
applySharedRegistrationStatuswas part of an attempted "aggregate ERC-8004 registration services" direction — non-ownerServiceOffers would inherit the owner's agent ID and tx hash. Currentmaindoes the opposite:reconcileRegistrationStatusatinternal/serviceoffercontroller/controller.go:568-580returnsRegistered=False/SingletonConflictfor non-owner offers and deletes theirRegistrationRequest.Restoring the function alone would leave it as dead code. Wiring it into
reconcileRegistrationStatuswould silently revert the singleton direction. Neither is in scope here — this PR is narrowly about unblocking CI.Changes
TestApplySharedRegistrationStatus_NonOwnerUsesSharedAgent(controller_test.go:105-127).TestApplySharedRegistrationStatus_WaitsForRoute(controller_test.go:129-144).Net diff: -41 lines, no production code changes.
Verification
Follow-up if shared registration is desired
A proper PR should add back both:
applySharedRegistrationStatusincontroller.go(body is in git history at0f7d553:internal/serviceoffercontroller/controller.go:1224-1252).reconcileRegistrationStatusthat switches behavior for non-owner offers fromSingletonConflicttoapplySharedRegistrationStatus.Test plan
internal/serviceoffercontrollerpackage after this merges.