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 plus unregister/unsubscribe call paths, then implement the removals and run the focused Go tests.
- Assistant
rgisn’t installed here, so I’m switching tofind/grepand keeping the inspection scoped to metadata and registry code. - Assistant
The low-level removal methods already exist, but they remove only the same pointer and delete a service entry even when another URL has the same match key. I’m correcting those semantics, exposing the requested package functions, and wiring them only after successful service-discovery operations.
- Assistant
The focused test run is still compiling dependencies. After it completes, I’ll add or adjust flow-level coverage if it exposes any integration assumptions.
- Assistant
The first build hit the container’s process limit (
fork: resource temporarily unavailable), not a code failure. I’m rerunning the directly affected packages serially to avoid that environmental limit. - Assistant
The serial focused suite passes, including new success/failure integration cases. I’m letting the broader registry package suite finish to catch regressions in other registry implementations.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.