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 verify failure behavior with focused tests.
- Assistant
rgisn’t installed here, so I’m using the repository’s standard shell search tools instead. I’m narrowing this to the metadata mutation methods and the point after remote registry success. - Assistant
The lower-level removal already existed, but it dropped the entire service match entry even when another URL shared that match key. I’m correcting that preservation logic, exposing the requested registry-scoped functions, and wiring cleanup only after successful unregister/unsubscribe completion.
- Assistant
The focused test run is compiling the relevant packages now. I’m also adding explicit integration-level assertions for the key transaction boundary: metadata remains on remote failure and is removed on success.
- Assistant
The first build hit the container’s process limit during parallel compilation, not a code failure. I’m rerunning the focused suites 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.