Skip to content

fix(serviceoffer): drop orphan shared-registration tests#366

Merged
bussyjd merged 1 commit intomainfrom
fix/drop-orphan-shared-registration-tests
Apr 22, 2026
Merged

fix(serviceoffer): drop orphan shared-registration tests#366
bussyjd merged 1 commit intomainfrom
fix/drop-orphan-shared-registration-tests

Conversation

@bussyjd
Copy link
Copy Markdown
Collaborator

@bussyjd bussyjd commented Apr 22, 2026

Summary

go test ./internal/serviceoffercontroller/ has been failing to build on main since #364 was squash-merged:

controller_test.go:119:2: undefined: applySharedRegistrationStatus
controller_test.go:139:2: undefined: applySharedRegistrationStatus

The squash brought over controller_test.go from 0f7d553 (which introduced both the test and the function) but not the matching function definition in controller.go. Every PR targeting main has been CI-red on this package ever since.

The tests describe a feature that isn't on main

applySharedRegistrationStatus was part of an attempted "aggregate ERC-8004 registration services" direction — non-owner ServiceOffers would inherit the owner's agent ID and tx hash. Current main does the opposite: reconcileRegistrationStatus at internal/serviceoffercontroller/controller.go:568-580 returns Registered=False/SingletonConflict for non-owner offers and deletes their RegistrationRequest.

Restoring the function alone would leave it as dead code. Wiring it into reconcileRegistrationStatus would silently revert the singleton direction. Neither is in scope here — this PR is narrowly about unblocking CI.

Changes

  • Remove TestApplySharedRegistrationStatus_NonOwnerUsesSharedAgent (controller_test.go:105-127).
  • Remove TestApplySharedRegistrationStatus_WaitsForRoute (controller_test.go:129-144).

Net diff: -41 lines, no production code changes.

Verification

$ go build ./...
$ go test -race ./internal/serviceoffercontroller/
ok  github.com/ObolNetwork/obol-stack/internal/serviceoffercontroller  2.125s

Follow-up if shared registration is desired

A proper PR should add back both:

  1. applySharedRegistrationStatus in controller.go (body is in git history at 0f7d553:internal/serviceoffercontroller/controller.go:1224-1252).
  2. The caller in reconcileRegistrationStatus that switches behavior for non-owner offers from SingletonConflict to applySharedRegistrationStatus.
  3. The two tests this PR removes, restored from git history.

Test plan

  • CI green on this PR.
  • Other open PRs' CI turns green on the internal/serviceoffercontroller package after this merges.

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.
@bussyjd bussyjd merged commit b5eba81 into main Apr 22, 2026
6 checks passed
@bussyjd bussyjd deleted the fix/drop-orphan-shared-registration-tests branch April 22, 2026 20:43
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.

1 participant