Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-opus-5· anthropicHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION Removing a registered or subscribed service leaves stale local…

  1. User

    ISSUE DESCRIPTION

    Removing a registered or subscribed service leaves stale local metadata

    After a successful unregister or unsubscribe operation, the corresponding provider or consumer URL must no longer participate in local metadata, service matching, or revision calculation. Removing one URL must preserve unrelated registrations. If the remote operation fails, local metadata must not be removed as though the operation succeeded.

    Interface

    Type: Function Name: RemoveService Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a provider service URL from the local metadata for the given registry. Use this during unregister flows to keep the in-memory application-level metadata consistent with the actual exported services.

    Type: Function Name: RemoveSubscribeURL Path: metadata/metadata.go Input: registryId string, url *common.URL Output: (no return value) Description: Removes a subscribed service URL from the local metadata for the given registry. Use this during unsubscribe flows to ensure stale subscribed URLs are cleaned from the application-level metadata.

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /dubbo-go, current file: none) bash-$

  2. Claude Assistant

    Now update metadata/info/metadata_info.go removal logic to be robust.

  3. Claude Assistant

    Now update the service discovery registry flows.

  4. Claude Assistant

    Now test the registry flows.

  5. Claude Assistant

    All tests pass. Here's my checklist review:

    • If an error was reported in the issue description, I have successfully reproduced it. The issue reports missing behavior (no RemoveService/RemoveSubscribeURL in metadata/metadata.go, and unregister/unsubscribe flows never clean local metadata) rather than a runtime error. I reproduced the stale-metadata behavior with a temporary test: after Register + UnRegister, the exported URL and Services entry remained in metadata.GetMetadataInfo(id) (the package-level remove functions didn't even exist, so compilation of the reproduction failed initially).
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error. Temporary tests (in metadata and registry/servicediscovery, since removed) verified: unregister/unsubscribe now remove exactly the target URL, unrelated registrations/subscriptions are preserved, and when the remote operation fails (serviceDiscovery.Unregister error / serviceNameMapping.Remove error) the local metadata is untouched.
    • I have thought about edge cases and made sure my fix handles them as well. Handled: unknown registry id (no-op, no map entry created), nil URL (no-op), URL passed as a clone/copy (matching now uses pointer identity or URL.Key() instead of pointer-only equality, which matters because registry/directory unregisters with url.Clone()), multiple URLs sharing a service key (only the matching one removed; Services entry is kept/refreshed if another exported URL still matches the same match key, otherwise deleted), and nil internal maps (delete/read on nil maps are safe).
    • I have run existing tests in the repository that might have been affected and confirmed that they pass. Ran go build ./..., go vet, gofmt -l, plus go test for ./metadata/..., ./registry/..., ./client/..., ./server/..., ./config/... and the root package — all pass. No existing tests were modified; my temporary test files were deleted before submitting.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.