Removing a registered or subscribed service leaves stale local metadata After a…
- User
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.
- Assistant
I’ll trace the metadata storage and unregister/unsubscribe call paths, then implement the two removals and add focused regression tests, including remote-failure behavior.
- Assistant
rgisn’t installed in this workspace, so I’m switching to recursive grep and keeping the search scoped to Go sources. - Assistant
The stale state is confined to the application-level service-discovery registry. I also found a lower-level edge case: removing one provider currently deletes its shared service entry even when another URL with the same service/match key remains. I’m fixing both the public metadata API and that preservation behavior.
- Assistant
The implementation and regression tests are in place. The focused test run is still compiling the repository’s dependency graph; once it finishes I’ll address any failures and run a broader affected-package check.
- Assistant
The first run hit the container’s process limit during parallel compilation, not a code failure; the smallest metadata package already passed. I’m rerunning the affected packages serially to get a reliable result.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.